cmd/compile: remove debugging option InlineSCCOnePass from inliner

Delete the "InlineSCCOnePass" debugging flag and the inliner fallback
code that kicks in if it is used. The change it was intended to guard
has been working on tip for some time, no need for the fallback any
more.

Updates #58905.

Change-Id: I2e1dbc7640902d9402213db5ad338be03deb96c5
Reviewed-on: https://go-review.googlesource.com/c/go/+/492015
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
Than McIntosh 2023-05-01 15:23:42 -04:00
parent 3ee12d5702
commit 6b2ad9ef50
2 changed files with 8 additions and 19 deletions

View file

@ -211,25 +211,15 @@ func InlineDecls(p *pgo.Profile, decls []ir.Node, doInline bool) {
// before performing any inlining, the results are less
// sensitive to the order within the SCC (see #58905 for an
// example).
if base.Debug.InlineSCCOnePass == 0 {
// Compute inlinability for all functions in the SCC ...
// First compute inlinability for all functions in the SCC ...
for _, n := range list {
doCanInline(n, recursive, numfns)
}
// ... then make a second pass to do inlining of calls.
if doInline {
for _, n := range list {
doCanInline(n, recursive, numfns)
}
// ... then make a second pass to do inlining of calls.
if doInline {
for _, n := range list {
InlineCalls(n, p)
}
}
} else {
// Legacy ordering to make it easier to triage any bugs
// or compile time issues that might crop up.
for _, n := range list {
doCanInline(n, recursive, numfns)
if doInline {
InlineCalls(n, p)
}
InlineCalls(n, p)
}
}
})