Observed big performance improvement on files containing big proofs generated using tactics.
108 lines
4.7 KiB
Text
108 lines
4.7 KiB
Text
[Compiler.elimDeadBranches] Eliminating addSomeVal._redArg with #[("val.16", Lean.Compiler.LCNF.UnreachableBranches.Value.ctor `Nat.zero #[]),
|
|
("_x.37",
|
|
Lean.Compiler.LCNF.UnreachableBranches.Value.ctor
|
|
`Option.some
|
|
#[Lean.Compiler.LCNF.UnreachableBranches.Value.ctor `Nat.zero #[]]),
|
|
("val.20", Lean.Compiler.LCNF.UnreachableBranches.Value.ctor `Nat.zero #[]),
|
|
("_x.35", Lean.Compiler.LCNF.UnreachableBranches.Value.top),
|
|
("_x.36",
|
|
Lean.Compiler.LCNF.UnreachableBranches.Value.ctor `Option.some #[Lean.Compiler.LCNF.UnreachableBranches.Value.top])]
|
|
[Compiler.elimDeadBranches] Threw away cases _x.37 branch Option.none
|
|
[Compiler.elimDeadBranches] Threw away cases _x.37 branch Option.none
|
|
[Compiler.elimDeadBranches] Eliminating addSomeVal with #[("x", Lean.Compiler.LCNF.UnreachableBranches.Value.top),
|
|
("_x.38",
|
|
Lean.Compiler.LCNF.UnreachableBranches.Value.ctor `Option.some #[Lean.Compiler.LCNF.UnreachableBranches.Value.top])]
|
|
[Compiler.elimDeadBranches] size: 11
|
|
def addSomeVal._redArg : Option Nat :=
|
|
let _x.1 := someVal._redArg;
|
|
cases _x.1 : Option Nat
|
|
| Option.none =>
|
|
⊥
|
|
| Option.some val.2 =>
|
|
let _x.3 := 0;
|
|
cases _x.1 : Option Nat
|
|
| Option.none =>
|
|
⊥
|
|
| Option.some val.4 =>
|
|
let _x.5 := 0;
|
|
let _x.6 := Nat.add _x.3 _x.5;
|
|
let _x.7 := some _ _x.6;
|
|
return _x.7
|
|
[Compiler.elimDeadBranches] size: 1
|
|
def addSomeVal x : Option Nat :=
|
|
let _x.1 := addSomeVal._redArg;
|
|
return _x.1
|
|
[Compiler.result] size: 9
|
|
def addSomeVal._redArg : Option Nat :=
|
|
let _x.1 := someVal._redArg;
|
|
cases _x.1 : Option Nat
|
|
| Option.none =>
|
|
⊥
|
|
| Option.some val.2 =>
|
|
cases _x.1 : Option Nat
|
|
| Option.none =>
|
|
⊥
|
|
| Option.some val.3 =>
|
|
let _x.4 := 0;
|
|
let _x.5 := some _ _x.4;
|
|
return _x.5
|
|
[Compiler.result] size: 1 def addSomeVal x : Option Nat := let _x.1 := addSomeVal._redArg; return _x.1
|
|
[Compiler.elimDeadBranches] Eliminating monadic with #[("_x.207",
|
|
Lean.Compiler.LCNF.UnreachableBranches.Value.ctor `Except.error #[Lean.Compiler.LCNF.UnreachableBranches.Value.top]),
|
|
("_x.211",
|
|
Lean.Compiler.LCNF.UnreachableBranches.Value.ctor `Option.some #[Lean.Compiler.LCNF.UnreachableBranches.Value.top]),
|
|
("a.208", Lean.Compiler.LCNF.UnreachableBranches.Value.top),
|
|
("a.206", Lean.Compiler.LCNF.UnreachableBranches.Value.top),
|
|
("_x.205",
|
|
Lean.Compiler.LCNF.UnreachableBranches.Value.ctor `Except.error #[Lean.Compiler.LCNF.UnreachableBranches.Value.top]),
|
|
("_x.91",
|
|
Lean.Compiler.LCNF.UnreachableBranches.Value.ctor `Except.ok #[Lean.Compiler.LCNF.UnreachableBranches.Value.top]),
|
|
("x", Lean.Compiler.LCNF.UnreachableBranches.Value.top), ("val.64", Lean.Compiler.LCNF.UnreachableBranches.Value.top),
|
|
("val.200", Lean.Compiler.LCNF.UnreachableBranches.Value.top),
|
|
("_x.212",
|
|
Lean.Compiler.LCNF.UnreachableBranches.Value.ctor `Option.some #[Lean.Compiler.LCNF.UnreachableBranches.Value.top]),
|
|
("_x.88", Lean.Compiler.LCNF.UnreachableBranches.Value.top), ("y", Lean.Compiler.LCNF.UnreachableBranches.Value.top)]
|
|
[Compiler.elimDeadBranches] Threw away cases _x.211 branch Option.none
|
|
[Compiler.elimDeadBranches] Threw away cases _x.212 branch Option.none
|
|
[Compiler.elimDeadBranches] Threw away cases _x.205 branch Except.ok
|
|
[Compiler.elimDeadBranches] size: 15
|
|
def monadic x y : Except String Nat :=
|
|
jp _jp.1 : Except String Nat :=
|
|
let _x.2 := Nat.add x y;
|
|
let _x.3 := Except.ok _ _ _x.2;
|
|
return _x.3;
|
|
let _x.4 := addSomeVal._redArg;
|
|
cases _x.4 : Except String Nat
|
|
| Option.none =>
|
|
⊥
|
|
| Option.some val.5 =>
|
|
let _x.6 := addSomeVal._redArg;
|
|
cases _x.6 : Except String Nat
|
|
| Option.none =>
|
|
⊥
|
|
| Option.some val.7 =>
|
|
let _x.8 := throwMyError val.5 val.7;
|
|
cases _x.8 : Except String Nat
|
|
| Except.error a.9 =>
|
|
let _x.10 := Except.error _ _ a.9;
|
|
return _x.10
|
|
| Except.ok a.11 =>
|
|
⊥
|
|
[Compiler.result] size: 12
|
|
def monadic x y : Except String Nat :=
|
|
let _x.1 := addSomeVal._redArg;
|
|
cases _x.1 : Except String Nat
|
|
| Option.none =>
|
|
⊥
|
|
| Option.some val.2 =>
|
|
cases _x.1 : Except String Nat
|
|
| Option.none =>
|
|
⊥
|
|
| Option.some val.3 =>
|
|
let _x.4 := throwMyError val.2 val.3;
|
|
cases _x.4 : Except String Nat
|
|
| Except.error a.5 =>
|
|
let _x.6 := Except.error _ _ a.5;
|
|
return _x.6
|
|
| Except.ok a.7 =>
|
|
⊥
|