[llvm-commits] [llvm] r85144 - in /llvm/trunk: include/llvm/LinkAllPasses.h include/llvm/Transforms/Scalar.h lib/Transforms/Scalar/GEPSplitter.cpp

Owen Anderson resistor at mac.com
Mon Oct 26 16:13:57 PDT 2009


On Oct 26, 2009, at 1:34 PM, Dan Gohman wrote:

>
> On Oct 26, 2009, at 12:58 PM, Owen Anderson wrote:
>
>>
>> On Oct 26, 2009, at 12:12 PM, Dan Gohman wrote:
>>> URL: http://llvm.org/viewvc/llvm-project?rev=85144&view=rev
>>> Log:
>>> Check in the experimental GEP splitter pass. This pass splits  
>>> complex
>>> GEPs (more than one non-zero index) into simple GEPs (at most one
>>> non-zero index).  In some simple experiments using this it's not
>>> uncommon to see 3% overall code size wins, because it exposes
>>> redundancies that can be eliminated, however it's tricky to use
>>> because instcombine aggressively undoes the work that this pass  
>>> does.
>>>
>>
>>
>> How about running it right before GVN, and letting a later  
>> instcombine
>> pass clean it up?
>
> Instcombine currently merges GEPs even when they have multiple uses,  
> so
> it defeats even this. And it's not entirely unjustified: BasicAA
> understands standalone complex GEPs better than chains of
> simple GEPs.

That seems bad.  Shouldn't it check at all of the users are themselves  
GEPs before folding?

--Owen



More information about the llvm-commits mailing list