This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [GSoC] Elimination of CLooG library installation dependency
- From: Roman Gareev <gareevroman at gmail dot com>
- To: Tobias Grosser <tobias at grosser dot es>
- Cc: Mircea Namolaru <mircea dot namolaru at inria dot fr>, gcc-patches at gcc dot gnu dot org
- Date: Sat, 9 Aug 2014 16:05:09 +0600
- Subject: Re: [GSoC] Elimination of CLooG library installation dependency
- Authentication-results: sourceware.org; auth=none
- References: <CABGF_gco8bbFoBD=PORcSp=Q_wQpqca2M72mRzmyRO46B0juFQ at mail dot gmail dot com> <53E24E47 dot 2090803 at grosser dot es> <CABGF_geZoaTRwfc4on8NFehEdbrjH=xFD36QyH0a8AGi01yrBA at mail dot gmail dot com> <53E3806E dot 7040903 at grosser dot es> <CABGF_gfCmbvkSmwbzH20DibgUQvCj7WFasQw1yaRSOoNTPR6hA at mail dot gmail dot com> <53E4CD87 dot 5080105 at grosser dot es> <CABGF_gfnXsQhcZ3b55Fr43kzA_9qtTeN6oHUsk3suaDQQ5B7=w at mail dot gmail dot com> <53E5D33C dot 6050800 at grosser dot es>
> 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.