[LLVMdev] LLVM stack

Gergö Barany gergo at complang.tuwien.ac.at
Fri Jun 22 04:11:47 PDT 2012


On Thu, Jun 21, 2012 at 18:19:07 +0000, amruth.rd wrote:
> Would you please send me any links to documentation on LLVM stack? I am particularly interested in knowing how each instruction in an LLVM bit code file(.ll file) affects its stack.

LLVM is not a stack-based virtual machine in the sense that the JVM is;
rather, LLVM is based on registers. In fact, LLVM is not even a virtual
machine in the sense that the JVM is. The "VM" part of "LLVM" used to stand
for "virtual machine", but it doesn't anymore.

Here's the language reference: http://llvm.org/docs/LangRef.html , but you
will not find information on an evaluation stack there because there is no
evaluation stack.

> To be specific, is it possible to map an LLVM program as operations on a stack?

You could translate LLVM assembly language into a stack-based language, if
that's what you mean. I don't think there is any existing support for that,
though.

-- 
Gergö Barany, research assistant                 gergo at complang.tuwien.ac.at
Institute of Computer Languages      http://www.complang.tuwien.ac.at/gergo/
Vienna University of Technology                       Tel: +43-1-58801-58522
Argentinierstrasse 8/E185, 1040 Wien, Austria         Fax: +43-1-58801-18598




More information about the llvm-dev mailing list