[LLVMdev] Backend for the ZPU - a stack based / zero operand CPU

Chris Lattner sabre at nondot.org
Thu Jun 19 21:57:48 PDT 2008


On Jun 19, 2008, at 2:30 PM, √ėyvind Harboe wrote:
> My llvm.org knowledge is ... shallow ... but I'm hoping that
> someone would find the time & pity to answer my questions:
>
> Q: Is a stack based / zero operand CPU and llvm a good match? (GCC
> wasn't)

I'm not really sure, I'm not too familiar with these architectures.   
One advantage of llvm is that it is relatively easy to do custom code  
generation phases.  For example, you probably don't want to run the  
register allocator at all.


> Q: Should I expect better code density / performance from llvm than  
> GCC for
> said architecture?

Hard to say.  In general, LLVM has better high level optimizations  
than GCC, so if that is a factor, yes.

> Q: Can llvm help move global data into flash(i.e. determine that  
> global C
> variables are in fact constants)?

LLVM does aggressively mark globals as const when there are no stores  
to them.

-Chris



More information about the llvm-dev mailing list