From f02510201aff3a572f7c67fcce3ee90c127ecd76 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Thu, 18 Aug 2016 10:41:53 +0000 Subject: tree-pass.h (make_pass_materialize_all_clones): Declare. 2016-08-18 Richard Biener * 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. From-SVN: r239567 --- gcc/ipa.c | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'gcc/ipa.c') diff --git a/gcc/ipa.c b/gcc/ipa.c index 6f4693f..035fb64 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); +} -- cgit v1.1