Crate gruel_cfg

Crate gruel_cfg 

Source
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§

BasicBlock
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.
CfgCallArg
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.
StructDef
Definition of a struct type.
StructId
A unique identifier for a struct definition.
Type
A type in the Gruel type system.

Enums§

CfgArgMode
Argument passing mode in CFG.
CfgInstData
CFG instruction data.
PlaceBase
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.
TypeKind
The kind of a type - used for pattern matching.