aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2016-08-18 10:41:53 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2016-08-18 10:41:53 +0000
commitb35a87b17607d81ae83ee6a7e0a5d91044b7b00a (patch)
tree66731264e5aac24db0964fd44ab89db11412cc57 /gcc/ipa.c
parentfa5f704b905599bb9e220c03432854c4de664408 (diff)
2016-08-18 Richard Biener <rguenther@suse.de>
* tree-pass.h (make_pass_materialize_all_clones): Declare. * ipa.c (pass_data_materialize_all_clones, pass_materialize_all_clones, make_pass_materialize_all_clones): New simple IPA pass encapsulating clone materialization. * passes.def (all_late_ipa_passes): Start with pass_materialize_all_clones. * cgraphunit.c (symbol_table::compile): Remove call to materialize_all_clones. * tree-into-ssa.c: Include statistics.h. (update_ssa): Count number of times we do incremental/rewrite SSA update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239567 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa.c')
-rw-r--r--gcc/ipa.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/gcc/ipa.c b/gcc/ipa.c
index 6f4693fd59a..035fb646527 100644
--- a/gcc/ipa.c
+++ b/gcc/ipa.c
@@ -1443,3 +1443,44 @@ make_pass_ipa_single_use (gcc::context *ctxt)
{
return new pass_ipa_single_use (ctxt);
}
+
+/* Materialize all clones. */
+
+namespace {
+
+const pass_data pass_data_materialize_all_clones =
+{
+ SIMPLE_IPA_PASS, /* type */
+ "materialize-all-clones", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
+ TV_IPA_OPT, /* tv_id */
+ 0, /* properties_required */
+ 0, /* properties_provided */
+ 0, /* properties_destroyed */
+ 0, /* todo_flags_start */
+ 0, /* todo_flags_finish */
+};
+
+class pass_materialize_all_clones : public simple_ipa_opt_pass
+{
+public:
+ pass_materialize_all_clones (gcc::context *ctxt)
+ : simple_ipa_opt_pass (pass_data_materialize_all_clones, ctxt)
+ {}
+
+ /* opt_pass methods: */
+ virtual unsigned int execute (function *)
+ {
+ symtab->materialize_all_clones ();
+ return 0;
+ }
+
+}; // class pass_materialize_all_clones
+
+} // anon namespace
+
+simple_ipa_opt_pass *
+make_pass_materialize_all_clones (gcc::context *ctxt)
+{
+ return new pass_materialize_all_clones (ctxt);
+}