diff --git a/src/cmd/compile/internal/ssa/compile.go b/src/cmd/compile/internal/ssa/compile.go index 8a12ec4b86..cbef6ea645 100644 --- a/src/cmd/compile/internal/ssa/compile.go +++ b/src/cmd/compile/internal/ssa/compile.go @@ -174,7 +174,6 @@ var passes = [...]pass{ {name: "early deadcode", fn: deadcode}, // remove generated dead code to avoid doing pointless work during opt {name: "short circuit", fn: shortcircuit}, {name: "decompose user", fn: decomposeUser, required: true}, - {name: "decompose builtin", fn: decomposeBuiltIn, required: true}, {name: "opt", fn: opt, required: true}, // TODO: split required rules and optimizing rules {name: "zero arg cse", fn: zcse, required: true}, // required to merge OpSB values {name: "opt deadcode", fn: deadcode}, // remove any blocks orphaned during opt @@ -182,6 +181,7 @@ var passes = [...]pass{ {name: "phiopt", fn: phiopt}, {name: "nilcheckelim", fn: nilcheckelim}, {name: "prove", fn: prove}, + {name: "decompose builtin", fn: decomposeBuiltIn, required: true}, {name: "dec", fn: dec, required: true}, {name: "late opt", fn: opt}, // TODO: split required rules and optimizing rules {name: "generic deadcode", fn: deadcode}, @@ -234,7 +234,7 @@ var passOrder = [...]constraint{ {"generic deadcode", "tighten"}, {"generic cse", "tighten"}, // don't run optimization pass until we've decomposed builtin objects - {"decompose builtin", "opt"}, + {"decompose builtin", "late opt"}, // don't layout blocks until critical edges have been removed {"critical", "layout"}, // regalloc requires the removal of all critical edges