cloog_loop_merge: optionally compute simplified convex hulls.
commitdc7b724bb4412576b40c700b4458c6d38d888e4a
authorSven Verdoolaege <skimo@kotnet.org>
Tue, 9 May 2006 11:29:45 +0000 (9 13:29 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Tue, 9 May 2006 11:29:45 +0000 (9 13:29 +0200)
treeb6af1b7319ece057e7d30ac012bb27eae2c2f7ae
parentef9c098abc8b5120ad26a446f3bc0f79a0a0b4f1
cloog_loop_merge: optionally compute simplified convex hulls.

This patch add a "sh" (simple hull) option that can simplify
some constraints at the expense of evaluating the constraints
more often.
Note that this simplification only applies to code generated
without code duplication.

For example,

bash-3.00$ cat union.cloog
c

1
0 2

0

2
1
4 4
1 1 0 0
1 -1 0 10
1 0 1 0
1 0 -1 10

0 0 0

1
4 4
1 1 0 -1
1 -1 0 11
1 0 1 -5
1 0 -1 15

0 0 0

0
0
0
bash-3.00$ ../obj_i686-pc-linux-gnu/cloog -f -1 -l 2 -override union.cloog
[CLooG]WARNING: you are using -override option, be aware that the generated
                code may be incorrect.
/* Generated from union.cloog by CLooG v0.14.0 gmp bits in 0.00s. */
/* CLooG asked for 68 KBytes. */
[CLooG]INFO: 0.00s and 68KB used for code generation.
for (i=0;i<=11;i++) {
  for (j=max(0,5*i-50);j<=min(15,5*i+10);j++) {
    if ((i <= 10) && (j <= 10)) {
      S1 ;
    }
    if ((i >= 1) && (j >= 5)) {
      S2 ;
    }
  }
}
bash-3.00$ ../obj_i686-pc-linux-gnu/cloog -sh 1 -f -1 -l 2 -override union.cloog
[CLooG]WARNING: you are using -override option, be aware that the generated
                code may be incorrect.
/* Generated from union.cloog by CLooG v0.14.0 gmp bits in 0.00s. */
/* CLooG asked for 76 KBytes. */
[CLooG]INFO: 0.00s and 76KB used for code generation.
for (i=0;i<=11;i++) {
  for (j=0;j<=15;j++) {
    if ((i <= 10) && (j <= 10)) {
      S1 ;
    }
    if ((i >= 1) && (j >= 5)) {
      S2 ;
    }
  }
}
include/cloog/domain.h
include/cloog/options.h
source/domain.c
source/loop.c
source/options.c