From 6fbad4be75e7746512bbe55794694ed788ea5c5b Mon Sep 17 00:00:00 2001 From: Keith Randall Date: Fri, 25 Jul 2025 14:15:50 -0700 Subject: [PATCH] cmd/compile: remove no-longer-necessary call to calculateDepths We now calculate depths by default, no need to ask. All calls were removed in CL 680775 when that CL was written, but an additional call appeared between then and submitting the CL. Oops. Another case for which a presubmit check would help. Fixes #74762 Change-Id: I1b70ed7f91b56e4939b4a3d0ad7a5f31fe396b4c Reviewed-on: https://go-review.googlesource.com/c/go/+/690036 LUCI-TryBot-Result: Go LUCI Reviewed-by: Dmitri Shuralyov Reviewed-by: Keith Randall Auto-Submit: Dmitri Shuralyov Reviewed-by: t hepudds --- src/cmd/compile/internal/ssa/likelyadjust.go | 2 +- src/cmd/compile/internal/ssa/looprotate.go | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/cmd/compile/internal/ssa/likelyadjust.go b/src/cmd/compile/internal/ssa/likelyadjust.go index 56238ded1e..06b9414a3f 100644 --- a/src/cmd/compile/internal/ssa/likelyadjust.go +++ b/src/cmd/compile/internal/ssa/likelyadjust.go @@ -15,7 +15,7 @@ type loop struct { // Next three fields used by regalloc and/or // aid in computation of inner-ness and list of blocks. nBlocks int32 // Number of blocks in this loop but not within inner loops - depth int16 // Nesting depth of the loop; 1 is outermost. Initialized by calculateDepths(). + depth int16 // Nesting depth of the loop; 1 is outermost. isInner bool // True if never discovered to contain a loop // True if all paths through the loop have a call. diff --git a/src/cmd/compile/internal/ssa/looprotate.go b/src/cmd/compile/internal/ssa/looprotate.go index 2b9cc67990..e97321019b 100644 --- a/src/cmd/compile/internal/ssa/looprotate.go +++ b/src/cmd/compile/internal/ssa/looprotate.go @@ -82,7 +82,6 @@ func loopRotate(f *Func) { // Order loops to rotate any child loop before adding its top block // to the parent loop's 'after' list. - loopnest.calculateDepths() loopOrder := f.Cache.allocIntSlice(len(loopnest.loops)) for i := range loopOrder { loopOrder[i] = i -- 2.51.0