summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2013-09-14 17:27:21 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2013-09-14 15:27:21 +0000
commitafdec9bd067cffe3242fe256e547dc5733006b2c (patch)
tree44cbc571bf525f510cf558c4af549858eb78da92 /gcc/tree-ssa.c
parent7b86458e38ee3c88ca4e222c85ef6fa883267315 (diff)
downloadgcc-afdec9bd067cffe3242fe256e547dc5733006b2c.tar.gz
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-ssa.c')
-rw-r--r--gcc/tree-ssa.c13
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