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

Stepan Dyatkovskiy stpworld at narod.ru
Sat Oct 13 23:41:32 PDT 2012


Stepan Dyatkovskiy wrote:
>> 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?
> I think we should allocate size for entire parameter even if its
> contents was splitted onto regs and mem. Main point here is to set SP
> offset properly.
> ARMTargetLowering::LowerFormalArguments should be fixed in severl place
> to make it working properly. I'll present a new patch tomorrow, I hope.
>
> Try to run next example with command


> llc example.ll -mtriple=armv7-none-linux-gnueabi explode-stack.ll -o -
Sorry, I mean:
llc example.ll -mtriple=armv7-none-linux-gnueabi -o -

>
> %struct_t = type { double, double, double }
>
> declare void @f(i32);
>
> define void @explode(i32 %n0, %struct_t* byval %s0, %struct_t* byval
> %s1, %struct_t* byval %s2, %struct_t* byval %sN ) {
> entry:
>    call void (i32)* @f(i32 %n0)
>    ret void
> }
>
> You can see a lot of spam then ) Since byval regs are not reserved
> actually for fixed byval params. So stack frame for these regs allocated
> again and again, with the same offset though :-)
>
> -Stepan
>
>
>
>
>
>
>
>> Also I am not sure whether it will affect the varargs since varargs
>> and byval share the same code.
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list