jank now has its own custom IR
21 points by jcd
21 points by jcd
So the idea is to optimise and compile to c++, which can then be optimised and compiled by llvm?
Yeah. LLVM will optimize the generated C++, but LLVM IR operates at a very low level, compared to Clojure. LLVM will not be able to eliminate extraneous var derefs, inline calls through runtime_call, fold pure jank expressions into constants, and so on. We'll do that in our IR first, so that the C++ we generate is already in a much better place. Then the rest is up to LLVM.