aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraph.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2007-01-03 02:12:56 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2007-01-03 01:12:56 +0000
commit7a388ee4530a1924bd3e0100078e5179bf5ee18c (patch)
tree8220e38043cf20d1777f9ce1815232f73e5df606 /gcc/cgraph.c
parent93251c58a654a013e1033e7d497faa4a74b20618 (diff)
downloadgcc-7a388ee4530a1924bd3e0100078e5179bf5ee18c.zip
gcc-7a388ee4530a1924bd3e0100078e5179bf5ee18c.tar.gz
gcc-7a388ee4530a1924bd3e0100078e5179bf5ee18c.tar.bz2
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
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r--gcc/cgraph.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index 21e821c..1baed25 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -83,6 +83,7 @@ The callgraph:
#include "intl.h"
#include "tree-gimple.h"
#include "tree-dump.h"
+#include "tree-flow.h"
static void cgraph_node_remove_callers (struct cgraph_node *node);
static inline void cgraph_edge_remove_caller (struct cgraph_edge *e);
@@ -942,6 +943,7 @@ cgraph_add_new_function (tree fndecl, bool lowered)
break;
case CGRAPH_STATE_IPA:
+ case CGRAPH_STATE_IPA_SSA:
case CGRAPH_STATE_EXPANSION:
/* Bring the function into finalized state and enqueue for later
analyzing and compilation. */
@@ -963,6 +965,10 @@ cgraph_add_new_function (tree fndecl, bool lowered)
tree_register_cfg_hooks ();
if (!lowered)
tree_lowering_passes (fndecl);
+ bitmap_obstack_initialize (NULL);
+ if (!gimple_in_ssa_p (DECL_STRUCT_FUNCTION (fndecl)) && optimize)
+ execute_pass_list (pass_early_local_passes.sub);
+ bitmap_obstack_release (NULL);
tree_rest_of_compilation (fndecl);
pop_cfun ();
current_function_decl = NULL;