diff options
author | Richard Guenther <rguenther@suse.de> | 2012-04-10 08:19:21 +0000 |
---|---|---|
committer | Richard Guenther <rguenther@suse.de> | 2012-04-10 08:19:21 +0000 |
commit | b985b4e1ab52662c8e428df62a3f34324736ecb9 (patch) | |
tree | 6b92c821c2ae799a2ab7f42bf9b9d1f1861fa75f /gcc/cgraphunit.c | |
parent | b08e22bdae731ac275f1e26bb6a3c0fe0308b214 (diff) |
2012-04-10 Richard Guenther <rguenther@suse.de>
* tree-pass.h (tree_lowering_passes): Remove.
* tree-optimize.c (tree_lowering_passes): Remove.
* cgraph.c (cgraph_add_new_function): Inline relevant parts
of tree_lowering_passes, avoid redundant call of early local
passes.
* cgraphunit.c (cgraph_lower_function): Fold into ...
(cgraph_analyze_function): ... its single caller. Inline
relevant parts of tree_lowering_passes.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@186268 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r-- | gcc/cgraphunit.c | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index 9e5820fc901..70ac1f39ea4 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -313,20 +313,6 @@ cgraph_reset_node (struct cgraph_node *node) cgraph_node_remove_callees (node); } -static void -cgraph_lower_function (struct cgraph_node *node) -{ - if (node->lowered) - return; - - if (node->nested) - lower_nested_functions (node->decl); - gcc_assert (!node->nested); - - tree_lowering_passes (node->decl); - node->lowered = true; -} - /* DECL has been parsed. Take it, queue it, compile it at the whim of the logic in effect. If NESTED is true, then our caller cannot stand to have the garbage collector run at the moment. We would need to either create @@ -915,7 +901,23 @@ cgraph_analyze_function (struct cgraph_node *node) gimplify_function_tree (decl); dump_function (TDI_generic, decl); - cgraph_lower_function (node); + /* Lower the function. */ + if (!node->lowered) + { + if (node->nested) + lower_nested_functions (node->decl); + gcc_assert (!node->nested); + + gimple_register_cfg_hooks (); + bitmap_obstack_initialize (NULL); + execute_pass_list (all_lowering_passes); + free_dominance_info (CDI_POST_DOMINATORS); + free_dominance_info (CDI_DOMINATORS); + compact_blocks (); + bitmap_obstack_release (NULL); + node->lowered = true; + } + pop_cfun (); } node->analyzed = true; |