summaryrefslogtreecommitdiff
path: root/gcc/graphite-dependences.c
diff options
context:
space:
mode:
authorspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2011-01-25 06:45:42 +0000
committerspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2011-01-25 06:45:42 +0000
commit37578f49d3acf291943659c2274486b09503ac9b (patch)
treededeb6731552085d97b9e8f0292b1ba0568ddc95 /gcc/graphite-dependences.c
parentc4b172267e95dfb7883de9543c44f285feb38de2 (diff)
downloadgcc-37578f49d3acf291943659c2274486b09503ac9b.tar.gz
Correct the precedence relation.
2011-01-25 Sebastian Pop <sebastian.pop@amd.com> * graphite-dependences.c (build_pairwise_scheduling): Correctly compute the "a followed by b" relation and document it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@169204 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/graphite-dependences.c')
-rw-r--r--gcc/graphite-dependences.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/gcc/graphite-dependences.c b/gcc/graphite-dependences.c
index c9bd1befe53..0164129d38e 100644
--- a/gcc/graphite-dependences.c
+++ b/gcc/graphite-dependences.c
@@ -347,23 +347,28 @@ build_pairwise_scheduling (graphite_dim_t dim,
ppl_Pointset_Powerset_C_Polyhedron_t res;
ppl_Polyhedron_t equalities;
ppl_Constraint_t cstr;
+ graphite_dim_t a = pos;
+ graphite_dim_t b = pos + offset;
ppl_new_C_Polyhedron_from_space_dimension (&equalities, dim, 0);
switch (direction)
{
- case -1:
- cstr = ppl_build_relation (dim, pos, pos + offset, 1,
+ case 1:
+ /* Builds "a + 1 <= b. */
+ cstr = ppl_build_relation (dim, a, b, 1,
PPL_CONSTRAINT_TYPE_LESS_OR_EQUAL);
break;
case 0:
- cstr = ppl_build_relation (dim, pos, pos + offset, 0,
+ /* Builds "a = b. */
+ cstr = ppl_build_relation (dim, a, b, 0,
PPL_CONSTRAINT_TYPE_EQUAL);
break;
- case 1:
- cstr = ppl_build_relation (dim, pos, pos + offset, -1,
+ case -1:
+ /* Builds "a >= b + 1. */
+ cstr = ppl_build_relation (dim, a, b, -1,
PPL_CONSTRAINT_TYPE_GREATER_OR_EQUAL);
break;