[LLVMdev] Your question about LLVM
jo at durchholz.org
Sat Oct 8 00:24:16 PDT 2011
Am 07.10.2011 19:28, schrieb Dan Gohman:
> Translating from Java to LLVM IR and then back to Java would
> probably not be very practical.
That's not what I'm aiming for. I want
MyHLL -> MyCompiler -> MyIR1 -> MyTransformer -> MyIR2 -> Backend
Where "Backend" could be a code generator for the JVM, CLR, or something
It would be nice if I could have
... -> MyIR2 -> LLVM -> JVM/CLR/native
since that would take some passes out of MyTransformer. I'm not sure how
useful LLVM would be in such a scenario.
Essentially, my question is how much I can leverage out of LLVM (with
the usual caveats, of course - being more like Haskell than C++, I guess
LLVM isn't built for that, but it might still be worth it).
> If you're a "Java-based language designer" to begin with, and you
> want to run your programs in the JVM, it's probably best to just
> stick with Java the whole way.
I'm "Java-based" only in terms of tooling. Eclipse is just a ready-made
framework that many people know and has a lots of ready-made facilities
that I don't need to build on my own: syntax-aware editor,
Actually, the JVM has some limitations that make it less well-suited
than I'd like, but tooling trumps that.
In that scenario, a JVM backend for LLVM would be helpful - assuming
LLVM can do anything helpful in that situation. (It's just occurring to
me that code reordering might make LLVM-generated JVM bytecode harder to
More information about the llvm-dev