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
//! IR mutation classification.
//!
//! Every optimizer pass declares a `MutationClass` — a frozen tag that says
//! *what kind of change this pass is allowed to make*. The conformance
//! harness uses the class to decide how strictly the result must match the
//! reference interpreter:
//!
//! - `Cosmetic`: re-names a local, collapses aliases. Output must match the
//! reference **byte-for-byte** on every witness input.
//! - `Structural`: reshapes the IR (CSE, DCE, node flattening) without
//! changing observable semantics. Output must match byte-for-byte.
//! - `Semantic`: may change IR observable semantics under a declared
//! precondition (e.g. fast-math reassociation assumes no NaNs). The
//! conform gate must verify the precondition holds on the witness set.
//! - `Lowering`: backend-specific emission. Output is allowed to differ in
//! shape but must satisfy every `AlgebraicLaw` declared on the op.
/// Frozen classification of IR-mutating passes.