Expand description
Control Flow Graph (CFG) for WebAssembly Functions
This crate provides CFG construction and analysis for WebAssembly functions, enabling proper branch target resolution and optimization.
§Key Concepts
- Basic Block: A maximal sequence of instructions with single entry and exit
- CFG Edge: Control flow from one basic block to another
- Dominance: Block A dominates B if all paths to B go through A
- Loop: A strongly connected component in the CFG
§Usage
ⓘ
use synth_cfg::{CfgBuilder, BasicBlock};
let mut builder = CfgBuilder::new();
builder.add_instruction(/* ... */);
let cfg = builder.build();Structs§
- Basic
Block - A basic block in the CFG
- Cfg
- Control Flow Graph
- CfgBuilder
- Builder for constructing CFGs
- Loop
- Loop information
Type Aliases§
- BlockId
- Block identifier