aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraphunit.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-23 16:45:08 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-23 16:45:08 +0000
commit657e3a565eb019eda3113fb2da9b495d1c47361e (patch)
treebc119ccc3a2b2d6675fc6bbabd3fb8cff5b454d4 /gcc/cgraphunit.c
parent6a2fc14eb132a2a4e1ac2849dd34152ec494ce9e (diff)
PR tree-optimize/49373
* tree-pass.h (all_late_ipa_passes): Declare. * cgraphunit.c (init_lowered_empty_function): Fix properties. (cgraph_optimize): Execute late passes; remove unreachable funcions after materialization. * ipa-inline.c (gate_ipa_inline): Enable only when optimizing or LTOing. * passes.c (all_late_ipa_passes): Declare. (dump_passes, register_pass): Handle late ipa passes. (init_optimization_passes): Move ipa_pta to late passes; schedule fixup_cfg at beggining of all_passes. (apply_ipa_transforms): New function. (execute_one_pass): When doing simple ipa pass, apply all transforms. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175336 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r--gcc/cgraphunit.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index eefd37226f9..e470d85acc6 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -1420,7 +1420,7 @@ init_lowered_empty_function (tree decl)
DECL_SAVED_TREE (decl) = error_mark_node;
cfun->curr_properties |=
(PROP_gimple_lcf | PROP_gimple_leh | PROP_cfg | PROP_referenced_vars |
- PROP_ssa);
+ PROP_ssa | PROP_gimple_any);
/* Create BB for body of the function and connect it properly. */
bb = create_basic_block (NULL, (void *) 0, ENTRY_BLOCK_PTR);
@@ -2102,6 +2102,13 @@ cgraph_optimize (void)
#endif
cgraph_materialize_all_clones ();
+ bitmap_obstack_initialize (NULL);
+ execute_ipa_pass_list (all_late_ipa_passes);
+ cgraph_remove_unreachable_nodes (true, dump_file);
+#ifdef ENABLE_CHECKING
+ verify_cgraph ();
+#endif
+ bitmap_obstack_release (NULL);
cgraph_mark_functions_to_output ();
cgraph_state = CGRAPH_STATE_EXPANSION;