pub enum CompilerPassOrder {
CanonicalOrder,
InlineFirst,
AggressiveFold,
Custom(Vec<CompilerPassId>),
}Expand description
Canonical ordering in which passes are applied during one outer iteration.
Variants§
CanonicalOrder
ConstProp → DCE → Inline → Algebraic → Rewrite
The default, well-balanced ordering. Constant folding and DCE simplify the tree before inlining; algebraic passes follow; pattern rewrites last.
InlineFirst
Inline → ConstProp → DCE → Algebraic → Rewrite
Inlining first exposes more constant sub-expressions for subsequent folding and elimination passes.
AggressiveFold
ConstProp → ConstProp → DCE → Inline → ConstProp → DCE → Rewrite
Runs constant propagation twice before elimination, then once more after inlining to catch any newly-exposed constants. Useful for deep algebraic expressions with many nested constants.
Custom(Vec<CompilerPassId>)
User-supplied pass sequence.
Implementations§
Source§impl CompilerPassOrder
impl CompilerPassOrder
Sourcepub fn to_pass_list(&self) -> Vec<CompilerPassId>
pub fn to_pass_list(&self) -> Vec<CompilerPassId>
Convert this ordering variant to the concrete list of passes to execute.
Trait Implementations§
Source§impl Clone for CompilerPassOrder
impl Clone for CompilerPassOrder
Source§fn clone(&self) -> CompilerPassOrder
fn clone(&self) -> CompilerPassOrder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more