Common Sub-expression Elimination
- subst : Lean.Compiler.LCNF.FVarSubst
Instances For
@[inline]
Equations
- Lean.Compiler.LCNF.CSE.instMonadFVarSubstMFalse = { getSubst := do let a ← get pure a.subst }
Equations
- Lean.Compiler.LCNF.CSE.instMonadFVarSubstStateM = { modifySubst := fun f => modify fun s => { map := s.map, subst := f s.subst } }
@[inline]
Equations
- Lean.Compiler.LCNF.CSE.getSubst = do let a ← get pure a.subst
@[inline]
Equations
- Lean.Compiler.LCNF.CSE.addEntry value fvarId = modify fun s => { map := Lean.PersistentHashMap.insert s.map value fvarId, subst := s.subst }
@[inline]
Equations
- Lean.Compiler.LCNF.CSE.withNewScope x = do let a ← get let map : Lean.PHashMap Lean.Expr Lean.FVarId := a.map tryFinally x (modify fun s => { map := map, subst := s.subst })
Equations
- Lean.Compiler.LCNF.CSE.replaceLet decl fvarId = do liftM (Lean.Compiler.LCNF.eraseLetDecl decl) Lean.Compiler.LCNF.addFVarSubst decl.fvarId fvarId
Equations
- Lean.Compiler.LCNF.CSE.replaceFun decl fvarId = do liftM (Lean.Compiler.LCNF.eraseFunDecl decl true) Lean.Compiler.LCNF.addFVarSubst decl.fvarId fvarId
Equations
- One or more equations did not get rendered due to their size.
Common sub-expression elimination
Equations
- One or more equations did not get rendered due to their size.