mirror of git://gcc.gnu.org/git/gcc.git
re PR bootstrap/59541 (Revision 206070 breaks bootstrap on Darwin: config/darwin.c:3665:1: error: control reaches end of non-void function [-Werror=return-type])
gcc: PR bootstrap/59541 * config/darwin.c (darwin_function_section): Adjust return values to correspond to optimisation changes made in r206070. From-SVN: r206348
This commit is contained in:
parent
c8cc8a5e42
commit
e0c70bd727
|
|
@ -1,3 +1,9 @@
|
|||
2014-01-05 Iain Sandoe <iain@codesourcery.com>
|
||||
|
||||
PR bootstrap/59541
|
||||
* config/darwin.c (darwin_function_section): Adjust return values to
|
||||
correspond to optimisation changes made in r206070.
|
||||
|
||||
2014-01-05 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
* config/i386/i386.c (ix86_data_alignment): Calculate max_align
|
||||
|
|
|
|||
|
|
@ -3611,57 +3611,36 @@ darwin_function_section (tree decl, enum node_frequency freq,
|
|||
if (decl && DECL_SECTION_NAME (decl) != NULL_TREE)
|
||||
return get_named_section (decl, NULL, 0);
|
||||
|
||||
/* Default when there is no function re-ordering. */
|
||||
if (!flag_reorder_functions)
|
||||
return (weak)
|
||||
? darwin_sections[text_coal_section]
|
||||
: text_section;
|
||||
/* We always put unlikely executed stuff in the cold section. */
|
||||
if (freq == NODE_FREQUENCY_UNLIKELY_EXECUTED)
|
||||
return (weak) ? darwin_sections[text_cold_coal_section]
|
||||
: darwin_sections[text_cold_section];
|
||||
|
||||
/* Startup code should go to startup subsection unless it is
|
||||
unlikely executed (this happens especially with function splitting
|
||||
where we can split away unnecessary parts of static constructors). */
|
||||
if (startup && freq != NODE_FREQUENCY_UNLIKELY_EXECUTED)
|
||||
{
|
||||
/* If we do have a profile or(and) LTO phase is executed, we do not need
|
||||
these ELF section. */
|
||||
if (!in_lto_p || !flag_profile_values)
|
||||
return (weak)
|
||||
? darwin_sections[text_startup_coal_section]
|
||||
: darwin_sections[text_startup_section];
|
||||
else
|
||||
return text_section;
|
||||
}
|
||||
/* If we have LTO *and* feedback information, then let LTO handle
|
||||
the function ordering, it makes a better job (for normal, hot,
|
||||
startup and exit - hence the bailout for cold above). */
|
||||
if (in_lto_p && flag_profile_values)
|
||||
goto default_function_sections;
|
||||
|
||||
/* Non-cold startup code should go to startup subsection. */
|
||||
if (startup)
|
||||
return (weak) ? darwin_sections[text_startup_coal_section]
|
||||
: darwin_sections[text_startup_section];
|
||||
|
||||
/* Similarly for exit. */
|
||||
if (exit && freq != NODE_FREQUENCY_UNLIKELY_EXECUTED)
|
||||
return (weak)
|
||||
? darwin_sections[text_exit_coal_section]
|
||||
: darwin_sections[text_exit_section];
|
||||
if (exit)
|
||||
return (weak) ? darwin_sections[text_exit_coal_section]
|
||||
: darwin_sections[text_exit_section];
|
||||
|
||||
/* Group cold functions together, similarly for hot code. */
|
||||
switch (freq)
|
||||
{
|
||||
case NODE_FREQUENCY_UNLIKELY_EXECUTED:
|
||||
return (weak)
|
||||
? darwin_sections[text_cold_coal_section]
|
||||
: darwin_sections[text_cold_section];
|
||||
break;
|
||||
case NODE_FREQUENCY_HOT:
|
||||
{
|
||||
/* If we do have a profile or(and) LTO phase is executed, we do not need
|
||||
these ELF section. */
|
||||
if (!in_lto_p || !flag_profile_values)
|
||||
return (weak)
|
||||
? darwin_sections[text_hot_coal_section]
|
||||
: darwin_sections[text_hot_section];
|
||||
break;
|
||||
}
|
||||
default:
|
||||
return (weak)
|
||||
? darwin_sections[text_coal_section]
|
||||
/* Place hot code. */
|
||||
if (freq == NODE_FREQUENCY_HOT)
|
||||
return (weak) ? darwin_sections[text_hot_coal_section]
|
||||
: darwin_sections[text_hot_section];
|
||||
|
||||
/* Otherwise, default to the 'normal' non-reordered sections. */
|
||||
default_function_sections:
|
||||
return (weak) ? darwin_sections[text_coal_section]
|
||||
: text_section;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* When a function is partitioned between sections, we need to insert a label
|
||||
|
|
|
|||
Loading…
Reference in New Issue