Commit 4a10fb94 by Jan Hubicka Committed by Jan Hubicka

varasm.c (default_function_section): Check flag_reorder_functions and targetm.have_named_sections.



	* varasm.c (default_function_section): Check flag_reorder_functions
	and targetm.have_named_sections.
	* config/darwin.c (darwin_function_section): Check
	flag_reorder_functions.

Co-Authored-By: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>

From-SVN: r167727
parent dcac2e64
2010-12-12 Jan Hubicka <jh@suse.cz>
Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* varasm.c (default_function_section): Check flag_reorder_functions
and targetm.have_named_sections.
* config/darwin.c (darwin_function_section): Check
flag_reorder_functions.
2010-12-12 Finn Thain <fthain@telegraphics.com.au> 2010-12-12 Finn Thain <fthain@telegraphics.com.au>
PR target/46179 PR target/46179
...@@ -2968,6 +2968,8 @@ section * ...@@ -2968,6 +2968,8 @@ section *
darwin_function_section (tree decl, enum node_frequency freq, darwin_function_section (tree decl, enum node_frequency freq,
bool startup, bool exit) bool startup, bool exit)
{ {
if (!flag_reorder_functions)
return NULL;
/* Startup code should go to startup subsection unless it is /* Startup code should go to startup subsection unless it is
unlikely executed (this happens especially with function splitting unlikely executed (this happens especially with function splitting
where we can split away unnecesary parts of static constructors. */ where we can split away unnecesary parts of static constructors. */
......
...@@ -533,6 +533,9 @@ section * ...@@ -533,6 +533,9 @@ section *
default_function_section (tree decl, enum node_frequency freq, default_function_section (tree decl, enum node_frequency freq,
bool startup, bool exit) bool startup, bool exit)
{ {
if (!flag_reorder_functions
|| !targetm.have_named_sections)
return NULL;
/* Startup code should go to startup subsection unless it is /* Startup code should go to startup subsection unless it is
unlikely executed (this happens especially with function splitting unlikely executed (this happens especially with function splitting
where we can split away unnecesary parts of static constructors. */ where we can split away unnecesary parts of static constructors. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment