From c92759978372ffc354f83e08b1dd6fa496e9b545 Mon Sep 17 00:00:00 2001 From: wangyuntao Date: Fri, 16 Jul 2021 10:29:05 +0000 Subject: [PATCH] cmd/compile: eliminate repetitive code Change-Id: I02c8b65f7c1c1606c9964ab6c54d5ab5f1b444a5 GitHub-Last-Rev: 3d740b9ac129d38981ee295456d2d7f803a79b77 GitHub-Pull-Request: golang/go#47242 Reviewed-on: https://go-review.googlesource.com/c/go/+/334990 Run-TryBot: Cuong Manh Le TryBot-Result: Go Bot Reviewed-by: Matthew Dempsky Trust: Cuong Manh Le --- src/cmd/compile/internal/ir/scc.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/cmd/compile/internal/ir/scc.go b/src/cmd/compile/internal/ir/scc.go index 2cfceaa1f62..a42951c1dda 100644 --- a/src/cmd/compile/internal/ir/scc.go +++ b/src/cmd/compile/internal/ir/scc.go @@ -116,12 +116,11 @@ func (v *bottomUpVisitor) visit(n *Func) uint32 { var i int for i = len(v.stack) - 1; i >= 0; i-- { x := v.stack[i] + v.nodeID[x] = ^uint32(0) if x == n { break } - v.nodeID[x] = ^uint32(0) } - v.nodeID[n] = ^uint32(0) block := v.stack[i:] // Run escape analysis on this set of functions. v.stack = v.stack[:i]