[LLVMdev] [RFC] Remat Enhancements
Jakob Stoklund Olesen
stoklund at 2pi.dk
Mon Feb 27 09:55:41 PST 2012
On Feb 27, 2012, at 9:51 AM, David A. Greene wrote:
> dag at cray.com (David A. Greene) writes:
>
>>>> The change requires that live interval analysis be able to determine
>>>> whether and instruction is a load and whether an instruction writes to
>>>> memory.
>>>
>>> Just use MI->mayLoad(), MI->mayStore().
>>
>> Does this also account for arithmetic instructions with memops? These
>> interfaces didn't exist in 2.9.
>
> This is important because if mayLoad includes arithmetic instructions
> with source memops (which I assume it will), it is unsuitable for remat
> analysis. I don't think we want to remat general arithmetic quite yet.
> At least that's not the intent of my change. I'll need some way to
> identify "real" loads and I don't know of any other way other than
> listing opcodes. Ideas?
The target sets the isRematerializable bit on opcodes that are suitable for remat. That should be sufficient.
You should also check the 'canFoldAsLoad' mechanism.
/jakob
More information about the llvm-dev
mailing list