[llvm-commits] [ARM] Extra frame for non-VA byval parameter
Stepan Dyatkovskiy
stpworld at narod.ru
Sat Oct 13 11:17:20 PDT 2012
> 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 -
%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.
More information about the llvm-commits
mailing list