4 ms·
I built Yoga (a language for real-time robot control) using LLVM as the code generator in ORCJIT (on request just in time) mode. I'm pretty happy with LLVM. LL
by tlb 6y ago
I built Yoga (a language for real-time robot control) using LLVM as the code generator in ORCJIT (on request just in time) mode. I'm pretty happy with LLVM.
LLVM is well documented, and generates extremely fast code. Robot control used a lot of floating point ops, and LLVM turns it into a surprisingly small number of SSE4 instructions.
I found it easier to call the LLVM API than to generate the IR as text. But it's extremely convenient to be able to dump the result as IR. Like 80% of my debugging involved looking at IR dumps. And for really hard-core debug sessions you can hand-edit the IR, compile it, and call it from C programs.
I'm calling LLVM directly from C++, but LLVMSharp is probably the way to go if you want to work in C#.
If you use LLVM's JIT system, beware that orc::jit is about the 3rd different API and there are tutorials on the web for the previous APIs. You should probably start with LLVM 9.0.1 and ignore any tutorial not for orc::jit.
- tester756 6y agoThanks