> With just C++ code, Sven can help little. He has no knowledge about graphite > internals.
I want to ask him about correctness of ISL ASTs generated from mentioned isl_codegens. > Do you now have a setup where you can just compile one of the attached files > with graphite and everything else without and the code crashes? No, I don't. As I mentioned earlier, all the files from this test case individually produce object files which linked into the one executable, which cause “Segmentation fault (core dumped)” (It'll cause “Segmentation fault (core dumped)”, if we try to run it). I think that it's very difficult to detach the code, which would produce the executable and save the semantics of this big OOP project. Furthermore, there is a possibility that the detached code can produce no new useful information. I've found that if we try to compile any of the btCollisionWorld.cpp, btCollisionDispatcher.cpp and btDiscreteDynamicsWorld.llvm.cpp by modified Graphite, the produced object file will lead to creation of the wrong executable (after linking with other object files generated by origin Graphite). That's why I think that we could consider only, for example, btCollisionDispatcher.cpp. It contains only one scope, which is incorrectly processed by Graphite with the ISL code generator as the main generator. > Why did you provide two files. I assume one should be sufficient to > reproduce the crash, no? I've detached the code, which is used by Graphite to produce similar AST's. > I think for the one file you choose, it would be interesting to look > at the code generation input as well as the kernels generated by CLooG and > isl. Maybe we can understand what is going on. What do you mean by the kernels generated by CLooG and isl? btCollisionDispatcher.cpp: isl_codegen: [P_2, P_11] -> { S_6[i0] -> [0, i0, 0] : exists (e0 = floor((-1 + P_2)/4294967296), e1 = floor((P_11 + 8i0)/18446744073709551616): i0 >= 0 and 4294967296e0 <= -1 + P_2 and 4294967296e0 >= -4294967296 + P_2 and 4294967296e0 <= -1 + P_2 - i0 and i0 <= 2147483646 and 18446744073709551616e1 >= -18446744073709551615 + P_11 + 8i0 and 18446744073709551616e1 <= -1 + P_11 + 8i0) } [P_2, P_11] -> { : exists (e0 = floor((-1 + P_2)/4294967296): 4294967296e0 <= -1 + P_2 and 4294967296e0 >= -2147483647 + P_2 and P_2 >= -2147483648 and P_2 <= 2147483647 and P_11 >= 0 and P_11 <= 18446744073709551615) } [P_2, P_11] -> { [i0, i1, i2] -> separate[o0] } ISL AST generated by ISL: for (int c1 = 0; c1 < P_2; c1 += 1) if ((P_11 + 8 * c1) % 18446744073709551616 >= 1) S_6(c1); cloog_input: # CLooG -> CLooG # This is an automatic dump of a CLooG input file from a CloogInput data # structure. # Language: C c # Context: 1 4 4 0 0 0 2 1 1 0 -1 1 -1 0 2147483647 1 0 -1 18446744073709551615 1 0 1 0 1 # Parameter name(s) T_2 T_11 # Statement number: 1 # Iteration domain of statement 1 (). 1 7 7 1 0 2 2 1 1 0 0 0 0 0 1 0 -4294967296 0 1 0 -1 1 0 4294967296 0 -1 0 4294967296 1 -1 -4294967296 0 1 0 -1 1 -1 0 0 0 0 2147483646 1 -8 0 18446744073709551616 0 -1 18446744073709551615 1 8 0 -18446744073709551616 0 1 -1 0 0 0 # For future options. 1 # Iterator name(s) git_0 # --------------------- SCATTERING -------------------- 1 # Scattering functions # Scattering of statement 1 (). 1 3 8 3 1 0 2 0 0 0 1 0 0 0 0 0 0 1 0 -1 0 0 0 0 1 0 0 0 0 0 0 1 # Scattering dimension name(s) scat_0 scat_1 scat_2 CLAST generated by ClooG: if (8*T_2 >= -T_11+9) { for (scat_1=0;scat_1<=T_2-1;scat_1++) { if ((8*scat_1+T_11+18446744073709551615)%18446744073709551616 <= 18446744073709551614) { (scat_1); } } } -- Cheers, Roman Gareev.