Does anyone know how this compares with the JVM? I know that there is a java front-end for LLVM, but I haven't seen much comparison information (to be honest, haven't looked that hard either)
Can this be a good way to get (for example) Java code to interact with .net code?
Get cross platform compatibility?
I may not be the smartest in this area, but can't seem to get a grasp on exactly why LLVM is so great, and what it enables compared to (for example) the JVM.
LLVM is a good deal lower-level than the JVM. It lets you build representations of a program in an internal representation that's higher-level than assembly but doesn't limit you as much as the JVM; for example, it doesn't come with a built-in garbage collector and allows tail-call optimization. LLVM makes a great compiler back-end, does a bunch of optimizations, and can be used at runtime to do on-the-fly compilation.
Once VMKit is more stable, it'll be able to run Java code and .NET code on the same LLVM-based VM, which is nice.
LLVM supports a bunch of different processors and platforms as backends. If you're writing a compiler, this is a godsend.
LLVM's intermediate representation is more low-level than JVM bytecode and provides no safety guarantees, allowing it to be used for any language including C. LLVM does not provide a language runtime, garbage collector, or JIT compiler. In fact, its principal use right now is as the backend of ahead-of-time compilers like GCC and Clang.
What LLVM does provide is a bunch of optimizers that operate on LLVM IR, and a bunch of code generators that take LLVM IR and spit out machine code for different CPUs. Traditionally these things have been inseparable parts of a larger monolithic codebase (e.g. GCC). Compiler writers can now reuse LLVM's optimizers and code generators instead of writing their own, and instead focus on the frontend parts where all the interesting language features live.
Clang is currently the most active LLVM project, but it is hardly the fundamental purpose of LLVM. It's just that C happens to be both the most widely used language in the world and the one that Apple has the most interest in backing.
Can this be a good way to get (for example) Java code to interact with .net code? Get cross platform compatibility?
I may not be the smartest in this area, but can't seem to get a grasp on exactly why LLVM is so great, and what it enables compared to (for example) the JVM.