diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-09-14 15:27:21 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-09-14 15:27:21 +0000 |
commit | 6e1aa353f8484d1e2ac0de630b60dac8c9c5c5ac (patch) | |
tree | 44cbc571bf525f510cf558c4af549858eb78da92 /gcc/tree-ssa.c | |
parent | a5ceabb48759ee5937184d49e1773085e63f1130 (diff) | |
download | gcc-6e1aa353f8484d1e2ac0de630b60dac8c9c5c5ac.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202592 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa.c')
-rw-r--r-- | gcc/tree-ssa.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c index 48c997d7390..461bb52e821 100644 --- a/gcc/tree-ssa.c +++ b/gcc/tree-ssa.c @@ -1084,10 +1084,20 @@ static unsigned int execute_init_datastructures (void) { /* Allocate hash tables, arrays and other structures. */ + gcc_assert (!cfun->gimple_df); init_tree_ssa (cfun); return 0; } +/* Gate for IPCP optimization. */ + +static bool +gate_init_datastructures (void) +{ + /* Do nothing for funcions that was produced already in SSA form. */ + return !(cfun->curr_properties & PROP_ssa); +} + namespace { const pass_data pass_data_init_datastructures = @@ -1095,7 +1105,7 @@ const pass_data pass_data_init_datastructures = GIMPLE_PASS, /* type */ "*init_datastructures", /* name */ OPTGROUP_NONE, /* optinfo_flags */ - false, /* has_gate */ + true, /* has_gate */ true, /* has_execute */ TV_NONE, /* tv_id */ PROP_cfg, /* properties_required */ @@ -1113,6 +1123,7 @@ public: {} /* opt_pass methods: */ + bool gate () { return gate_init_datastructures (); } unsigned int execute () { return execute_init_datastructures (); } }; // class pass_init_datastructures |