diff options
Diffstat (limited to 'src/cmd/compile/internal/ssa/deadcode.go')
| -rw-r--r-- | src/cmd/compile/internal/ssa/deadcode.go | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/cmd/compile/internal/ssa/deadcode.go b/src/cmd/compile/internal/ssa/deadcode.go index 3bd1737bab..1aa0f9e296 100644 --- a/src/cmd/compile/internal/ssa/deadcode.go +++ b/src/cmd/compile/internal/ssa/deadcode.go @@ -232,10 +232,7 @@ func deadcode(f *Func) { f.NamedValues[*name] = values[:j] } } - clearNames := f.Names[i:] - for j := range clearNames { - clearNames[j] = nil - } + clear(f.Names[i:]) f.Names = f.Names[:i] pendingLines := f.cachedLineStarts // Holds statement boundaries that need to be moved to a new value/block @@ -303,10 +300,7 @@ func deadcode(f *Func) { } } // zero remainder to help GC - tail := f.Blocks[i:] - for j := range tail { - tail[j] = nil - } + clear(f.Blocks[i:]) f.Blocks = f.Blocks[:i] } |
