summaryrefslogtreecommitdiff
path: root/test_inputs/codegen/hoist2.c
diff options
context:
space:
mode:
authorSven Verdoolaege <skimo@kotnet.org>2013-03-12 17:23:49 +0100
committerSven Verdoolaege <skimo@kotnet.org>2013-03-19 14:34:23 +0100
commita47882c4b55df049b413b352f19920714fb316bf (patch)
tree8ace4af5dac8e3b515668dcb06194392cff857af /test_inputs/codegen/hoist2.c
parent8fc1f4d9257fa41ce788afbec0124d399d7c3196 (diff)
downloadisl-a47882c4b55df049b413b352f19920714fb316bf.tar.gz
isl-a47882c4b55df049b413b352f19920714fb316bf.tar.bz2
isl-a47882c4b55df049b413b352f19920714fb316bf.zip
isl_basic_map_lexopt: preinitialize domain
The original code would pass a universe domain to isl_basic_map_partial_lexopt, but this means that the parametric integer programming engine will consider all inequalities as splitting (with respect to the universe context), resulting in a fair amount of wasted effort. More importantly, the border constraints may be transferred to the context in the middle of constraints that actually split the context into parts with possibly different solutions. The current heuristic for merging solutions that turn out to be identical will not be able to transfer solution across the border constraints since they only allow for a solution on one side of the constraint. By prepopulating the domain with some of the constraints from the input map, we can avoid some redundant computations and we improve the opportunities for merging identical partial solutions. Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
Diffstat (limited to 'test_inputs/codegen/hoist2.c')
-rw-r--r--test_inputs/codegen/hoist2.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/test_inputs/codegen/hoist2.c b/test_inputs/codegen/hoist2.c
index 4cc0db38..4d43f4cb 100644
--- a/test_inputs/codegen/hoist2.c
+++ b/test_inputs/codegen/hoist2.c
@@ -1,5 +1,3 @@
for (int c0 = 1; c0 <= 5; c0 += 1)
- if (c0 >= 3 || c0 <= 2 || (b == 1 && t1 <= 6 && t1 + c0 <= 9))
- for (int c1 = max(t1, t1 - 64 * b + 64); c1 <= min(70, -((c0 + 1) % 2) - c0 + 73); c1 += 64)
- if ((c0 >= 3 && c0 + c1 >= 10) || (c0 <= 2 && c0 >= 1 && c1 >= 7) || (c1 == t1 && b == 1 && t1 <= 6 && t1 + c0 <= 9))
- A(c0, 64 * b + c1 - 8);
+ for (int c1 = max(t1, t1 - 64 * b + 64); c1 <= min(70, -((c0 + 1) % 2) - c0 + 73); c1 += 64)
+ A(c0, 64 * b + c1 - 8);