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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
//! [`DirtySet<T>`] — host-supplied per-method scheduling state for fixpoint
//! iteration tracking.
//!
//! Two concepts live here:
//!
//! - **Dirty**: methods that need re-processing in the next fixpoint
//! iteration. Passes mark methods dirty when they discover new work
//! (e.g., inlining marks the caller dirty after splicing in a callee;
//! devirtualization marks both sides dirty after retargeting a call).
//! - **Processed**: methods that any pass has modified at least once
//! during the pipeline run. Hosts use this to drive downstream work
//! (e.g., CIL codegen regenerates only processed methods).
//!
//! # Concurrency
//!
//! All methods take `&self` so passes can update state in parallel
//! without acquiring `&mut`. Implementations are typically `DashSet`-backed.
//!
//! # Bypassing dirty-tracking
//!
//! Passes that declare [`SsaPass::requires_full_scan`](crate::scheduling::SsaPass::requires_full_scan)
//! bypass dirty tracking — the scheduler runs them on every method every
//! iteration regardless of dirty state.
use crateTarget;
/// Per-method scheduling state that the pass scheduler reads and writes.
///
/// Tracks two mutually exclusive sets:
/// - **Dirty set**: methods needing re-processing on the next fixpoint
/// iteration.
/// - **Processed set**: methods that have been modified at least once
/// during the current pipeline run.
///
/// Implementations are interior-mutable (typically `DashSet`-backed) so
/// passes can update state in parallel.