Bug in stride detection

5 views
Skip to first unread message

Sven Verdoolaege

unread,
Jun 1, 2012, 4:48:35 AM6/1/12
to CLooG Development
FYI,

there appears to be a bug in the stride detection in CLooG.
In particular, for the walters test case, without -strides,
the following code is generated:

$ ../cloog/cloog ~/git/isa/cloog/test/walters.cloog
/* Generated from /home/skimo/git/isa/cloog/test/walters.cloog by CLooG 0.16.3-33-g57470e7 gmp bits in 0.03s. */
S2(1,0,1,0);
S4(1,0,1,0);
S3(2,0,1,1);
S4(2,0,1,1);
for (i=3;i<=10;i++) {
if ((i+1)%3 == 0) {
S3(i,(i-2)/3,(i+1)/3,(i+1)/3);
}
if ((i+2)%3 == 0) {
S2(i,(i-1)/3,(i+2)/3,(i-1)/3);
}
if (i%3 == 0) {
S1(i,i/3,i/3,i/3);
}
div36 = floord(i,3);
div37 = ceild(2*i-3*div36-1,3);
if (div37 <= floord(i+2,3)) {
S4(i,div36,div37,i-div36-div37);
}
}

With -strides, however, this code is generated:

$ ../cloog/cloog -strides 1 ~/git/isa/cloog/test/walters.cloog
/* Generated from /home/skimo/git/isa/cloog/test/walters.cloog by CLooG 0.16.3-33-g57470e7 gmp bits in 0.04s. */
S2(1,0,1,0);
S4(1,0,1,0);
S3(2,0,1,1);
S4(2,0,1,1);
for (i=3;i<=10;i+=3) {
S1(i,i/3,i/3,i/3);
div36 = floord(i,3);
div37 = ceild(2*i-3*div36-1,3);
if (div37 <= floord(i+2,3)) {
S4(i,div36,div37,i-div36-div37);
}
}

Notice that S2 and S3 have disappeared from the loop.

I'm afraid I won't have time to investigate this problem.

skimo

Cédric Bastoul

unread,
Jun 1, 2012, 5:07:16 AM6/1/12
to sk...@kotnet.org, CLooG Development
Ouch. Thanks for the report...

Ced.


--
You got this message because you subscribed to the CLooG Development mailing list.
To send messages to this list, use cloog-de...@googlegroups.com
To stop subscribing, send a mail to cloog-developm...@googlegroups.com
For more options and to visit the group, http://groups.google.fr/group/cloog-development?hl=en

Sven Verdoolaege

unread,
Sep 9, 2012, 8:17:58 AM9/9/12
to CLooG Development
On Fri, Jun 01, 2012 at 10:48:35AM +0200, Sven Verdoolaege wrote:
> FYI,
>
> there appears to be a bug in the stride detection in CLooG.
> In particular, for the walters test case, without -strides,
> the following code is generated:
>
> $ ../cloog/cloog ~/git/isa/cloog/test/walters.cloog
> /* Generated from /home/skimo/git/isa/cloog/test/walters.cloog by CLooG 0.16.3-33-g57470e7 gmp bits in 0.03s. */

As you can see, I was using CLooG 0.17.0.
Apparently, this problem has been fixed in more recent versions of CLooG.

Sorry for the noise.

skimo
Reply all
Reply to author
Forward
0 new messages