[llvm-commits] [ARM] Extra frame for non-VA byval parameter

manman ren mren at apple.com
Wed Oct 17 11:57:11 PDT 2012


On Oct 17, 2012, at 11:50 AM, Stepan Dyatkovskiy <stpworld at narod.ru> wrote:

> We invoke VarArgsStyleRegisters for the first byval argument only. If I got right its memory part starts with ArgOffset = 0 always. I inserted assertion "VA.getLocMemOffset() == 0" at the beginning of this branch just for belaying.
> Though is there any hypotetical cases where it may fail?
What if we have lots of scalars before the first byval argument such that the first byval argument will not start at offset 0?
VARegSaveSize will probably be zero for that case, and we will fall to the else clause in VarArgsStyleRegisters.

Thanks,
Manman

> 
> -Stepan.
>> 
>> For the patch, should we pass VA.getLocMemOffset() as ArgOffset to VarArgStyleRegisters?
>> 
>> -            int FI = MFI->CreateFixedObject(Bytes,
>> -                                            VA.getLocMemOffset(), false);
>> +              VarArgStyleRegisters(CCInfo, DAG,
>> +                                   dl, Chain, CurOrigArg,
>> +                                   Ins[VA.getValNo()].PartOffset, 0);
>> 
>> Otherwise LGTM,
> 




More information about the llvm-commits mailing list