Fix PR15293: ARM codegen ice - expected larger existing stack allocation

Stepan Dyatkovskiy stpworld at narod.ru
Sat Mar 30 00:36:51 PDT 2013


Hi,

>> [code]
>> target triple = "arm--linux-gnueabihf"
>> define void @t(i32 %a, %struct.s* byval %s, ...) nounwind {
>> define void @caller() {
>>   call void (i32, %struct.s*, ...)* @t(i32 0, %struct.s* @v, i32 777);
>>   ret void
>> }
>> [/code]
Full example is attached as test5.ll.

As prototype for case when two byval structs are used maybe something 
like this:
%struct.s = type { i32 } ; May be some packed structure
define void @t(i32 %a, %struct.s* byval %s1, %struct.s* byval %s2, ...)

I wrote very-very draft concept patch. I still have some issues in 
LowerFormalArguments part. The draft is attached also. I'll also try to 
reduce number of new methods in CCState.

-Stepan.
-------------- next part --------------
target triple = "arm--linux-gnueabihf"

%struct.s = type { [4 x i32] }
@v = constant %struct.s zeroinitializer; 

declare void @f(%struct.s* %p);

define void @t(i32 %a, %struct.s* byval %s, ...) nounwind {
entry:
  call void @f(%struct.s* %s)
  ret void
}

define void @caller() {
  call void (i32, %struct.s*, ...)* @t(i32 0, %struct.s* @v, i32 777);
  ret void
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr15293-very-draft.patch
Type: text/x-diff
Size: 16594 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130330/dfc25831/attachment.patch>


More information about the llvm-commits mailing list