4 ms·
What's a good reference to get started with LLVM? I've been wanting to write an Oberon-2 compiler, but I don't know what LLVM provides, nor how I might use it
by gnuvince 9y ago
What's a good reference to get started with LLVM? I've been wanting to write an Oberon-2 compiler, but I don't know what LLVM provides, nor how I might use it from Rust.
- SolarNet 9y agoIt provides IR, low level optimization passes, native code generation, and common metadata features (e.g. for debugging). Rust probably has a library somewhere that binds to it. So you would have to write linking (with help from LLVM), ASTs, high-level optimizations and validation, garbage collection (with help from LLVM), and standard library (or link an existing one). Also intermediate IRs or ASTs you plan on using (for example Rust's MIR) and their infrastructure.