Introduction
Low Level Virtual Machine
Created by Christ Lattnew in 2003 at the University of Illinois.
BSD style license.
Design
IR: Intermediate Representation
Front end converts source code into IR.
- A lexer converts text into tokens.
- A parser loops over the tokens and creates the AST.
- AST: Abstract syntax tree. Represents the code’s structure.
- Makes it easy to develop a new language.
Middle end analyzes and optimizes.
- Multiple passes.
- Eliminates dead code.
- Performance optimizations.
- Deduplication.
- Loop unrolling (executing iterations in bulk).
- Etc.