Commit b633db7b by Jan Hubicka Committed by Jan Hubicka

cgraphunit.c (decide_is_function_needed): Also nested functions and functions…

cgraphunit.c (decide_is_function_needed): Also nested functions and functions declared inline can be optimized out at -O0.


	* cgraphunit.c (decide_is_function_needed): Also nested functions
	and functions declared inline can be optimized out at -O0.

From-SVN: r114008
parent 30df044a
2006-05-23 Jan Hubicka <jh@suse.cz>
* cgraphunit.c (decide_is_function_needed): Also nested functions
and functions declared inline can be optimized out at -O0.
2006-05-22 Gerald Pfeifer <gerald@pfeifer.com> 2006-05-22 Gerald Pfeifer <gerald@pfeifer.com>
* doc/install.texi (Configuration): Remove reference to CrossGCC * doc/install.texi (Configuration): Remove reference to CrossGCC
......
...@@ -219,10 +219,14 @@ decide_is_function_needed (struct cgraph_node *node, tree decl) ...@@ -219,10 +219,14 @@ decide_is_function_needed (struct cgraph_node *node, tree decl)
COMDAT functions that must be output only when they are needed. COMDAT functions that must be output only when they are needed.
When not optimizing, also output the static functions. (see When not optimizing, also output the static functions. (see
PR25962), but don't do so for always_inline functions. PR25962), but don't do so for always_inline functions, functions
*/ declared inline and nested functions. These was optimized out
in the original implementation and it is unclear whether we want
to change the behaviour here. */
if (((TREE_PUBLIC (decl) if (((TREE_PUBLIC (decl)
|| (!optimize && !node->local.disregard_inline_limits)) || (!optimize && !node->local.disregard_inline_limits
&& !DECL_DECLARED_INLINE_P (decl)
&& !node->origin))
&& !flag_whole_program) && !flag_whole_program)
&& !DECL_COMDAT (decl) && !DECL_EXTERNAL (decl)) && !DECL_COMDAT (decl) && !DECL_EXTERNAL (decl))
return true; return true;
......
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