mirror of git://gcc.gnu.org/git/gcc.git
tree-pass.h (make_pass_materialize_all_clones): Declare.
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. From-SVN: r239567
This commit is contained in:
parent
9c62c87358
commit
f02510201a
|
|
@ -1,3 +1,17 @@
|
||||||
|
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.
|
||||||
|
|
||||||
2016-08-18 Richard Biener <rguenther@suse.de>
|
2016-08-18 Richard Biener <rguenther@suse.de>
|
||||||
|
|
||||||
PR tree-optimization/77282
|
PR tree-optimization/77282
|
||||||
|
|
|
||||||
|
|
@ -2435,7 +2435,6 @@ symbol_table::compile (void)
|
||||||
fprintf (stderr, "Assembling functions:\n");
|
fprintf (stderr, "Assembling functions:\n");
|
||||||
symtab_node::checking_verify_symtab_nodes ();
|
symtab_node::checking_verify_symtab_nodes ();
|
||||||
|
|
||||||
materialize_all_clones ();
|
|
||||||
bitmap_obstack_initialize (NULL);
|
bitmap_obstack_initialize (NULL);
|
||||||
execute_ipa_pass_list (g->get_passes ()->all_late_ipa_passes);
|
execute_ipa_pass_list (g->get_passes ()->all_late_ipa_passes);
|
||||||
bitmap_obstack_release (NULL);
|
bitmap_obstack_release (NULL);
|
||||||
|
|
|
||||||
41
gcc/ipa.c
41
gcc/ipa.c
|
|
@ -1443,3 +1443,44 @@ make_pass_ipa_single_use (gcc::context *ctxt)
|
||||||
{
|
{
|
||||||
return new pass_ipa_single_use (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);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -167,6 +167,7 @@ along with GCC; see the file COPYING3. If not see
|
||||||
passes are executed after partitioning and thus see just parts of the
|
passes are executed after partitioning and thus see just parts of the
|
||||||
compiled unit. */
|
compiled unit. */
|
||||||
INSERT_PASSES_AFTER (all_late_ipa_passes)
|
INSERT_PASSES_AFTER (all_late_ipa_passes)
|
||||||
|
NEXT_PASS (pass_materialize_all_clones);
|
||||||
NEXT_PASS (pass_ipa_pta);
|
NEXT_PASS (pass_ipa_pta);
|
||||||
NEXT_PASS (pass_dispatcher_calls);
|
NEXT_PASS (pass_dispatcher_calls);
|
||||||
NEXT_PASS (pass_omp_simd_clone);
|
NEXT_PASS (pass_omp_simd_clone);
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@ along with GCC; see the file COPYING3. If not see
|
||||||
#include "tree-dfa.h"
|
#include "tree-dfa.h"
|
||||||
#include "tree-ssa.h"
|
#include "tree-ssa.h"
|
||||||
#include "domwalk.h"
|
#include "domwalk.h"
|
||||||
|
#include "statistics.h"
|
||||||
|
|
||||||
#define PERCENT(x,y) ((float)(x) * 100.0 / (float)(y))
|
#define PERCENT(x,y) ((float)(x) * 100.0 / (float)(y))
|
||||||
|
|
||||||
|
|
@ -3248,6 +3249,8 @@ update_ssa (unsigned update_flags)
|
||||||
OLD_SSA_NAMES. */
|
OLD_SSA_NAMES. */
|
||||||
if (bitmap_first_set_bit (new_ssa_names) >= 0)
|
if (bitmap_first_set_bit (new_ssa_names) >= 0)
|
||||||
{
|
{
|
||||||
|
statistics_counter_event (cfun, "Incremental SSA update", 1);
|
||||||
|
|
||||||
prepare_names_to_update (insert_phi_p);
|
prepare_names_to_update (insert_phi_p);
|
||||||
|
|
||||||
/* If all the names in NEW_SSA_NAMES had been marked for
|
/* If all the names in NEW_SSA_NAMES had been marked for
|
||||||
|
|
@ -3261,6 +3264,8 @@ update_ssa (unsigned update_flags)
|
||||||
/* Next, determine the block at which to start the renaming process. */
|
/* Next, determine the block at which to start the renaming process. */
|
||||||
if (cfun->gimple_df->ssa_renaming_needed)
|
if (cfun->gimple_df->ssa_renaming_needed)
|
||||||
{
|
{
|
||||||
|
statistics_counter_event (cfun, "Symbol to SSA rewrite", 1);
|
||||||
|
|
||||||
/* If we rename bare symbols initialize the mapping to
|
/* If we rename bare symbols initialize the mapping to
|
||||||
auxiliar info we need to keep track of. */
|
auxiliar info we need to keep track of. */
|
||||||
var_infos = new hash_table<var_info_hasher> (47);
|
var_infos = new hash_table<var_info_hasher> (47);
|
||||||
|
|
|
||||||
|
|
@ -504,6 +504,8 @@ extern ipa_opt_pass_d *make_pass_ipa_profile (gcc::context *ctxt);
|
||||||
extern ipa_opt_pass_d *make_pass_ipa_cdtor_merge (gcc::context *ctxt);
|
extern ipa_opt_pass_d *make_pass_ipa_cdtor_merge (gcc::context *ctxt);
|
||||||
extern ipa_opt_pass_d *make_pass_ipa_single_use (gcc::context *ctxt);
|
extern ipa_opt_pass_d *make_pass_ipa_single_use (gcc::context *ctxt);
|
||||||
extern ipa_opt_pass_d *make_pass_ipa_comdats (gcc::context *ctxt);
|
extern ipa_opt_pass_d *make_pass_ipa_comdats (gcc::context *ctxt);
|
||||||
|
extern simple_ipa_opt_pass *make_pass_materialize_all_clones (gcc::context *
|
||||||
|
ctxt);
|
||||||
|
|
||||||
extern gimple_opt_pass *make_pass_cleanup_cfg_post_optimizing (gcc::context
|
extern gimple_opt_pass *make_pass_cleanup_cfg_post_optimizing (gcc::context
|
||||||
*ctxt);
|
*ctxt);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue