[polly] ICE with scev-codegen after removal of RegionSimplify
Tobias Grosser
tobias at grosser.es
Fri May 24 20:06:56 PDT 2013
On 05/24/2013 01:55 PM, Sebastian Pop wrote:
> Sebastian Pop wrote:
>> Sebastian Pop wrote:
>>> Let's focus on removing independent blocks, as it creates too many problems.
>>
>> I quickly removed the independent blocks pass and it does fix the compilation of
>> Isl/CodeGen/20110226-PHI-Node-removed.ll: the only fails that I see are
>>
>> Failing Tests (2):
>> Polly :: Isl/CodeGen/20100713_2.ll
>> Polly :: Isl/CodeGen/20110226-Ignore-Dead-Code.ll
>>
>> both of these fails are ICEing after codegen verification with:
>>
>> Instruction does not dominate all uses!
>> %tmp25 = add i64 undef, 1
>> %exitcond26.old = icmp eq i64 undef, %tmp25
>>
>> We most likely fail to copy the scalar dependences for %tmp25 that probably
>> still points to the original scop or so.
>>
>
> Both fails are due to codegen splitting the control flow to version the scop:
> the definition is in one of the BBs of the original scop and the use is outside
> the scop. I think that we should get out of SSA in codegen for the scalars
> defined in the scop and used outside the scop.
>
> Another solution would be to not version the scop.
Not to version the scop is not a solution. The problem is that we may
create multiple copies of a single statement that may even change in
textual order such that the definition does not always dominate all uses.
See this somehow contrived example:
for (i = 0; i < 10; i++) {
S: a = i;
T: D[i] = a;
}
This code could be transformed into:
S: a = 0
for (i = 0; i < 9; i++) {
T: D[i] = a;
S: a = i + 1
}
T: D[9] = a;
I believe our only option is to go out of SSA during code generation.
Tobias
More information about the llvm-commits
mailing list