Commit 7fbb9a49 by Jan Hubicka Committed by Jan Hubicka

tree-sra.c (sra_walk_function): Don't rely on aliases being build.

	* 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

From-SVN: r121240
parent 4838bfc0
2007-01-27 Jan Hubicka <jh@suse.cz>
* 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
2007-01-27 Steven Bosscher <steven@gcc.gnu.org>
* tracer.c (rest_of_handle_tracer): We already cleaned
......
......@@ -496,6 +496,7 @@ init_optimization_passes (void)
NEXT_PASS (pass_ccp);
NEXT_PASS (pass_forwprop);
NEXT_PASS (pass_sra);
NEXT_PASS (pass_copy_prop);
NEXT_PASS (pass_merge_phi);
NEXT_PASS (pass_dce);
......
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment