summaryrefslogtreecommitdiffstats
path: root/gcc/lambda-code.c
diff options
context:
space:
mode:
authorspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-05 16:50:47 +0000
committerspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-05 16:50:47 +0000
commit1532ec98ed8763b683bf055299ea1c213203dd88 (patch)
tree04c21f33875e763a6900f3781420822aed5db6ec /gcc/lambda-code.c
parent1da60ab0ff2214c59b6e1b8f8efe8ecee98f9811 (diff)
downloadppe42-gcc-1532ec98ed8763b683bf055299ea1c213203dd88.tar.gz
ppe42-gcc-1532ec98ed8763b683bf055299ea1c213203dd88.zip
* lambda-code.c (lambda_transform_legal_p): Use DDR_NUM_DIST_VECTS
for testing whether the data_dependence_relation contains distance vectors. Iterate over all distance vectors of the ddr. * lambda.h: Define a vec of lambda_vector pointers. * tree-data-ref.c (dump_data_dependence_relation, dump_data_dependence_direction): Iterate over all distance and direction vectors of the ddr. (initialize_data_dependence_relation): Initialize DDR_DIR_VECTS and DDR_DIST_VECTS. (build_classic_dist_vector, build_classic_dir_vector): Push a set of distance/direction vectors instead of a single one. * tree-data-ref.h (dir_vects, dist_vects): Replace dir/dist lambda_vectors with a vec of lambda_vectors. (DDR_DIR_VECT, DDR_DIST_VECT): Redefined as operations on vec. (DDR_DIR_VECTS, DDR_DIST_VECTS, DDR_NUM_DIR_VECTS, DDR_NUM_DIST_VECTS): New. * tree-loop-linear.c (gather_interchange_stats): Test for the existence of distance vectors only after having checked that there is a dependence. Iterate over all distance vectors of the ddr. (linear_transform_loops): Use dump_data_dependence_relation. * tree-vect-analyze.c (vect_analyze_data_ref_dependence): Test for distance vectors using DDR_NUM_DIST_VECTS. Iterate over all the distance vectors of the ddr. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@106530 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lambda-code.c')
-rw-r--r--gcc/lambda-code.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/gcc/lambda-code.c b/gcc/lambda-code.c
index cf995a3f9f4..2d6db22cced 100644
--- a/gcc/lambda-code.c
+++ b/gcc/lambda-code.c
@@ -2591,7 +2591,7 @@ lambda_transform_legal_p (lambda_trans_matrix trans,
int nb_loops,
varray_type dependence_relations)
{
- unsigned int i;
+ unsigned int i, j;
lambda_vector distres;
struct data_dependence_relation *ddr;
@@ -2628,15 +2628,18 @@ lambda_transform_legal_p (lambda_trans_matrix trans,
/* If the dependence could not be captured by a distance vector,
conservatively answer that the transform is not valid. */
- if (DDR_DIST_VECT (ddr) == NULL)
+ if (DDR_NUM_DIST_VECTS (ddr) == 0)
return false;
/* Compute trans.dist_vect */
- lambda_matrix_vector_mult (LTM_MATRIX (trans), nb_loops, nb_loops,
- DDR_DIST_VECT (ddr), distres);
+ for (j = 0; j < DDR_NUM_DIST_VECTS (ddr); j++)
+ {
+ lambda_matrix_vector_mult (LTM_MATRIX (trans), nb_loops, nb_loops,
+ DDR_DIST_VECT (ddr, j), distres);
- if (!lambda_vector_lexico_pos (distres, nb_loops))
- return false;
+ if (!lambda_vector_lexico_pos (distres, nb_loops))
+ return false;
+ }
}
return true;
}
OpenPOWER on IntegriCloud