[LLVMdev] [PATCH] Spill Comments

Dan Gohman gohman at apple.com
Mon Sep 14 11:07:37 PDT 2009


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


> On Monday 14 September 2009 12:22, Dan Gohman wrote:
>
>> Hi Dave,
>>
>>
>>
>> On Sep 11, 2009, at 3:31 PM, David Greene wrote:
>>
>>> Attached is a patch to print asm comments for spill information.
>>>
>>> We've discussed the mechanisms before but I wanted to run the
>>>
>>> patch by everyone before I start to commit pieces.
>>>
>>
>>
>> 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.

MachineMemOperands for spill slots use FixedStack PseudoSourceValues
as their base. There's a unique FixedStack PseudoSourceValue for each
fixed frame object, so it's independent of whether frame pointer
elimination has been done, and it's independent of the actual frame
offsets.

Dan




More information about the llvm-dev mailing list