[LLVMdev] issues with my DYNAMIC_STACKALLOC impl

Villmow, Micah Micah.Villmow at amd.com
Mon Jan 12 08:26:45 PST 2009


I have a very simple kernel that exposes a bug in the backend I am
working on and I cannot figure out how to fix the problem. I've narrowed
down the issue to be with dynamic stack allocation. The problem I am
having is that if I declare a variable inside of the loop, the code that
my backend generates produces incorrect results; however, if I move this
declaration outside of the loop the generated code works correctly.

I've attached the two files two files.

My backend does not have a stack pointer and no memory allocations. So I
really can't use any of the approaches of the currently implemented
backends. What I would like to do is to just turn all of the stack
allocations into register moves to virtual registers. Any tips or hints
would be greatly appreciated.

 

Thanks, 

 

Micah Villmow

Systems Engineer

Advanced Technology & Performance

Advanced Micro Devices Inc.

S1-609 One AMD Place

Sunnyvale, CA. 94085

P: 408-749-3966

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090112/b364f607/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: a-bad.ll
Type: application/octet-stream
Size: 5131 bytes
Desc: a-bad.ll
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090112/b364f607/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: a-good.ll
Type: application/octet-stream
Size: 5131 bytes
Desc: a-good.ll
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090112/b364f607/attachment-0001.obj>


More information about the llvm-dev mailing list