1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//! Data flow analysis framework for SSA form.
//!
//! Provides a generic framework for classical data flow analyses:
//!
//! - **Traits**: `DataFlowAnalysis`, `DataFlowCfg`, `MeetSemiLattice`
//! - **Solver**: Worklist-based iterative fixpoint computation via `DataFlowSolver`
//! - **Analyses**: Liveness (backward), reaching definitions (forward), SCCP
//!
//! # Architecture
//!
//! ```text
//! DataFlowCfg (CFG abstraction) MeetSemiLattice (abstract domain)
//! | |
//! v v
//! DataFlowAnalysis<T> (transfer function + boundary)
//! |
//! v
//! DataFlowSolver (worklist fixpoint iteration)
//! |
//! v
//! AnalysisResults (per-block in/out states)
//! ```
//!
//! Hosts implement [`DataFlowCfg`] for their CFG type. Rassa supplies the
//! implementation for [`SsaCfg`](crate::analysis::cfg::SsaCfg).
//!
//! # Convergence
//!
//! The solver uses reverse postorder (forward) or postorder (backward) for
//! initial worklist ordering and propagates changes to successors/predecessors
//! when a block's state changes. On reducible CFGs, convergence typically
//! occurs in O(n) iterations where n is the loop nesting depth.
pub use ;
pub use ;
pub use ReachingDefinitions;
pub use ;
pub use DataFlowSolver;