Common Sub-expression Elimination
- subst : Lean.Compiler.LCNF.FVarSubst
Instances For
@[reducible, inline]
Equations
Instances For
Equations
- Lean.Compiler.LCNF.CSE.instMonadFVarSubstMFalse = { getSubst := do let __do_lift ← get pure __do_lift.subst }
Equations
- One or more equations did not get rendered due to their size.
@[inline]
Equations
- Lean.Compiler.LCNF.CSE.getSubst = do let __do_lift ← get pure __do_lift.subst
Instances For
@[inline]
Equations
- Lean.Compiler.LCNF.CSE.addEntry value fvarId = modify fun (s : Lean.Compiler.LCNF.CSE.State) => { map := Lean.PersistentHashMap.insert s.map value fvarId, subst := s.subst }
Instances For
@[inline]
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Compiler.LCNF.CSE.replaceLet decl fvarId = do liftM (Lean.Compiler.LCNF.eraseLetDecl decl) Lean.Compiler.LCNF.addFVarSubst decl.fvarId fvarId
Instances For
Equations
- Lean.Compiler.LCNF.CSE.replaceFun decl fvarId = do liftM (Lean.Compiler.LCNF.eraseFunDecl decl) Lean.Compiler.LCNF.addFVarSubst decl.fvarId fvarId
Instances For
Equations
- code.cse = StateRefT'.run' (Lean.Compiler.LCNF.Code.cse.go code) { map := { root := Lean.PersistentHashMap.Node.entries Lean.PersistentHashMap.mkEmptyEntriesArray }, subst := ∅ }
Instances For
Common sub-expression elimination
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.Compiler.LCNF.cse
(phase : Lean.Compiler.LCNF.Phase := Lean.Compiler.LCNF.Phase.base)
(occurrence : Nat := 0)
:
Equations
- Lean.Compiler.LCNF.cse phase occurrence = Lean.Compiler.LCNF.Pass.mkPerDeclaration `cse Lean.Compiler.LCNF.Decl.cse phase occurrence