[LLVMdev] Patch - big stackframes on SPU

Chris Lattner clattner at apple.com
Wed Feb 24 14:21:59 PST 2010


On Feb 22, 2010, at 6:08 AM, Kalle.Raiskila at nokia.com wrote:

> 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")

Sounds fine to me in general.  Please write a testcase for this though.  Also, this patch causes the CodeGen/CellSPU/call.ll regression test to fail.  Please investigate and send an updated patch (with a testcase), thanks!

-Chris
 
> 
> 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
> <spu_stackframes.patch>_______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev





More information about the llvm-dev mailing list