summaryrefslogtreecommitdiff
path: root/gcc/tree-loop-distribution.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2009-02-10 14:54:13 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2009-02-10 14:54:13 +0000
commit7cae94fcba3cc400194fdf025c4b636838d2d12d (patch)
tree3dc3892cf084cf9a20ddafc9cb440422e5bd6f08 /gcc/tree-loop-distribution.c
parenta8800687f548b183c6c28492e2ff455b606d828c (diff)
downloadgcc-7cae94fcba3cc400194fdf025c4b636838d2d12d.tar.gz
re PR tree-optimization/39132 (wrong code generated with -ftree-loop-disttribution)
2009-02-10 Richard Guenther <rguenther@suse.de> PR tree-optimization/39132 * tree-loop-distribution.c (todo): New global var. (generate_memset_zero): Trigger TODO_rebuild_alias. (tree_loop_distribution): Return todo. * gcc.dg/torture/pr39132.c: New testcase. From-SVN: r144060
Diffstat (limited to 'gcc/tree-loop-distribution.c')
-rw-r--r--gcc/tree-loop-distribution.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/tree-loop-distribution.c b/gcc/tree-loop-distribution.c
index 8eca7c02166..080eceacb55 100644
--- a/gcc/tree-loop-distribution.c
+++ b/gcc/tree-loop-distribution.c
@@ -77,6 +77,9 @@ static bitmap remaining_stmts;
predecessor a node that writes to memory. */
static bitmap upstream_mem_writes;
+/* TODOs we need to run after the pass. */
+static unsigned int todo;
+
/* Update the PHI nodes of NEW_LOOP. NEW_LOOP is a duplicate of
ORIG_LOOP. */
@@ -331,6 +334,8 @@ generate_memset_zero (gimple stmt, tree op0, tree nb_iter,
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "generated memset zero\n");
+ todo |= TODO_rebuild_alias;
+
end:
free_data_ref (dr);
return res;
@@ -1206,6 +1211,8 @@ tree_loop_distribution (void)
loop_iterator li;
int nb_generated_loops = 0;
+ todo = 0;
+
FOR_EACH_LOOP (li, loop, 0)
{
VEC (gimple, heap) *work_list = VEC_alloc (gimple, heap, 3);
@@ -1237,7 +1244,7 @@ tree_loop_distribution (void)
VEC_free (gimple, heap, work_list);
}
- return 0;
+ return todo;
}
static bool