aboutsummaryrefslogtreecommitdiff
path: root/gcc/lambda-code.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/lambda-code.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/lambda-code.c')
-rw-r--r--gcc/lambda-code.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/lambda-code.c b/gcc/lambda-code.c
index 1bf9ddf..794d4e8 100644
--- a/gcc/lambda-code.c
+++ b/gcc/lambda-code.c
@@ -1,5 +1,6 @@
/* Loop transformation code generation
- Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
+ Free Software Foundation, Inc.
Contributed by Daniel Berlin <dberlin@dberlin.org>
This file is part of GCC.
@@ -2682,6 +2683,7 @@ lambda_collect_parameters (VEC (data_reference_p, heap) *datarefs,
for (j = 0; j < DR_NUM_DIMENSIONS (data_reference); j++)
lambda_collect_parameters_from_af (DR_ACCESS_FN (data_reference, j),
parameter_set, parameters);
+ pointer_set_destroy (parameter_set);
}
/* Translates BASE_EXPR to vector CY. AM is needed for inferring
@@ -2792,15 +2794,13 @@ build_access_matrix (data_reference_p data_reference,
unsigned i, ndim = DR_NUM_DIMENSIONS (data_reference);
unsigned nivs = VEC_length (loop_p, nest);
unsigned lambda_nb_columns;
- lambda_vector_vec_p matrix;
AM_LOOP_NEST (am) = nest;
AM_NB_INDUCTION_VARS (am) = nivs;
AM_PARAMETERS (am) = parameters;
lambda_nb_columns = AM_NB_COLUMNS (am);
- matrix = VEC_alloc (lambda_vector, heap, lambda_nb_columns);
- AM_MATRIX (am) = matrix;
+ AM_MATRIX (am) = VEC_alloc (lambda_vector, gc, ndim);
for (i = 0; i < ndim; i++)
{
@@ -2810,7 +2810,7 @@ build_access_matrix (data_reference_p data_reference,
if (!av_for_af (access_function, access_vector, am))
return false;
- VEC_safe_push (lambda_vector, heap, matrix, access_vector);
+ VEC_quick_push (lambda_vector, AM_MATRIX (am), access_vector);
}
DR_ACCESS_MATRIX (data_reference) = am;