The existing implementation (codegen.ml) for code generation directly evaluates expressions by translating the constructs into OCaml functions directly. Transitioning from this to an LLVM-IR based code generation setup will lead to a good bump in the general performance of the compiler.
TODO:
- LLVM Setup: Install and set up the OCaml LLVM bindings.
- Map Expressions: Implement translation of expressions (ie. operations into llvm instructions)
- Handle Functions: Generate LLVM function definitions, argument passing, and return types.
The existing implementation (
codegen.ml) for code generation directly evaluates expressions by translating the constructs into OCaml functions directly. Transitioning from this to an LLVM-IR based code generation setup will lead to a good bump in the general performance of the compiler.TODO: