summaryrefslogtreecommitdiff
path: root/gcc/tree-sra.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-27 22:31:19 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-27 22:31:19 +0000
commit5620e045ec3e5b0a24e059dfcfe075671acad926 (patch)
tree158356eefd36a57b644f59ad76730c4302b52876 /gcc/tree-sra.c
parent8ab9cbcc0753e0f5c0b1ed94d9f7d12b78d2b83a (diff)
downloadgcc-5620e045ec3e5b0a24e059dfcfe075671acad926.tar.gz
* tree-sra.c (sra_walk_function): Don't rely on aliases being build.
(pass_sra): Do not require alias information. * passes.c (init_optimization_passes): Add SRA git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121240 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-sra.c')
-rw-r--r--gcc/tree-sra.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index da338fc28fd..a2d28cac2c4 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -973,8 +973,9 @@ sra_walk_function (const struct sra_walk_fns *fns)
/* If the statement has no virtual operands, then it doesn't
make any structure references that we care about. */
- if (ZERO_SSA_OPERANDS (stmt, (SSA_OP_VIRTUAL_DEFS | SSA_OP_VUSE)))
- continue;
+ if (gimple_aliases_computed_p (cfun)
+ && ZERO_SSA_OPERANDS (stmt, (SSA_OP_VIRTUAL_DEFS | SSA_OP_VUSE)))
+ continue;
switch (TREE_CODE (stmt))
{
@@ -989,7 +990,9 @@ sra_walk_function (const struct sra_walk_fns *fns)
as a USE of the variable on the RHS of this assignment. */
t = TREE_OPERAND (stmt, 0);
- if (TREE_CODE (t) == GIMPLE_MODIFY_STMT)
+ if (t == NULL_TREE)
+ ;
+ else if (TREE_CODE (t) == GIMPLE_MODIFY_STMT)
sra_walk_expr (&GIMPLE_STMT_OPERAND (t, 1), &si, false, fns);
else
sra_walk_expr (&TREE_OPERAND (stmt, 0), &si, false, fns);
@@ -2374,7 +2377,7 @@ struct tree_opt_pass pass_sra =
NULL, /* next */
0, /* static_pass_number */
TV_TREE_SRA, /* tv_id */
- PROP_cfg | PROP_ssa | PROP_alias, /* properties_required */
+ PROP_cfg | PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */