Documentation
Lean
.
Compiler
.
LCNF
.
CSE
Search
return to top
source
Imports
Lean.Compiler.LCNF.CompilerM
Lean.Compiler.LCNF.PassManager
Lean.Compiler.LCNF.ToExpr
Imported by
Lean
.
Compiler
.
LCNF
.
CSE
.
State
Lean
.
Compiler
.
LCNF
.
CSE
.
M
Lean
.
Compiler
.
LCNF
.
CSE
.
instMonadFVarSubstMFalse
Lean
.
Compiler
.
LCNF
.
CSE
.
instMonadFVarSubstStateM
Lean
.
Compiler
.
LCNF
.
CSE
.
getSubst
Lean
.
Compiler
.
LCNF
.
CSE
.
addEntry
Lean
.
Compiler
.
LCNF
.
CSE
.
withNewScope
Lean
.
Compiler
.
LCNF
.
CSE
.
replaceLet
Lean
.
Compiler
.
LCNF
.
CSE
.
replaceFun
Lean
.
Compiler
.
LCNF
.
Code
.
cse
Lean
.
Compiler
.
LCNF
.
Code
.
cse
.
goFunDecl
Lean
.
Compiler
.
LCNF
.
Code
.
cse
.
go
Lean
.
Compiler
.
LCNF
.
Decl
.
cse
Lean
.
Compiler
.
LCNF
.
cse
Common Sub-expression Elimination
source
structure
Lean
.
Compiler
.
LCNF
.
CSE
.
State
:
Type
map :
PHashMap
Expr
FVarId
subst :
FVarSubst
Instances For
source
@[reducible, inline]
abbrev
Lean
.
Compiler
.
LCNF
.
CSE
.
M
(
α
:
Type
)
:
Type
Equations
Instances For
source
instance
Lean
.
Compiler
.
LCNF
.
CSE
.
instMonadFVarSubstMFalse
:
MonadFVarSubst
M
false
Equations
source
instance
Lean
.
Compiler
.
LCNF
.
CSE
.
instMonadFVarSubstStateM
:
MonadFVarSubstState
M
Equations
source
@[inline]
def
Lean
.
Compiler
.
LCNF
.
CSE
.
getSubst
:
M
FVarSubst
Equations
Instances For
source
@[inline]
def
Lean
.
Compiler
.
LCNF
.
CSE
.
addEntry
(
value
:
Expr
)
(
fvarId
:
FVarId
)
:
M
Unit
Equations
Instances For
source
@[inline]
def
Lean
.
Compiler
.
LCNF
.
CSE
.
withNewScope
{
α
:
Type
}
(
x
:
M
α
)
:
M
α
Equations
Instances For
source
def
Lean
.
Compiler
.
LCNF
.
CSE
.
replaceLet
(
decl
:
LetDecl
)
(
fvarId
:
FVarId
)
:
M
Unit
Equations
Instances For
source
def
Lean
.
Compiler
.
LCNF
.
CSE
.
replaceFun
(
decl
:
FunDecl
)
(
fvarId
:
FVarId
)
:
M
Unit
Equations
Instances For
source
def
Lean
.
Compiler
.
LCNF
.
Code
.
cse
(
shouldElimFunDecls
:
Bool
)
(
code
:
Code
)
:
CompilerM
Code
Equations
Instances For
source
partial def
Lean
.
Compiler
.
LCNF
.
Code
.
cse
.
goFunDecl
(
shouldElimFunDecls
:
Bool
)
(
decl
:
FunDecl
)
:
CSE.M
FunDecl
source
partial def
Lean
.
Compiler
.
LCNF
.
Code
.
cse
.
go
(
shouldElimFunDecls
:
Bool
)
(
code
:
Code
)
:
CSE.M
Code
source
def
Lean
.
Compiler
.
LCNF
.
Decl
.
cse
(
shouldElimFunDecls
:
Bool
)
(
decl
:
Decl
)
:
CompilerM
Decl
Common sub-expression elimination
Equations
Instances For
source
def
Lean
.
Compiler
.
LCNF
.
cse
(
phase
:
Phase
:=
Phase.base
)
(
shouldElimFunDecls
:
Bool
:=
false
)
(
occurrence
:
Nat
:=
0
)
:
Pass
Equations
Instances For