LLVM is a framework that provides:
- A higher level assembly to use.
- A backend that executes the generated LLVM assembly code on your local machine.
We will write code in our AST.hpp, that includes LLVM libraries and uses the functions and objects provided by LLVM, in order to generate LLVM assembly code. We don't need to get our hands dirty directly with x86 assembly for example. We will "translate" each node of the AST to LLVM assembly, and then LLVM will care to compile that code to an executable that is specific to our local machine architecture.
Probably, LLVM should be our next step, right after we've completed our semantic analysis (#1).
LLVM is a framework that provides:
We will write code in our
AST.hpp, that includes LLVM libraries and uses the functions and objects provided by LLVM, in order to generate LLVM assembly code. We don't need to get our hands dirty directly withx86assembly for example. We will "translate" each node of the AST to LLVM assembly, and then LLVM will care to compile that code to an executable that is specific to our local machine architecture.Probably, LLVM should be our next step, right after we've completed our semantic analysis (#1).