diff options
author | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-10-15 16:13:33 +0000 |
---|---|---|
committer | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-10-15 16:13:33 +0000 |
commit | 2e54c85da51bec4d019f0d04f391314939247df7 (patch) | |
tree | 2a696ea15c824e9308e4456e69b42c210b4e281b /gcc/lambda-code.c | |
parent | bc55e08243291d5cd3f306ae2e452fec00eb722a (diff) | |
download | gcc-2e54c85da51bec4d019f0d04f391314939247df7.tar.gz |
2008-10-15 Sebastian Pop <sebastian.pop@amd.com>
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@141141 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lambda-code.c')
-rw-r--r-- | gcc/lambda-code.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/gcc/lambda-code.c b/gcc/lambda-code.c index 2fdd898f064..1bf9ddfbf9b 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; |