Common Sub-expression Elimination
@[reducible, inline]
Equations
Instances For
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
- Lean.Compiler.LCNF.Code.cse shouldElimFunDecls code = StateRefT'.run' (Lean.Compiler.LCNF.Code.cse.go shouldElimFunDecls code) { }
Instances For
def
Lean.Compiler.LCNF.cse
(phase : Phase := Phase.base)
(shouldElimFunDecls : Bool := false)
(occurrence : Nat := 0)
:
Equations
- Lean.Compiler.LCNF.cse phase shouldElimFunDecls occurrence = Lean.Compiler.LCNF.Pass.mkPerDeclaration `cse (Lean.Compiler.LCNF.Decl.cse shouldElimFunDecls) phase occurrence