diff options
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r-- | gcc/cgraph.c | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c index 61a8e235fe3..9a2c491a28e 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, |