▶️ How to build a compiler with LLVM and MLIR - 18 JIT Engine part 1
In this episode, I show you how I used whatever we learn about JIT and LLVM ORC to create our bare minimum engine.
In this episode, I show you how I used whatever we learn about JIT and LLVM ORC to create our bare minimum engine.
In this episode, I talk about ORC layers and how to create a custom layer to add any program representation to our LLVM based JIT engine.
Reseurces:
Videos:
In this episode, I talk about ORC layers and how to use them to create a JIT engine. We look at some the examples and layers that LLVM provides.
Reseurces:
Videos:
In this episode, I talk about high level API of ORC. The LLVM JIT library that we are using in the Serene compiler. I go through some of the examples of LLJIT and ORCv2.
Also It is funny that l can't say "MaterializationUnit", I've messed it up quite a lot :)).
Reseurces:
Videos:
In this episode I talk about the basic fundamentals that we need to know before building our own JIT engine. We are going to implement our own JIT engine in our compiler using the LLVM and MLIR APIs.
Also please excuse the lack of 1080p quality. Unfortunately, I forgot to set the output resolution to 1080p in OBS (That happens when you lose your data and configuration :P ).
I talked about what is a source manager, the LLVM's source manager and our own fork of it for the Serene compiler.
In this episode I talk about the native code generation process and linking process. I go a bit deeper on the concepts of an object file and how a linker links them together. Last but not least, I demonstrate how to generate target code out of the LLVMIR and generate an executable file.
Resources:
In this episode I talk about the "dialect lowering" concept and then I go over the actual implementation of how to lower SLIR indirectly to the LLVM dialect of MLIR.
In this episode I've talked about the basics of MLIR and LLVM's pass infrastructure. We are going to need these for the next episode when we want to lower the SLIR to LLVMIR.
Since we didn't go through the code there won't be a branch for this episode.
In this episode I talked about the basics of IR generation in MLIR and how we define the SLIR dialect using ODS and tablegen and a few operations to keep things simple.