Expand description
rcc_cfg: MIR-style control-flow graph for the rcc C compiler.
Roughly analogous to rustc_middle::mir. The CFG is intentionally
non-SSA; SSA construction is delegated to LLVM’s mem2reg pass, which
promotes the alloca + load/store pattern we emit.
Re-exports§
pub use build::build_bodies;pub use build::BodyBuilder;pub use build::BreakCtx;pub use build::LoopCtx;pub use lower::lower_as_place;pub use lower::lower_as_rvalue;pub use lower::lower_stmt;pub use lower::LocalMap;pub use lower::LowerCx;
Modules§
- build
- HIR -> CFG lowering. Produces one
Bodyper function. - lower
- HIR expression -> CFG (
Operand/Place) lowering. - pretty
- Stable textual MIR/CFG dump.
- verify
- Release-profile CFG verifier.
Structs§
- Basic
Block - A single basic block.
- Basic
Block Id - Basic-block id within a
Body. - Body
- Per-function CFG.
- Const
- Constant operand.
- Inline
Asm - GNU inline assembly statement lowered to CFG operands and places.
- Inline
AsmInput - One inline assembly input operand.
- Inline
AsmOutput - One inline assembly output operand.
- Local
Decl - Metadata for one local slot.
- Place
- A memory location addressable by the IR.
- Statement
- One straight-line statement.
- Terminator
- Terminator for a basic block.
Enums§
- BinOp
- Binary op for the CFG (post type-checking; concrete semantics known).
- Cast
Kind - Cast kinds recognised by the backend.
- Const
Kind - Constant kinds.
- Inline
AsmArg - Operand payload passed to LLVM inline asm.
- Operand
- Operand: value used in an rvalue or terminator.
- Projection
- One step of a place projection.
- Rvalue
- Right-hand side of an assignment.
- Statement
Kind - Statement discriminant.
- Terminator
Kind - Terminator discriminant.
- UnOp
- Unary op.