]> Cypherpunks.ru repositories - gostls13.git/commitdiff
cmd/compile: fix PGO line offset matching
authorCherry Mui <cherryyz@google.com>
Mon, 7 Nov 2022 23:04:58 +0000 (18:04 -0500)
committerCherry Mui <cherryyz@google.com>
Tue, 8 Nov 2022 16:35:09 +0000 (16:35 +0000)
Appears to be a typo in CL 447315.

Change-Id: I9f380a3c7521f5ac5a1d7e271eaa60bd4bbcfb29
Reviewed-on: https://go-review.googlesource.com/c/go/+/448515
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
src/cmd/compile/internal/inline/inl.go

index 2260a90d501f976c99201ebe349e053e9268ee2b..be4773ab2803e5dbd35922fddaef488c3af9233b 100644 (file)
@@ -919,7 +919,7 @@ func mkinlcall(n *ir.CallExpr, fn *ir.Func, maxCost int32, inlCalls *[]*ir.Inlin
        }
        if fn.Inl.Cost > maxCost {
                // If the callsite is hot and it is under the inlineHotMaxBudget budget, then try to inline it, or else bail.
-               lineOffset := pgo.NodeLineOffset(n, fn)
+               lineOffset := pgo.NodeLineOffset(n, ir.CurFunc)
                csi := pgo.CallSiteInfo{LineOffset: lineOffset, Caller: ir.CurFunc}
                if _, ok := candHotEdgeMap[csi]; ok {
                        if fn.Inl.Cost > inlineHotMaxBudget {