Expand description
Core dataflow analysis traits.
This module provides a unified trait for both forward and backward dataflow analysis.
§Design
The DataflowAnalyzer trait provides a layered API:
- Core methods (must implement):
initial_info,merge - Transfer granularity (choose one):
- Block-level: override
transfer_blockfor coarse-grained analysis - Statement-level: override
transfer_stmt(defaulttransfer_blockiterates statements)
- Block-level: override
- Variable tracking (optional):
transfer_edge- override if tracking per-variable state
The Runner’s (backward/forward/etc) should handle control flow mechanics automatically:
- Goto with remapping/Match split: calls
transfer_edge - Call transfer block for each block in need of processing
Enums§
Traits§
- Dataflow
Analyzer - Unified analyzer trait for dataflow analysis.
Type Aliases§
- Statement
Location - Location of a lowering statement inside a block.