[LLVMdev] Back End for a stack based architecture

Andrew Lenharth andrewl at lenharth.org
Wed May 16 11:04:07 PDT 2007


On 5/16/07, Giovanni Di Guardo <gdiguardo at gmail.com> wrote:
> 1) LLVM could be used to target stack based architecture

There is nothing stopping you from doing so.  Probably the common code
generation infrastructure won't work for you without extra work.  I
suspect that you could either write a custom code generator (like the
C backend) which doesn't use the common code generation stuff, or you
could fake it.  By that I mean, model your arch as a register based
arch for instruction selection, then do a post pass over it to
stackify it instead of running the normal register allocator.

Andrew



More information about the llvm-dev mailing list