[LLVMdev] [PATCH] Spill Comments

Dan Gohman gohman at apple.com
Mon Sep 14 10:52:45 PDT 2009


On Sep 14, 2009, at 10:34 AM, David Greene wrote:


> On Monday 14 September 2009 12:32, David Greene wrote:
>
>
>>> The Offset->FrameIndex mapping seems rather heavy-weight, as
>>>
>>> any expense is incurred even when AsmVerbose is off.   Would it
>>>
>>> be possible to use MachineMemOperands instead? In theory,
>>>
>>> they should already be preserving the needed information.  If
>>>
>>> they're not sufficient, could they be improved?
>>>
>>
>>
>> Yeah, I'm not totally happy with that mapping either.  With
>>
>> MachineMemOperands, would that be the getOffset() method?  That's
>>
>> only for FPRel data, though.  What if frame pointer elimination has
>>
>> been run?
>>
>>
>>
>> I would love to get out from under the map if possible.
>>
>
> Are MachineMemOperands available at AsmPrinter time?  Where are they  
> stashed?

Yes. There are some places where they aren't preserved, but otherwise
they stick around for the entire CodeGen process. The places that
don't preserve them should ideally be fixed eventually.

They're available via the memoperands_begin()/memoperands_end()
MachineInstr member functions.

Dan




More information about the llvm-dev mailing list