aboutsummaryrefslogtreecommitdiff
path: root/gcc/lambda.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/lambda.h')
-rw-r--r--gcc/lambda.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/lambda.h b/gcc/lambda.h
index fc28d46..641b3bc 100644
--- a/gcc/lambda.h
+++ b/gcc/lambda.h
@@ -469,5 +469,22 @@ build_linear_expr (tree type, lambda_vector coefs, VEC (tree, heap) *ivs)
return expr;
}
+/* Returns the dependence level for a vector DIST of size LENGTH.
+ LEVEL = 0 means a lexicographic dependence, i.e. a dependence due
+ to the sequence of statements, not carried by any loop. */
+
+
+static inline unsigned
+dependence_level (lambda_vector dist_vect, int length)
+{
+ int i;
+
+ for (i = 0; i < length; i++)
+ if (dist_vect[i] != 0)
+ return i + 1;
+
+ return 0;
+}
+
#endif /* LAMBDA_H */