@[inline]
Equations
@[inline]
Equations
@[inline]
Equations
- Lean.IR.IsLive.visitJP w x = pure (Lean.IR.HasIndex.visitJP w x)
@[inline]
Equations
@[inline]
Equations
- Lean.IR.IsLive.visitArgs w as = pure (Lean.IR.HasIndex.visitArgs w as)
@[inline]
Equations
def
Lean.IR.FnBody.hasLiveVar
(b : Lean.IR.FnBody)
(ctx : Lean.IR.LocalContext)
(x : Lean.IR.VarId)
:
Equations
- Lean.IR.FnBody.hasLiveVar b ctx x = StateT.run' (Lean.IR.IsLive.visitFnBody x.idx b) ctx
@[inline]
Equations
- Lean.IR.JPLiveVarMap = Std.RBMap Lean.IR.JoinPointId Lean.IR.LiveVarSet fun j₁ j₂ => compare j₁.idx j₂.idx
Equations
- Lean.IR.instInhabitedLiveVarSet = { default := ∅ }
Equations
- Lean.IR.mkLiveVarSet x = Std.RBTree.insert Std.RBTree.empty x
@[inline]
Equations
Equations
- Lean.IR.LiveVars.collectExpr x = match x with | Lean.IR.Expr.ctor x ys => Lean.IR.LiveVars.collectArgs ys | Lean.IR.Expr.reset x x_1 => Lean.IR.LiveVars.collectVar x_1 | Lean.IR.Expr.reuse x x_1 x_2 ys => Lean.IR.LiveVars.collectVar x ∘ Lean.IR.LiveVars.collectArgs ys | Lean.IR.Expr.proj x x_1 => Lean.IR.LiveVars.collectVar x_1 | Lean.IR.Expr.uproj x x_1 => Lean.IR.LiveVars.collectVar x_1 | Lean.IR.Expr.sproj x x_1 x_2 => Lean.IR.LiveVars.collectVar x_2 | Lean.IR.Expr.fap x ys => Lean.IR.LiveVars.collectArgs ys | Lean.IR.Expr.pap x ys => Lean.IR.LiveVars.collectArgs ys | Lean.IR.Expr.ap x ys => Lean.IR.LiveVars.collectVar x ∘ Lean.IR.LiveVars.collectArgs ys | Lean.IR.Expr.box x x_1 => Lean.IR.LiveVars.collectVar x_1 | Lean.IR.Expr.unbox x => Lean.IR.LiveVars.collectVar x | Lean.IR.Expr.lit v => Lean.IR.LiveVars.skip | Lean.IR.Expr.isShared x => Lean.IR.LiveVars.collectVar x | Lean.IR.Expr.isTaggedPtr x => Lean.IR.LiveVars.collectVar x
def
Lean.IR.LiveVars.updateJPLiveVarMap
(j : Lean.IR.JoinPointId)
(ys : Array Lean.IR.Param)
(v : Lean.IR.FnBody)
(m : Lean.IR.JPLiveVarMap)
:
Equations
- Lean.IR.updateJPLiveVarMap j ys v m = let jLiveVars := Function.comp (Lean.IR.LiveVars.bindParams ys) (Lean.IR.LiveVars.collectFnBody v m) ∅; Std.RBMap.insert m j jLiveVars
Equations
def
Lean.IR.collectLiveVars
(b : Lean.IR.FnBody)
(m : Lean.IR.JPLiveVarMap)
(v : optParam Lean.IR.LiveVarSet ∅)
:
Equations
- Lean.IR.collectLiveVars b m v = Lean.IR.LiveVars.collectFnBody b m v