aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/base/debug.go
diff options
context:
space:
mode:
authorCherry Mui <cherryyz@google.com>2022-11-01 11:40:29 -0400
committerCherry Mui <cherryyz@google.com>2022-11-02 21:06:46 +0000
commitfb4f7fdb26da9ed0fee6beab280c84b399edaa42 (patch)
tree3a57051b41e9daf1325fc95f7c9700113b06db94 /src/cmd/compile/internal/base/debug.go
parenta5b4283dfd90687d4263b38001e06bd3acf8b752 (diff)
downloadgo-fb4f7fdb26da9ed0fee6beab280c84b399edaa42.tar.xz
cmd/compile: use edge weights to decide inlineability in PGO
Currently, with PGO, the inliner uses node weights to decide if a function is inlineable (with a larger budget). But the actual inlining is determined by the weight of the call edge. There is a discrepancy that, if a callee node is hot but the call edge is not, it would not inlined, and marking the callee inlineable would of no use. Instead of using two kinds of weights, we just use the edge weights to decide inlineability. If a function is the callee of a hot call edge, its inlineability is determined with a larger threshold. For a function that exceeds the regular inlining budget, it is still inlined only when the call edge is hot, as it would exceed the regular inlining cost for non-hot call sites, even if it is marked inlineable. For #55022. Change-Id: I93fa9919fc6bcbb394e6cfe54ec96a96eede08f7 Reviewed-on: https://go-review.googlesource.com/c/go/+/447015 Run-TryBot: Cherry Mui <cherryyz@google.com> Reviewed-by: Michael Pratt <mpratt@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/base/debug.go')
-rw-r--r--src/cmd/compile/internal/base/debug.go1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/base/debug.go b/src/cmd/compile/internal/base/debug.go
index 682c0dd518..18422256ab 100644
--- a/src/cmd/compile/internal/base/debug.go
+++ b/src/cmd/compile/internal/base/debug.go
@@ -46,7 +46,6 @@ type DebugFlags struct {
WB int `help:"print information about write barriers"`
ABIWrap int `help:"print information about ABI wrapper generation"`
MayMoreStack string `help:"call named function before all stack growth checks"`
- InlineHotFuncThreshold string `help:"threshold percentage for determining functions as hot candidates for inlining"`
InlineHotCallSiteThreshold string `help:"threshold percentage for determining call sites as hot candidates for inlining"`
InlineHotBudget int `help:"inline budget for hot functions"`
PGOInline int `help:"debug profile-guided inlining"`