From 7a388ee4530a1924bd3e0100078e5179bf5ee18c Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Wed, 3 Jan 2007 02:12:56 +0100 Subject: pr16194.c: We now output error on all three functions, not just first one. * 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. From-SVN: r120373 --- gcc/passes.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'gcc/passes.c') diff --git a/gcc/passes.c b/gcc/passes.c index ebf5586..d40f84e 100644 --- a/gcc/passes.c +++ b/gcc/passes.c @@ -461,19 +461,28 @@ init_optimization_passes (void) NEXT_PASS (pass_lower_complex_O0); NEXT_PASS (pass_lower_vector); NEXT_PASS (pass_warn_function_return); - NEXT_PASS (pass_early_tree_profile); *p = NULL; p = &pass_early_local_passes.sub; NEXT_PASS (pass_tree_profile); NEXT_PASS (pass_cleanup_cfg); + NEXT_PASS (pass_init_datastructures); + NEXT_PASS (pass_expand_omp); + NEXT_PASS (pass_all_early_optimizations); NEXT_PASS (pass_rebuild_cgraph_edges); *p = NULL; + p = &pass_all_early_optimizations.sub; + NEXT_PASS (pass_referenced_vars); + NEXT_PASS (pass_reset_cc_flags); + NEXT_PASS (pass_build_ssa); + NEXT_PASS (pass_early_warn_uninitialized); + NEXT_PASS (pass_cleanup_cfg); + + *p = NULL; + p = &all_passes; NEXT_PASS (pass_fixup_cfg); - NEXT_PASS (pass_init_datastructures); - NEXT_PASS (pass_expand_omp); NEXT_PASS (pass_all_optimizations); NEXT_PASS (pass_warn_function_noreturn); NEXT_PASS (pass_free_datastructures); @@ -485,10 +494,7 @@ init_optimization_passes (void) *p = NULL; p = &pass_all_optimizations.sub; - NEXT_PASS (pass_referenced_vars); - NEXT_PASS (pass_reset_cc_flags); NEXT_PASS (pass_create_structure_vars); - NEXT_PASS (pass_build_ssa); NEXT_PASS (pass_may_alias); NEXT_PASS (pass_return_slot); NEXT_PASS (pass_rename_ssa_copies); -- cgit v1.1