[llvm-commits] llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp
Chris Lattner
clattner at apple.com
Wed Mar 14 07:16:56 PDT 2007
>>>> In this case, it seems like a clearly good thing to just call
>>>> CreateFixedObject unconditionally early on (e.g.) when lowering the
>>>> arguments.
>>>>
>>>
>>> Unconditionally? I can do that, but do you mean without any check
>>> if R31
>>> is actually used as frame pointer or we're compiling for linux/ppc?
>>
>> Sorry, I meant "without a check for r31", it should still only
>> happen on linux/ppc.
>>
>
> Actually why would you like to do this when lowering the arguments?
> It's possible that
> R31 is never used in the function and calling CreateFixedObject
> unconditionnaly
> will make the stack reservation for the function at least of 4
> bytes, right? even if it doesn't
> need to.
>
> Both implementation work, but due to my small knowledge of what's
> going on in llvm :), I would
> like to follow your idea, but I don't undestand why it's better
> during arguments lowering than before callee-saved
> register scanning.
I don't understand all the constraints :). My assumption was that
the stack slot was actually in the "caller" area, not in the current
function area. If it's in the caller area, there is no problem
creating the stack slot (no space is required). If it's in the
callee area, creating the slot will unconditionally force stack to be
allocated, which *is* bad.
-chris
More information about the llvm-commits
mailing list