mirror of git://gcc.gnu.org/git/gcc.git
tree-pass.h (tree_lowering_passes): Remove.
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. From-SVN: r186268
This commit is contained in:
parent
bcc2b4cdc2
commit
26eb69c619
|
@ -1,3 +1,14 @@
|
||||||
|
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.
|
||||||
|
|
||||||
2012-04-09 H.J. Lu <hongjiu.lu@intel.com>
|
2012-04-09 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
PR other/52777
|
PR other/52777
|
||||||
|
|
|
@ -2437,10 +2437,9 @@ cgraph_add_new_function (tree fndecl, bool lowered)
|
||||||
push_cfun (DECL_STRUCT_FUNCTION (fndecl));
|
push_cfun (DECL_STRUCT_FUNCTION (fndecl));
|
||||||
current_function_decl = fndecl;
|
current_function_decl = fndecl;
|
||||||
gimple_register_cfg_hooks ();
|
gimple_register_cfg_hooks ();
|
||||||
tree_lowering_passes (fndecl);
|
|
||||||
bitmap_obstack_initialize (NULL);
|
bitmap_obstack_initialize (NULL);
|
||||||
if (!gimple_in_ssa_p (DECL_STRUCT_FUNCTION (fndecl)))
|
execute_pass_list (all_lowering_passes);
|
||||||
execute_pass_list (pass_early_local_passes.pass.sub);
|
execute_pass_list (pass_early_local_passes.pass.sub);
|
||||||
bitmap_obstack_release (NULL);
|
bitmap_obstack_release (NULL);
|
||||||
pop_cfun ();
|
pop_cfun ();
|
||||||
current_function_decl = NULL;
|
current_function_decl = NULL;
|
||||||
|
|
|
@ -313,20 +313,6 @@ cgraph_reset_node (struct cgraph_node *node)
|
||||||
cgraph_node_remove_callees (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
|
/* 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
|
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
|
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);
|
gimplify_function_tree (decl);
|
||||||
dump_function (TDI_generic, 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 ();
|
pop_cfun ();
|
||||||
}
|
}
|
||||||
node->analyzed = true;
|
node->analyzed = true;
|
||||||
|
|
|
@ -366,26 +366,6 @@ struct gimple_opt_pass pass_init_datastructures =
|
||||||
0 /* todo_flags_finish */
|
0 /* todo_flags_finish */
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
|
||||||
tree_lowering_passes (tree fn)
|
|
||||||
{
|
|
||||||
tree saved_current_function_decl = current_function_decl;
|
|
||||||
|
|
||||||
current_function_decl = fn;
|
|
||||||
push_cfun (DECL_STRUCT_FUNCTION (fn));
|
|
||||||
gimple_register_cfg_hooks ();
|
|
||||||
bitmap_obstack_initialize (NULL);
|
|
||||||
execute_pass_list (all_lowering_passes);
|
|
||||||
if (optimize && cgraph_global_info_ready)
|
|
||||||
execute_pass_list (pass_early_local_passes.pass.sub);
|
|
||||||
free_dominance_info (CDI_POST_DOMINATORS);
|
|
||||||
free_dominance_info (CDI_DOMINATORS);
|
|
||||||
compact_blocks ();
|
|
||||||
current_function_decl = saved_current_function_decl;
|
|
||||||
bitmap_obstack_release (NULL);
|
|
||||||
pop_cfun ();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* For functions-as-trees languages, this performs all optimization and
|
/* For functions-as-trees languages, this performs all optimization and
|
||||||
compilation for FNDECL. */
|
compilation for FNDECL. */
|
||||||
|
|
|
@ -349,8 +349,6 @@ struct register_pass_info
|
||||||
enum pass_positioning_ops pos_op; /* how to insert the new pass. */
|
enum pass_positioning_ops pos_op; /* how to insert the new pass. */
|
||||||
};
|
};
|
||||||
|
|
||||||
extern void tree_lowering_passes (tree decl);
|
|
||||||
|
|
||||||
extern struct gimple_opt_pass pass_mudflap_1;
|
extern struct gimple_opt_pass pass_mudflap_1;
|
||||||
extern struct gimple_opt_pass pass_mudflap_2;
|
extern struct gimple_opt_pass pass_mudflap_2;
|
||||||
extern struct gimple_opt_pass pass_lower_cf;
|
extern struct gimple_opt_pass pass_lower_cf;
|
||||||
|
|
Loading…
Reference in New Issue