diff options
Diffstat (limited to 'src/cmd/compile/internal/ssa/lower.go')
-rw-r--r-- | src/cmd/compile/internal/ssa/lower.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/ssa/lower.go b/src/cmd/compile/internal/ssa/lower.go index 6499dc8565..6f6b885062 100644 --- a/src/cmd/compile/internal/ssa/lower.go +++ b/src/cmd/compile/internal/ssa/lower.go @@ -8,8 +8,13 @@ package ssa func lower(f *Func) { // repeat rewrites until we find no more rewrites applyRewrite(f, f.Config.lowerBlock, f.Config.lowerValue) +} - // Check for unlowered opcodes, fail if we find one. +// checkLower checks for unlowered opcodes and fails if we find one. +func checkLower(f *Func) { + // Needs to be a separate phase because it must run after both + // lowering and a subsequent dead code elimination (because lowering + // rules may leave dead generic ops behind). for _, b := range f.Blocks { for _, v := range b.Values { if opcodeTable[v.Op].generic && v.Op != OpSP && v.Op != OpSB && v.Op != OpArg && v.Op != OpCopy && v.Op != OpPhi { |