A toolchain and compiler used to create:
- Programming language frontends
- Instruction set backends It is used in Clang
Process
- Create a Lexer to turn raw source-code text into LLVM Tokens
- Define an AST to represent code structure and token relations using LLVM API
- Create a Parser to loop over each token and fill out the AST
- Import LLVM API primatives
- Use the opt tool to optimize and generate IR
- Write an LLVM Module that takes IR as input and returns executable object code
Bibliography Pages
Concepts
- Compiler
- Interpreter
- Lexer
- Parser
- Intermediate Representation
- LLVM Virtual Registers
- LLVM Global Variables
- LLVM Constant
- LLVM Functions
- LLVM Control Flow
- LLVM dot
- LLVM lli
- LLVM as
- LLVM dis
- LLVM Unreachable Codepath
- Static Single Assignment
- LLVM opt
- LLVM Block Domination
- LLVM Intrinsics
- LLVM Module
- LLVM API
- Kaleidoscope