[LLVMdev] Patch - big stackframes on SPU
Kalle.Raiskila at nokia.com
Kalle.Raiskila at nokia.com
Mon Feb 22 06:08:56 PST 2010
Hello all,
currently the SPU backend does not handle big stack frames (>16*511
bytes) nicely. llc asserts on malformed machine instructions.
(Assertion `MI->getOperand(OpNo).isImm() && "printDFormAddr first
operand is not immediate")
E.g. the function:
define i32 @foo() nounwind {
entry:
%retval = alloca i32
%big_data = alloca [1000 x i32]
store i32 3840, i32* %retval, align 4
br label %return
return:
%retval2 = load i32* %retval
ret i32 %retval2
}
demonstrates this issue.
Attached is a patch to fix this. It
-fixes a few small errors in function prologue and epilogue insertion
-enables register scavenging for frame index elimination
and
- implements the frame index elimination for big stacks.
Patch is made against latest svn head.
best regards,
Kalle Raiskila
-------------- next part --------------
A non-text attachment was scrubbed...
Name: spu_stackframes.patch
Type: text/x-patch
Size: 5333 bytes
Desc: spu_stackframes.patch
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100222/018d292f/attachment.bin>
More information about the llvm-dev
mailing list