[LLVMdev] global type legalization?

Chris Lattner clattner at apple.com
Wed Aug 18 11:22:01 PDT 2010


On Aug 18, 2010, at 11:13 AM, Jakob Stoklund Olesen wrote:

> 
> On Aug 18, 2010, at 9:56 AM, Chris Lattner wrote:
> 
>> Some things to consider: When the input to the zext is spilled, the reload can be folded into the zext on almost all targets, making the zext free.  When the zext *isn't* folded into a load, what you're really looking for is a code placement pass which tries to put the zexts in non-redundant (and non-partially redundant) places.
> 
> That makes sense to me, but note that this is not currently implemented. All our RISC-like targets only support folding of COPY to load/store through the target-independent mechanisms.
> 
> It should be fairly simple to add a foldMemoryOperandImpl override to ARM that folds load+zext into a zextload.

Really?  I'm pretty sure that ppc folded load into [sz]ext (with custom code).  If ARM isn't doing this, it should - it is a clear win.

-Chris



More information about the llvm-dev mailing list