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

manman ren mren at apple.com
Fri Oct 12 12:24:08 PDT 2012


On Oct 9, 2012, at 12:24 PM, Stepan Dyatkovskiy <stpworld at narod.ru> wrote:

> Hi Manman,
> 
>> The stack object created in VarArgStyleRegisters is for the first part of the struct,
>> the stack object created in LowerFormalArguments is for the remainder part and these two parts do not overlap.
>> So I do not think we need dependencies between these two frames.
>> 
>> Can you attach a testing case with this patch so I can take a deeper look at this?
> 
> "byval" registers are stored in FixedStack "A". As I found FixedStack "B" is assigned to the *entire* parameter but with size of remained part. Just look at ARMTargetLowering::LowerFormalArguments, string "InVals.push_back(DAG.getFrameIndex(FI, getPointerTy()));"
> Stack object for byval registers stay alone, no farther references to it.
Hi Stepan,

As you said, the first stack object is not used further, as long as we have the correct pointer info for the stores, we should not have correctness issues?

I think it makes sense to unify the two stack objects, but should we increase the size of the first FixedStack to the entire parameter?
Also I am not sure whether it will affect the varargs since varargs and byval share the same code.

Thanks,
Manman

> 
> I try to present testcase tomorrow.
> 
> -Stepan.




More information about the llvm-commits mailing list