periscop / cloog

The CLooG Code Generator in the Polyhedral Model
GNU Lesser General Public License v2.1
40 stars 23 forks source link

Missing parenthesis in generated code #8

Open periscop opened 10 years ago

periscop commented 10 years ago

(reported by Tobias Grosser) pluto compiled durbin from polybench 3.2 crashes at execution

(explanation by Uday Bondhugula) the reason is

There is a missing parenthesis in the generated code:

for (t3=t2;t3<=2_t2-1;t3++) { y[-t2+t3][t2]=y[-t2+t3][t2-1]+alpha[t2]_y[t2- -t2+t3-1][t2-1];; ^^^^^ }

since the remappings are:

k = t2 i = t3-t2

It should've been "t2- (-t2+t3)-1]

Can you quickly look at the thread above? It should make sense to you quickly. Given this, why shouldn't the remappings be not generated as:

S8(t2, (t3-t2))

instead of

S8(t2, t3-t2);

?