[llvm] r209049 - Add support for combining GEPs across PHI nodes

Chandler Carruth chandlerc at google.com
Sat May 17 07:36:24 PDT 2014


Are they still failing after the followup in r209065?
 On May 17, 2014 5:41 AM, "Tobias Grosser" <tobias at grosser.es> wrote:

> On 17/05/2014 01:47, Louis Gerbarg wrote:
>
>> Author: louis
>> Date: Fri May 16 18:47:24 2014
>> New Revision: 209049
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=209049&view=rev
>> Log:
>> Add support for combining GEPs across PHI nodes
>>
>> Currently LLVM will generally merge GEPs. This allows backends to use more
>> complex addressing modes. In some cases this is not happening because
>> there
>> is PHI inbetween the two GEPs:
>>
>>    GEP1--\
>>          |-->PHI1-->GEP3
>>    GEP2--/
>>
>> This patch checks to see if GEP1 and GEP2 are similiar enough that they
>> can be
>> cloned (GEP12) in GEP3's BB, allowing GEP->GEP merging (GEP123):
>>
>>    GEP1--\                     --\                           --\
>>          |-->PHI1-->GEP3  ==>    |-->PHI2->GEP12->GEP3 == >
>>  |-->PHI2->GEP123
>>    GEP2--/                     --/                           --/
>>
>> This also breaks certain use chains that are preventing GEP->GEP merges
>> that the
>> the existing instcombine would merge otherwise.
>>
>> Tests included.
>>
>> rdar://15547484
>>
>
> After this commit, I see plenty of execution time failures (miscompiles?)
> on my LNT (clang -O3) servers:
>
> http://lab.llvm.org:8011/builders/polly-perf-O3/builds/3322
>
> Cheers,
> Tobias
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140517/85f01fd3/attachment.html>


More information about the llvm-commits mailing list