summaryrefslogtreecommitdiff
path: root/gcc/tree-loop-linear.c
diff options
context:
space:
mode:
authorspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2007-10-03 15:45:10 +0000
committerspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2007-10-03 15:45:10 +0000
commit5aaf9e3934432b01b5e05476e88a00d125cb6068 (patch)
tree2c9f40744eb2641b21f9b4f17a205bf33e0841e2 /gcc/tree-loop-linear.c
parent878d4cb14a77ee9a27c8d6653353b142977dae71 (diff)
downloadgcc-5aaf9e3934432b01b5e05476e88a00d125cb6068.tar.gz
2007-10-03 Sebastian Pop <sebastian.pop@amd.com>
PR tree-optimization/33576 * testsuite/gcc.dg/tree-ssa/pr33576.c: New. * tree-loop-linear.c (linear_transform_loops): Call remove_iv. * lambda.h (lambda_loopnest_to_gcc_loopnest): New parameter. (remove_iv): Declared. * lambda-code.c (remove_iv): Not static. (lambda_loopnest_to_gcc_loopnest): New parameter remove_ivs. Don't remove ivs there, save ivs in the buffer. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128986 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-loop-linear.c')
-rw-r--r--gcc/tree-loop-linear.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/tree-loop-linear.c b/gcc/tree-loop-linear.c
index d04045ded4f..295993f1bf9 100644
--- a/gcc/tree-loop-linear.c
+++ b/gcc/tree-loop-linear.c
@@ -253,7 +253,10 @@ linear_transform_loops (void)
loop_iterator li;
VEC(tree,heap) *oldivs = NULL;
VEC(tree,heap) *invariants = NULL;
+ VEC(tree,heap) *remove_ivs = VEC_alloc (tree, heap, 3);
struct loop *loop_nest;
+ tree oldiv_stmt;
+ unsigned i;
FOR_EACH_LOOP (li, loop_nest, 0)
{
@@ -351,6 +354,7 @@ linear_transform_loops (void)
}
lambda_loopnest_to_gcc_loopnest (loop_nest, oldivs, invariants,
+ &remove_ivs,
after, trans, &lambda_obstack);
modified = true;
@@ -363,8 +367,12 @@ linear_transform_loops (void)
free_data_refs (datarefs);
}
+ for (i = 0; VEC_iterate (tree, remove_ivs, i, oldiv_stmt); i++)
+ remove_iv (oldiv_stmt);
+
VEC_free (tree, heap, oldivs);
VEC_free (tree, heap, invariants);
+ VEC_free (tree, heap, remove_ivs);
scev_reset ();
if (modified)