Commit a12f79f5 by Jan Hubicka Committed by Jan Hubicka

re PR tree-optimization/36100 (always_inline attribute is broken at -O0)


	PR bootstrap/36100
	* ipa-inline.c (inline_generate_summary): Make static.
	(inline_transform): Do not call inlining at -O0; make static.
	* passes.c (execute_todo): Add sanity check.
	(execute_one_ipa_transform_pass): Execute proper flags.

From-SVN: r134885
parent fa5b668e
2008-05-01 Jan Hubicka <jh@suse.cz>
PR bootstrap/36100
* ipa-inline.c (inline_generate_summary): Make static.
(inline_transform): Do not call inlining at -O0; make static.
* passes.c (execute_todo): Add sanity check.
(execute_one_ipa_transform_pass): Execute proper flags.
2008-05-01 Eric Botcazou <ebotcazou@adacore.com> 2008-05-01 Eric Botcazou <ebotcazou@adacore.com>
* tree.h (TYPE_NONALIASED_COMPONENT): Expand comment. * tree.h (TYPE_NONALIASED_COMPONENT): Expand comment.
......
...@@ -1560,7 +1560,7 @@ struct gimple_opt_pass pass_inline_parameters = ...@@ -1560,7 +1560,7 @@ struct gimple_opt_pass pass_inline_parameters =
}; };
/* Note function body size. */ /* Note function body size. */
void static void
inline_generate_summary (struct cgraph_node *node ATTRIBUTE_UNUSED) inline_generate_summary (struct cgraph_node *node ATTRIBUTE_UNUSED)
{ {
compute_inline_parameters (); compute_inline_parameters ();
...@@ -1568,17 +1568,12 @@ inline_generate_summary (struct cgraph_node *node ATTRIBUTE_UNUSED) ...@@ -1568,17 +1568,12 @@ inline_generate_summary (struct cgraph_node *node ATTRIBUTE_UNUSED)
} }
/* Apply inline plan to function. */ /* Apply inline plan to function. */
int static unsigned int
inline_transform (struct cgraph_node *node) inline_transform (struct cgraph_node *node)
{ {
unsigned int todo = 0; unsigned int todo = 0;
struct cgraph_edge *e; struct cgraph_edge *e;
/* Even when not optimizing, ensure that always_inline functions get inlined.
*/
if (!optimize)
cgraph_decide_inlining_incrementally (node, INLINE_SPEED, 0);
/* We might need the body of this function so that we can expand /* We might need the body of this function so that we can expand
it inline somewhere else. */ it inline somewhere else. */
if (cgraph_preserve_function_body_p (current_function_decl)) if (cgraph_preserve_function_body_p (current_function_decl))
......
...@@ -999,11 +999,15 @@ execute_todo (unsigned int flags) ...@@ -999,11 +999,15 @@ execute_todo (unsigned int flags)
to analyze side effects. The full removal is done just at the end to analyze side effects. The full removal is done just at the end
of IPA pass queue. */ of IPA pass queue. */
if (flags & TODO_remove_functions) if (flags & TODO_remove_functions)
cgraph_remove_unreachable_nodes (true, dump_file); {
gcc_assert (!cfun);
cgraph_remove_unreachable_nodes (true, dump_file);
}
if ((flags & TODO_dump_cgraph) if ((flags & TODO_dump_cgraph)
&& dump_file && !current_function_decl) && dump_file && !current_function_decl)
{ {
gcc_assert (!cfun);
dump_cgraph (dump_file); dump_cgraph (dump_file);
/* Flush the file. If verification fails, we won't be able to /* Flush the file. If verification fails, we won't be able to
close the file before aborting. */ close the file before aborting. */
...@@ -1162,7 +1166,7 @@ execute_one_ipa_transform_pass (struct cgraph_node *node, ...@@ -1162,7 +1166,7 @@ execute_one_ipa_transform_pass (struct cgraph_node *node,
pass_init_dump_file (pass); pass_init_dump_file (pass);
/* Run pre-pass verification. */ /* Run pre-pass verification. */
execute_todo (pass->todo_flags_start); execute_todo (ipa_pass->function_transform_todo_flags_start);
/* If a timevar is present, start it. */ /* If a timevar is present, start it. */
if (pass->tv_id) if (pass->tv_id)
......
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