From f517b36eec084c177098f54c4755ab7222fb7e2f Mon Sep 17 00:00:00 2001 From: hubicka Date: Wed, 3 Jan 2007 01:12:56 +0000 Subject: * gcc.dg/pr16194.c: We now output error on all three functions, not just first one. * cgraph.c: Include tree-flow.h (cgraph_add_new-function): Handle IPA_SSA mode; execute early_local_passes. * cgraph.h (enum cgraph_state): Add CGRAPH_STATE_IPA_SSA. * tree-pass.h (pass_all_early_optimizations): Declare. * cgraphunit.c (cgraph_process_new_functions): Add IPA_SSA; execute early_local_passes. (cgraph_analyze_function): Do early_local_passes. * tree-mudflap.c (mf_decl_cache_locals, mf_build_check_statement_for): Do not add referenced vars. * tree-optimize.c (gate_all_optimizations): Do not execute when not in SSA form. (gate_all_early_local_passes): New gate. (pass_early_local_passes): Use new gate. (execute_early_local_optimizations): New functions. (gate_all_early_optimizations): New gate. (pass_all_early_optimizations): New pass. (execute_free_datastructures): Free SSA only when initialized. (gate_init_datastructures): Init only when optimizing. (tree_lowering_passes): Do early local passes when called late. * tree-profile.c (do_tree_profiling): Don't profile functions added late. (do_early_tree_profiling, pass_early_tree_profile): Kill. * tree-cfg.c (update_modified_stmts): Do not update when operands are not active. * passes.c (init_optimizations_passes): Reorder so we go into SSA during early_local_passes. * Makefile.in (cgraph.o): Add dependency on tree-flow.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120373 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cgraphunit.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'gcc/cgraphunit.c') diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index d5b7e6d17d1..22727203186 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -294,6 +294,7 @@ cgraph_process_new_functions (void) break; case CGRAPH_STATE_IPA: + case CGRAPH_STATE_IPA_SSA: /* When IPA optimization already started, do all essential transformations that has been already performed on the whole cgraph but not on this function. */ @@ -313,6 +314,12 @@ cgraph_process_new_functions (void) initialize_inline_failed (node); if (flag_really_no_inline && !node->local.disregard_inline_limits) node->local.inlinable = 0; + if ((cgraph_state == CGRAPH_STATE_IPA_SSA + && !gimple_in_ssa_p (DECL_STRUCT_FUNCTION (fndecl))) + /* When not optimizing, be sure we run early local passes anyway + to expand OMP. */ + || !optimize) + execute_pass_list (pass_early_local_passes.sub); free_dominance_info (CDI_POST_DOMINATORS); free_dominance_info (CDI_DOMINATORS); pop_cfun (); @@ -877,6 +884,15 @@ cgraph_analyze_function (struct cgraph_node *node) node->local.inlinable = 0; /* Inlining characteristics are maintained by the cgraph_mark_inline. */ node->global.insns = node->local.self_insns; + if (!flag_unit_at_a_time) + { + bitmap_obstack_initialize (NULL); + tree_register_cfg_hooks (); + execute_pass_list (pass_early_local_passes.sub); + free_dominance_info (CDI_POST_DOMINATORS); + free_dominance_info (CDI_DOMINATORS); + bitmap_obstack_release (NULL); + } node->analyzed = true; pop_cfun (); -- cgit v1.2.1