Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is basically just saying that LLVM has an IR. While going straight from AST to machine code may sound like a great thing for compilation speed, it makes compiler maintenance really tough. Many AOT-based compilers nowadays are converging on four levels of IR, which seems to be a sweet spot. (Swift has AST, SIL, LLVM IR, MachineInstr; Rust has AST, MIR, LLVM IR, MachineInstr; GCC has AST, GENERIC, GIMPLE, RTL.)


FWIW SBCL, which is an incrementally compiled implementation of common lisp also has 4 stages:

Read, IR1, IR2, Assembly.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: