diff options
author | Jan Hubicka <jh@suse.cz> | 2013-09-14 17:27:21 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2013-09-14 15:27:21 +0000 |
commit | afdec9bd067cffe3242fe256e547dc5733006b2c (patch) | |
tree | 44cbc571bf525f510cf558c4af549858eb78da92 /gcc/tree-into-ssa.c | |
parent | 7b86458e38ee3c88ca4e222c85ef6fa883267315 (diff) | |
download | gcc-afdec9bd067cffe3242fe256e547dc5733006b2c.zip gcc-afdec9bd067cffe3242fe256e547dc5733006b2c.tar.gz gcc-afdec9bd067cffe3242fe256e547dc5733006b2c.tar.bz2 |
tree-into-ssa.c (gate_into_ssa): New.
* tree-into-ssa.c (gate_into_ssa): New.
(pass_data_build_ssa): Use it.
* cgraph.h (expand_thunk): Update prototype.
* cgraphunit.c (analyze_function): Expand thunks early.
(expand_thunk): Fix DECL_CONTEXT of reust_decl;
build proper cgraph; set in_ssa_p; clear bogus TREE_ASM_WRITTEN;
set lowered flag; do not add new function.
(assemble_thunks_and_aliases): Update.
* tree-ssa.c (gate_init_datastructures): New gate.
(pass_data_init_datastructures): Use it.
From-SVN: r202592
Diffstat (limited to 'gcc/tree-into-ssa.c')
-rw-r--r-- | gcc/tree-into-ssa.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/tree-into-ssa.c b/gcc/tree-into-ssa.c index e6e8a3a..726744d 100644 --- a/gcc/tree-into-ssa.c +++ b/gcc/tree-into-ssa.c @@ -2409,6 +2409,14 @@ rewrite_into_ssa (void) return 0; } +/* Gate for IPCP optimization. */ + +static bool +gate_into_ssa (void) +{ + /* Do nothing for funcions that was produced already in SSA form. */ + return !(cfun->curr_properties & PROP_ssa); +} namespace { @@ -2417,7 +2425,7 @@ const pass_data pass_data_build_ssa = GIMPLE_PASS, /* type */ "ssa", /* name */ OPTGROUP_NONE, /* optinfo_flags */ - false, /* has_gate */ + true, /* has_gate */ true, /* has_execute */ TV_TREE_SSA_OTHER, /* tv_id */ PROP_cfg, /* properties_required */ @@ -2435,6 +2443,7 @@ public: {} /* opt_pass methods: */ + bool gate () { return gate_into_ssa (); } unsigned int execute () { return rewrite_into_ssa (); } }; // class pass_build_ssa |