aboutsummaryrefslogtreecommitdiff
path: root/gcc/lambda-code.c
diff options
context:
space:
mode:
authorSebastian Pop <sebastian.pop@amd.com>2008-01-16 19:26:26 +0000
committerSebastian Pop <spop@gcc.gnu.org>2008-01-16 19:26:26 +0000
commitd49c149d623262135d31abd73b2ff294c3fb3940 (patch)
treef21d819119dcaf84a89f446be25eec089e1b66bc /gcc/lambda-code.c
parenta03c6d64f468ff2aaebcf2a87bb589938264bc38 (diff)
downloadgcc-d49c149d623262135d31abd73b2ff294c3fb3940.zip
gcc-d49c149d623262135d31abd73b2ff294c3fb3940.tar.gz
gcc-d49c149d623262135d31abd73b2ff294c3fb3940.tar.bz2
lambda-code.c (lambda_transform_legal_p): Handle the case of no dependences in the dependence_relations vector.
2008-01-16 Sebastian Pop <sebastian.pop@amd.com> * lambda-code.c (lambda_transform_legal_p): Handle the case of no dependences in the dependence_relations vector. From-SVN: r131577
Diffstat (limited to 'gcc/lambda-code.c')
-rw-r--r--gcc/lambda-code.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/lambda-code.c b/gcc/lambda-code.c
index 0b67231..dc656d3 100644
--- a/gcc/lambda-code.c
+++ b/gcc/lambda-code.c
@@ -2595,11 +2595,16 @@ lambda_transform_legal_p (lambda_trans_matrix trans,
gcc_assert (LTM_COLSIZE (trans) == nb_loops
&& LTM_ROWSIZE (trans) == nb_loops);
- /* When there is an unknown relation in the dependence_relations, we
- know that it is no worth looking at this loop nest: give up. */
+ /* When there are no dependences, the transformation is correct. */
+ if (VEC_length (ddr_p, dependence_relations) == 0)
+ return true;
+
ddr = VEC_index (ddr_p, dependence_relations, 0);
if (ddr == NULL)
return true;
+
+ /* When there is an unknown relation in the dependence_relations, we
+ know that it is no worth looking at this loop nest: give up. */
if (DDR_ARE_DEPENDENT (ddr) == chrec_dont_know)
return false;