feat: jp ctx extender after lambda lifting

This commit is contained in:
Henrik Böving 2022-10-29 13:20:36 +02:00 committed by Leonardo de Moura
parent 8b9fe9b6c2
commit 00e3004ce5
2 changed files with 4 additions and 3 deletions

View file

@ -612,8 +612,8 @@ builtin_initialize
def Decl.extendJoinPointContext (decl : Decl) : CompilerM Decl := do
JoinPointContextExtender.extend decl
def extendJoinPointContext : Pass :=
.mkPerDeclaration `extendJoinPointContext Decl.extendJoinPointContext .mono
def extendJoinPointContext (occurrence : Nat := 0) (phase := Phase.mono) (_h : phase ≠ .base := by simp): Pass :=
.mkPerDeclaration `extendJoinPointContext Decl.extendJoinPointContext phase (occurrence := occurrence)
builtin_initialize
registerTraceClass `Compiler.extendJoinPointContext (inherited := true)

View file

@ -59,13 +59,14 @@ def builtinPassManager : PassManager := {
toMono,
simp (occurrence := 3) (phase := .mono),
reduceJpArity (phase := .mono),
extendJoinPointContext,
extendJoinPointContext (phase := .mono) (occurrence := 0),
floatLetIn (phase := .mono) (occurrence := 1),
reduceArity,
commonJoinPointArgs,
simp (occurrence := 4) (phase := .mono),
floatLetIn (phase := .mono) (occurrence := 2),
lambdaLifting,
extendJoinPointContext (phase := .mono) (occurrence := 1),
simp (occurrence := 5) (phase := .mono),
cse (occurrence := 2) (phase := .mono),
-- TODO: reduce function arity