diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-12-11 21:48:48 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-12-11 21:48:48 +0000 |
commit | 366970c69f98d09e2d897167825bd38a9f53488c (patch) | |
tree | 5fd382a134825548701642cd06befc46ffb8a9b4 /gcc/cgraphunit.c | |
parent | 1f32c54e3a685e69015abadf5d64d668226f3871 (diff) | |
download | gcc-366970c69f98d09e2d897167825bd38a9f53488c.tar.gz |
PR ipa/61324
* testsuite/g++.dg/pr61324.C: New testcase by Trevor Saunders.
* testsuite/g++.dg/tm/pr51411-2.C: Update se the extern function is
not eliminated early.
* testsuite/gcc.target/i386/pr57756.c: Turn extern inline into static
inline.
* passes.c (execute_todo): Update call of remove_unreachable_nodes.
* ipa-chkp.c (chkp_produce_thunks): Use TODO_remove_functions.
* cgraphunit.c (symbol_table::process_new_functions): Add
IPA_SSA_AFTER_INLINING.
(ipa_passes): Update call of remove_unreachable_nodes.
(symbol_table::compile): Remove call of remove_unreachable_nodes.
* ipa-inline.c (inline_small_functions): Do not ICE with
-flto-partition=none
(ipa_inline): Update symtab->state; fix formatting
update call of remove_unreachable_nodes.
* cgraphclones.c (symbol_table::materialize_all_clones): Likewise.
* cgraph.h (enum symtab_state): Add IPA_SSA_AFTER_INLINING.
(remove_unreachable_nodes): Update.
* ipa.c (process_references): Keep external references only
when optimizing.
(walk_polymorphic_call_targets): Keep possible polymorphic call
target only when devirtualizing.
(symbol_table::remove_unreachable_nodes): Remove BEFORE_INLINING_P
parameter.
(ipa_single_use): Update comment.
* ipa-pure-const.c (cdtor_p): New function.
(propagate_pure_const): Track if some cdtor was turned pure/const.
(execute): Return TODO_remove_functions if needed.
* ipa-comdats.c (ipa_comdats): Update comment.
* lto.c (read_cgraph_and_symbols): Update call of
remove_unreachable_nodes.
(do_whole_program_analysis): Remove call of
symtab->remove_unreachable_nodes
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218640 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r-- | gcc/cgraphunit.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index fed1a3e0053..53abd173fa6 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -327,6 +327,7 @@ symbol_table::process_new_functions (void) case IPA: case IPA_SSA: + case IPA_SSA_AFTER_INLINING: /* When IPA optimization already started, do all essential transformations that has been already performed on the whole cgraph but not on this function. */ @@ -335,7 +336,7 @@ symbol_table::process_new_functions (void) if (!node->analyzed) node->analyze (); push_cfun (DECL_STRUCT_FUNCTION (fndecl)); - if (state == IPA_SSA + if ((state == IPA_SSA || state == IPA_SSA_AFTER_INLINING) && !gimple_in_ssa_p (DECL_STRUCT_FUNCTION (fndecl))) g->get_passes ()->execute_early_local_passes (); else if (inline_summary_vec != NULL) @@ -507,6 +508,7 @@ cgraph_node::add_new_function (tree fndecl, bool lowered) case IPA: case IPA_SSA: + case IPA_SSA_AFTER_INLINING: case EXPANSION: /* Bring the function into finalized state and enqueue for later analyzing and compilation. */ @@ -2053,7 +2055,7 @@ ipa_passes (void) /* This extra symtab_remove_unreachable_nodes pass tends to catch some devirtualization and other changes where removal iterate. */ - symtab->remove_unreachable_nodes (true, symtab->dump_file); + symtab->remove_unreachable_nodes (symtab->dump_file); /* If pass_all_early_optimizations was not scheduled, the state of the cgraph will not be properly updated. Update it now. */ @@ -2194,10 +2196,6 @@ symbol_table::compile (void) return; } - /* This pass remove bodies of extern inline functions we never inlined. - Do this later so other IPA passes see what is really going on. - FIXME: This should be run just after inlining by pasmanager. */ - remove_unreachable_nodes (false, dump_file); global_info_ready = true; if (dump_file) { |