aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-loop-linear.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2009-01-08 17:01:42 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2009-01-08 17:01:42 +0100
commit96867bbd6f4371fbd0049504a3c3725f6abd9fcf (patch)
treebef5a692dfc16f14cd02d119206305f87c9a97ed /gcc/tree-loop-linear.c
parent68f61c3d955e3e9bb65200a27f5ea2136b7cedf7 (diff)
downloadgcc-96867bbd6f4371fbd0049504a3c3725f6abd9fcf.zip
gcc-96867bbd6f4371fbd0049504a3c3725f6abd9fcf.tar.gz
gcc-96867bbd6f4371fbd0049504a3c3725f6abd9fcf.tar.bz2
re PR tree-optimization/37031 (ICE for h264ref in gather_interchange_stats with -ftree-loop-linear)
PR tree-optimization/37031 * lambda-code.c (lambda_collect_parameters): Call pointer_set_destroy on parameter_set. (build_access_matrix): Reserve correct size for AM_MATRIX vector, allocate it using gc instead of heap, use VEC_quick_push instead of VEC_safe_push. * graphite.c (build_access_matrix): Allocate AM_MATRIX vector using gc instead of heap, use VEC_quick_push instead of VEC_safe_push. * tree-data-ref.h (struct access_matrix): Change matrix to gc allocated vector from heap allocated. * lambda.h: Add DEF_VEC_ALLOC_P for gc allocated lambda_vector. * tree-loop-linear.c (linear_transform_loops): Allocate nest vector only after perfect_loop_nest_depth call. From-SVN: r143188
Diffstat (limited to 'gcc/tree-loop-linear.c')
-rw-r--r--gcc/tree-loop-linear.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/tree-loop-linear.c b/gcc/tree-loop-linear.c
index 8b57e2a..cc2440d 100644
--- a/gcc/tree-loop-linear.c
+++ b/gcc/tree-loop-linear.c
@@ -1,5 +1,6 @@
/* Linear Loop transforms
- Copyright (C) 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009
+ Free Software Foundation, Inc.
Contributed by Daniel Berlin <dberlin@dberlin.org>.
This file is part of GCC.
@@ -334,12 +335,13 @@ linear_transform_loops (void)
lambda_trans_matrix trans;
struct obstack lambda_obstack;
struct loop *loop;
- VEC(loop_p,heap) *nest = VEC_alloc (loop_p, heap, 3);
+ VEC(loop_p,heap) *nest;
depth = perfect_loop_nest_depth (loop_nest);
if (depth == 0)
continue;
+ nest = VEC_alloc (loop_p, heap, 3);
for (loop = loop_nest; loop; loop = loop->inner)
VEC_safe_push (loop_p, heap, nest, loop);