Expand description
Control Flow Graph IR for the Gruel compiler.
This crate provides a CFG-based intermediate representation that sits between AIR (typed, structured) and X86Mir (machine-specific).
The CFG representation makes control flow explicit through basic blocks and terminators, which is essential for:
- Linear type checking
- Drop elaboration
- Liveness analysis
- Other dataflow analyses
§Pipeline
AIR (structured) → CFG (explicit control flow) → X86Mir (machine code)Re-exports§
pub use opt::OptLevel;
Modules§
- drop_
names - Shared drop-glue utilities: reachability checks and synthesized symbol names.
- opt
- Optimization level configuration for the Gruel compiler.
Structs§
- Basic
Block - A basic block in the CFG.
- BlockId
- A basic block identifier.
- Cfg
- The complete CFG for a function.
- CfgBuilder
- Builder that converts AIR to CFG.
- CfgCall
Arg - An argument in a function call.
- CfgInst
- A single CFG instruction with its metadata.
- CfgOutput
- Output from CFG construction.
- CfgValue
- A reference to a value (instruction result) in the CFG.
- Place
- A memory location that can be read from or written to.
- Struct
Def - Definition of a struct type.
- Struct
Id - A unique identifier for a struct definition.
- Type
- A type in the Gruel type system.
Enums§
- CfgArg
Mode - Argument passing mode in CFG.
- CfgInst
Data - CFG instruction data.
- Place
Base - The base of a place - where the memory location starts.
- Projection
- A projection applied to a place to reach a nested location.
- Terminator
- Block terminator - how control leaves a basic block.
- Type
Kind - The kind of a type - used for pattern matching.