aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraph.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-04-12 15:11:17 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2012-04-12 15:11:17 +0000
commit452aa9c5105180110e7e80aa74044426ca8271cf (patch)
treef31f422093f6f8e431012dab5b39fd2c1509b3d0 /gcc/cgraph.c
parentacf41a74a832b7225d9e2b60e7294a7c750e9b97 (diff)
downloadgcc-452aa9c5105180110e7e80aa74044426ca8271cf.zip
gcc-452aa9c5105180110e7e80aa74044426ca8271cf.tar.gz
gcc-452aa9c5105180110e7e80aa74044426ca8271cf.tar.bz2
Makefile.in (cgraphunit.o): Add $(EXCEPT_H) dependency.
2012-04-12 Richard Guenther <rguenther@suse.de> * Makefile.in (cgraphunit.o): Add $(EXCEPT_H) dependency. * cgraph.h (tree_rest_of_compilation): Remove. * cgraph.c (cgraph_add_new_function): Move ... * cgraphunit.c (cgraph_add_new_function): ... here. (tree_rest_of_compilation): Make static. (cgraph_expand_function): Do not set cgraph_function_flags_ready. * tree-optimize.c (gate_all_optimizations, pass_all_optimizations, gate_all_early_local_passes, execute_all_early_local_passes, pass_early_local_passes, gate_all_early_optimizations, pass_all_early_optimizations): Move ... * passes.c (gate_all_optimizations, pass_all_optimizations, gate_all_early_local_passes, execute_all_early_local_passes, pass_early_local_passes, gate_all_early_optimizations, pass_all_early_optimizations): ... here. * tree-optimize.c (execute_free_datastructures): Remove. * tree-flow.h (execute_free_datastructures): Remove. * tree-optimize.c (execute_init_datastructures, pass_init_datastructures): Move ... * tree-ssa.c (execute_init_datastructures, pass_init_datastructures): ... here. * cfgexpand.c (gimple_expand_cfg): Inline-expand call to execute_free_datastructures. From-SVN: r186381
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r--gcc/cgraph.c83
1 files changed, 0 insertions, 83 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index 61a8e23..9a2c491 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -2397,89 +2397,6 @@ cgraph_function_body_availability (struct cgraph_node *node)
return avail;
}
-/* Add the function FNDECL to the call graph.
- Unlike cgraph_finalize_function, this function is intended to be used
- by middle end and allows insertion of new function at arbitrary point
- of compilation. The function can be either in high, low or SSA form
- GIMPLE.
-
- The function is assumed to be reachable and have address taken (so no
- API breaking optimizations are performed on it).
-
- Main work done by this function is to enqueue the function for later
- processing to avoid need the passes to be re-entrant. */
-
-void
-cgraph_add_new_function (tree fndecl, bool lowered)
-{
- struct cgraph_node *node;
- switch (cgraph_state)
- {
- case CGRAPH_STATE_CONSTRUCTION:
- /* Just enqueue function to be processed at nearest occurrence. */
- node = cgraph_create_node (fndecl);
- node->next_needed = cgraph_new_nodes;
- if (lowered)
- node->lowered = true;
- cgraph_new_nodes = node;
- 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. */
- node = cgraph_get_create_node (fndecl);
- node->local.local = false;
- node->local.finalized = true;
- node->reachable = node->needed = true;
- if (!lowered && cgraph_state == CGRAPH_STATE_EXPANSION)
- {
- push_cfun (DECL_STRUCT_FUNCTION (fndecl));
- current_function_decl = fndecl;
- gimple_register_cfg_hooks ();
- bitmap_obstack_initialize (NULL);
- execute_pass_list (all_lowering_passes);
- execute_pass_list (pass_early_local_passes.pass.sub);
- bitmap_obstack_release (NULL);
- pop_cfun ();
- current_function_decl = NULL;
-
- lowered = true;
- }
- if (lowered)
- node->lowered = true;
- node->next_needed = cgraph_new_nodes;
- cgraph_new_nodes = node;
- break;
-
- case CGRAPH_STATE_FINISHED:
- /* At the very end of compilation we have to do all the work up
- to expansion. */
- node = cgraph_create_node (fndecl);
- if (lowered)
- node->lowered = true;
- cgraph_analyze_function (node);
- push_cfun (DECL_STRUCT_FUNCTION (fndecl));
- current_function_decl = fndecl;
- gimple_register_cfg_hooks ();
- bitmap_obstack_initialize (NULL);
- if (!gimple_in_ssa_p (DECL_STRUCT_FUNCTION (fndecl)))
- execute_pass_list (pass_early_local_passes.pass.sub);
- bitmap_obstack_release (NULL);
- tree_rest_of_compilation (node);
- pop_cfun ();
- current_function_decl = NULL;
- break;
- }
-
- /* Set a personality if required and we already passed EH lowering. */
- if (lowered
- && (function_needs_eh_personality (DECL_STRUCT_FUNCTION (fndecl))
- == eh_personality_lang))
- DECL_FUNCTION_PERSONALITY (fndecl) = lang_hooks.eh_personality ();
-}
-
/* Worker for cgraph_node_can_be_local_p. */
static bool
cgraph_node_cannot_be_local_p_1 (struct cgraph_node *node,