0

Is it possible to integrate LLVM with JVM Runtime. I am interested in this perf optimization Azul Zing already does that but is possible to do it with Oracle's JVM or OpenJDK ?

Piyush Katariya
  • 655
  • 8
  • 11

2 Answers2

1

You simply start studying/using the graal vm.

Universal VM for a polyglot world. Our mission: Make development more productive and run programs faster anywhere.

( not to mix up with the graal compiler, a java-to-native compiler, which is already shipped with the JDK since Java 9 )

In other words: we are already on the move.

GhostCat
  • 137,827
  • 25
  • 176
  • 248
1

It is unlikely to be feasible for you to integrate LLVM with OpenJDK or Oracle JDK. (OpenJDK or Oracle JDK are pretty much the same thing anyway ... from a technical perspective.)

You would need to repeat all of the development work that the Azul team have done to get their LLVM-based compilers to work with a JVM. That is unlikely to be practical for you.

I am interested in this perf optimization Azul Zing already does that but is possible to do it with Oracle's JVM or OpenJDK ?

It may be possible1 to implement those optimizations by modifying the existing OpenJDK code-base.

GraalVM looks like another option. (What GhostCat didn't mention in his answer is that GraalVM supports LLVM-based compilers. So if you had an LLVM-based compiler for Java, you could use that as the basis for your optimizer work.)


1 - It is not clear whether Azul took the LLVM approach for technical reasons, or for licensing reasons, or both. If they took the approach of modifying the OpenJDK JIT compiler, they would be obliged to publish their source code.

Stephen C
  • 698,415
  • 94
  • 811
  • 1,216