]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile: fix PGO cross-package inlining
authorCherry Mui <cherryyz@google.com>
Fri, 4 Nov 2022 17:54:59 +0000 (13:54 -0400)
committerCherry Mui <cherryyz@google.com>
Fri, 4 Nov 2022 20:02:42 +0000 (20:02 +0000)
commitada9385a5fd3908243dbb514040c07a41e4806bb
treef7950adc6470b475e5ecbcff9827509b46aff513
parent0758a7d82da03d38fff8619a245f5fcb05721cf9
cmd/compile: fix PGO cross-package inlining

With CL 447015, we identify hot callees from edge weights, but
the code only traverses edges for calls from the current package.
If the callee is in a different package, when compiling that
package, the edge was not visited, so the callee was not actually
marked inline candidate. This CL fixes it by traversing all hot
edges.

Change-Id: If668c1a16ebe34e3474376b88ab3a84be76b8562
Reviewed-on: https://go-review.googlesource.com/c/go/+/448015
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