From 36174c82ee3314e97e8750909f5ff61b7dccbb1b Mon Sep 17 00:00:00 2001 From: Sebastian Pop Date: Wed, 15 Oct 2008 16:13:33 +0000 Subject: re PR tree-optimization/37686 (Building of CPU2000's bzip2 with peak flags with -mcpu=power4 fails with an ICE.) 2008-10-15 Sebastian Pop PR tree-optimization/37686 * testsuite/gcc.dg/tree-ssa/pr37686.c: New. * tree-loop-linear.c (linear_transform_loops): Build a loop nest vector. Pass it to lambda_compute_access_matrices. * tree-data-ref.h (struct access_matrix): Store the loop nest relative to which it encodes the information. (AM_LOOP_NEST_NUM): Renamed AM_LOOP_NEST. (am_vector_index_for_loop): Reimplemented: iterate over the loop nest for finding the loop index in the access matrix. (lambda_compute_access_matrices): Update declaration. * lambda-code.c (build_access_matrix): Pass the loop nest and record it. (lambda_compute_access_matrices): Same. From-SVN: r141141 --- gcc/lambda-code.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'gcc/lambda-code.c') diff --git a/gcc/lambda-code.c b/gcc/lambda-code.c index 2fdd898..1bf9ddf 100644 --- a/gcc/lambda-code.c +++ b/gcc/lambda-code.c @@ -2786,17 +2786,15 @@ av_for_af (tree access_fun, lambda_vector cy, struct access_matrix *am) static bool build_access_matrix (data_reference_p data_reference, - VEC (tree, heap) *parameters, int loop_nest_num) + VEC (tree, heap) *parameters, VEC (loop_p, heap) *nest) { struct access_matrix *am = GGC_NEW (struct access_matrix); unsigned i, ndim = DR_NUM_DIMENSIONS (data_reference); - struct loop *loop = gimple_bb (DR_STMT (data_reference))->loop_father; - struct loop *loop_nest = get_loop (loop_nest_num); - unsigned nivs = loop_depth (loop) - loop_depth (loop_nest) + 1; + unsigned nivs = VEC_length (loop_p, nest); unsigned lambda_nb_columns; lambda_vector_vec_p matrix; - AM_LOOP_NEST_NUM (am) = loop_nest_num; + AM_LOOP_NEST (am) = nest; AM_NB_INDUCTION_VARS (am) = nivs; AM_PARAMETERS (am) = parameters; @@ -2824,13 +2822,13 @@ build_access_matrix (data_reference_p data_reference, bool lambda_compute_access_matrices (VEC (data_reference_p, heap) *datarefs, VEC (tree, heap) *parameters, - int loop_nest_num) + VEC (loop_p, heap) *nest) { data_reference_p dataref; unsigned ix; for (ix = 0; VEC_iterate (data_reference_p, datarefs, ix, dataref); ix++) - if (!build_access_matrix (dataref, parameters, loop_nest_num)) + if (!build_access_matrix (dataref, parameters, nest)) return false; return true; -- cgit v1.1