-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unroll re-executes statement instances #8
Comments
Furthermore, in case of lower bounds in the scattering relation, e.g. introduced by an index-set splitting, the epilog has wrong lower bound. |
b2101c3 addresses the post-iss lower bound problem by removing all lower bounds from the epilog scattering relations. It is a hack, and I would like to have a nicer solution. |
The original problem may be related to the code generation rather than to transformation. for (i=0;i<=N-4;i++) {
if (i%3 == 0) {
foo();
}
} and for (i=0;i<=N-4;i+=3) {
foo();
} have different side effects! The value of The correct lower bound for |
Hi, yes this is true. But compilers have to handle that problem separately (just like the fact that an iterator may overflow). From CLooG's point of view they are equivalent (the problem CLooG solves to produce a code that scans all integer points inside polyhedra, once and only once, according to a specified order). Unroll in Clay is clearly using a "feature" to generate the epilog. It's not really a "polyhedral" transformation. It is dangerous and should be used only at the end of a script with the appropriate options for CLooG... |
Okay then. This bug is either wontfix or I can do more hackery to workaround it, namely introduce a statement |
ftynse@2a8e966 attempts at purely polyhedral implementation of unroll, without epilog problems. |
Example
statements instances
printf(..., 7)
andprintf(..., 8)
are executed twice: inside unrolled loop as (i+1) and (i+2) and inside epilog.Epilog statement does not have a lower bound in the loop and the unrolled loops stops incrementing too early.
The text was updated successfully, but these errors were encountered: