diff options
author | Sebastian Pop <sebastian.pop@amd.com> | 2007-10-03 15:45:10 +0000 |
---|---|---|
committer | Sebastian Pop <spop@gcc.gnu.org> | 2007-10-03 15:45:10 +0000 |
commit | 05023ea48733b2ad52d22b0e82bddf8d7b66d045 (patch) | |
tree | 2c9f40744eb2641b21f9b4f17a205bf33e0841e2 /gcc/lambda-code.c | |
parent | 9783a0510d7816b59ab3874dbd2565eb6bd93ab0 (diff) | |
download | gcc-05023ea48733b2ad52d22b0e82bddf8d7b66d045.zip gcc-05023ea48733b2ad52d22b0e82bddf8d7b66d045.tar.gz gcc-05023ea48733b2ad52d22b0e82bddf8d7b66d045.tar.bz2 |
re PR tree-optimization/33576 (segfault in extract_muldiv for cpu2006 benchmark)
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.
From-SVN: r128986
Diffstat (limited to 'gcc/lambda-code.c')
-rw-r--r-- | gcc/lambda-code.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/lambda-code.c b/gcc/lambda-code.c index c573437..84ad869 100644 --- a/gcc/lambda-code.c +++ b/gcc/lambda-code.c @@ -1639,7 +1639,7 @@ lle_to_gcc_expression (lambda_linear_expression lle, /* Remove the induction variable defined at IV_STMT. */ -static void +void remove_iv (tree iv_stmt) { if (TREE_CODE (iv_stmt) == PHI_NODE) @@ -1692,6 +1692,7 @@ void lambda_loopnest_to_gcc_loopnest (struct loop *old_loopnest, VEC(tree,heap) *old_ivs, VEC(tree,heap) *invariants, + VEC(tree,heap) **remove_ivs, lambda_loopnest new_loopnest, lambda_trans_matrix transform, struct obstack * lambda_obstack) @@ -1861,7 +1862,7 @@ lambda_loopnest_to_gcc_loopnest (struct loop *old_loopnest, } /* Remove the now unused induction variable. */ - remove_iv (oldiv_stmt); + VEC_safe_push (tree, heap, *remove_ivs, oldiv_stmt); } VEC_free (tree, heap, new_ivs); } |