diff options
author | Jan Hubicka <jh@suse.cz> | 2008-06-18 15:39:43 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2008-06-18 13:39:43 +0000 |
commit | ff2c88a5611bfb610de62937e762457124747d3c (patch) | |
tree | 9a9646a27710c1197a1ba3b155dad3007d0d984e /gcc/cgraph.c | |
parent | b7352f3f9aeba3d9baf252c7cabecebae673cb0d (diff) | |
download | gcc-ff2c88a5611bfb610de62937e762457124747d3c.zip gcc-ff2c88a5611bfb610de62937e762457124747d3c.tar.gz gcc-ff2c88a5611bfb610de62937e762457124747d3c.tar.bz2 |
cgraph.c (cgraph_add_new_function): When in expansion state, do lowering.
* cgraph.c (cgraph_add_new_function): When in expansion state, do lowering.
* method.c: Include cgraph.h.
(use_thunk): Use cgraph_add_new_function instead of calling backend directly.
From-SVN: r136892
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r-- | gcc/cgraph.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c index e6910b5..df214d1 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -1052,6 +1052,21 @@ cgraph_add_new_function (tree fndecl, bool lowered) 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; + tree_register_cfg_hooks (); + tree_lowering_passes (fndecl); + 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); + pop_cfun (); + current_function_decl = NULL; + + lowered = true; + } if (lowered) node->lowered = true; node->next_needed = cgraph_new_nodes; |