aboutsummaryrefslogtreecommitdiff
path: root/gcc/passes.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2007-01-08 12:13:14 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2007-01-08 11:13:14 +0000
commitf4b3ca7277845d4444997924301da6225ce19001 (patch)
tree5658297c549eec3a1a45febe1d3d11e413cc482c /gcc/passes.c
parent2fe29729951cda1678804a3e681b145430cd068c (diff)
downloadgcc-f4b3ca7277845d4444997924301da6225ce19001.zip
gcc-f4b3ca7277845d4444997924301da6225ce19001.tar.gz
gcc-f4b3ca7277845d4444997924301da6225ce19001.tar.bz2
tree-pas.h (TODO_remove_function): New flag.
* tree-pas.h (TODO_remove_function): New flag. (TODO_update*): Renumber. (pass_ipa_increase_alignment, pass_ipa_function_and_variable_visibility): New passes. * cgraphunit.c (cgraph_increase_alignment): Move to tree-vectorizer.c (cgraph_function_and_variable_visibility): Move to ipa.c (cgraph_optimize): Don't call cgraph_function_and_variable_visibility, cgraph_increase_alignment. * ipa-inline.c (cgraph_decide_inlining): Don't push timevar. (cgraph_decide_inlining_incrementally): Push TV_INTEGRATION before calling tree-inline. (cgraph_early_inlining): Do not call cgraph_remove_unreachable_nodes. (pass_ipa_inline, pass_early_ipa_inlining): Set TODO_remove_functions * tree-vectorizer.c (increase_alignment): Move here from cgraphunit.c (gate_increase_alignment): New function. (pass_ipa_increase_alignment): New pass. * ipa.c: Inline tree-pass.h and timevar.h (function_and_variable_visibility): Move here from cgraphunit.c * tree-optimize.c (pass_early_local_passes): Add TODO_remove_functions. * passes.c (init_optimization_passes): Add the two new passes. (execute_todo): Handle cgraph_remove_functions. From-SVN: r120576
Diffstat (limited to 'gcc/passes.c')
-rw-r--r--gcc/passes.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/passes.c b/gcc/passes.c
index 91c9f1e..d8b7f11 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -439,8 +439,10 @@ init_optimization_passes (void)
#define NEXT_PASS(PASS) (p = next_pass_1 (p, &PASS))
/* Interprocedural optimization passes. */
p = &all_ipa_passes;
+ NEXT_PASS (pass_ipa_function_and_variable_visibility);
NEXT_PASS (pass_early_ipa_inline);
NEXT_PASS (pass_early_local_passes);
+ NEXT_PASS (pass_ipa_increase_alignment);
NEXT_PASS (pass_ipa_cp);
NEXT_PASS (pass_ipa_inline);
NEXT_PASS (pass_ipa_reference);
@@ -830,6 +832,13 @@ execute_todo (unsigned int flags)
do_per_function (execute_function_todo, (void *)(size_t) flags);
+ /* Always remove functions just as before inlining: IPA passes might be
+ interested to see bodies of extern inline functions that are not inlined
+ to analyze side effects. The full removal is done just at the end
+ of IPA pass queue. */
+ if (flags & TODO_remove_functions)
+ cgraph_remove_unreachable_nodes (true, dump_file);
+
if ((flags & TODO_dump_cgraph)
&& dump_file && !current_function_decl)
{