With this update the isl AST generation extracts disjunctive constraints early
on. As a result, code that previously resulted in two branches with (close-to)
identical code within them:
if (P <= -1) {
for (int c0 = 0; c0 < N; c0 += 1)
Stmt_store(c0);
} else if (P >= 1)
for (int c0 = 0; c0 < N; c0 += 1)
Stmt_store(c0);
results now in only a single branch body:
if (P <= -1 || P >= 1)
for (int c0 = 0; c0 < N; c0 += 1)
Stmt_store(c0);
This resolves http://llvm.org/PR27559
Besides the above change, this isl update brings better simplification of
sets/maps containing existentially quantified dimensions and fixes a bug in
isl's coalescing.
llvm-svn: 272500
32 lines
956 B
C
32 lines
956 B
C
for (int c0 = 0; c0 <= 4; c0 += 1) {
|
|
if (c0 == 0) {
|
|
S_0(0, 4);
|
|
} else {
|
|
S_0(2 * c0 - 1, 1);
|
|
if (c0 == 4) {
|
|
for (int c6 = 3; c6 <= 5; c6 += 1)
|
|
S_0(7, c6);
|
|
} else {
|
|
for (int c4 = 2 * c0 - 1; c4 <= 2 * c0; c4 += 1)
|
|
for (int c6 = -2 * c0 + c4 + 4; c6 <= 2 * c0 - c4 + 4; c6 += 1)
|
|
S_0(c4, c6);
|
|
}
|
|
}
|
|
for (int c4 = max(0, 2 * c0 - 1); c4 <= min(7, 2 * c0); c4 += 1)
|
|
for (int c6 = -2 * c0 + c4 + 8; c6 <= 8; c6 += 1)
|
|
S_0(c4, c6);
|
|
if (c0 >= 1 && c0 <= 3) {
|
|
for (int c2 = 0; c2 <= 1; c2 += 1)
|
|
for (int c4 = 2 * c0 - 1; c4 <= 2 * c0; c4 += 1)
|
|
for (int c6 = 2 * c0 + 4 * c2 - c4 + 1; c6 <= -2 * c0 + 4 * c2 + c4 + 3; c6 += 1)
|
|
S_0(c4, c6);
|
|
} else if (c0 == 4) {
|
|
for (int c2 = 0; c2 <= 1; c2 += 1)
|
|
S_0(7, 4 * c2 + 2);
|
|
} else {
|
|
for (int c2 = 0; c2 <= 1; c2 += 1)
|
|
for (int c6 = 4 * c2 + 1; c6 <= 4 * c2 + 3; c6 += 1)
|
|
S_0(0, c6);
|
|
}
|
|
}
|