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

Dan Gohman gohman at apple.com
Mon Oct 26 13:34:45 PDT 2009


On Oct 26, 2009, at 12:58 PM, Owen Anderson wrote:

> 
> On Oct 26, 2009, at 12:12 PM, Dan Gohman wrote:
> 
>> Author: djg
>> Date: Mon Oct 26 14:12:14 2009
>> New Revision: 85144
>> 
>> 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.

Dan




More information about the llvm-commits mailing list