]> Cypherpunks.ru repositories - gostls13.git/commitdiff
cmd/compile: remove debugging option InlineSCCOnePass from inliner
authorThan McIntosh <thanm@google.com>
Mon, 1 May 2023 19:23:42 +0000 (15:23 -0400)
committerThan McIntosh <thanm@google.com>
Thu, 11 May 2023 14:25:23 +0000 (14:25 +0000)
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>

src/cmd/compile/internal/base/debug.go
src/cmd/compile/internal/inline/inl.go

index 81e8ed645dfa8fe523337f692f0645d25b2758af..ec20b181349f7d1c0698484164120071be54d0cf 100644 (file)
@@ -32,7 +32,6 @@ type DebugFlags struct {
        InlFuncsWithClosures  int    `help:"allow functions with closures to be inlined" concurrent:"ok"`
        InlStaticInit         int    `help:"allow static initialization of inlined calls" concurrent:"ok"`
        InterfaceCycles       int    `help:"allow anonymous interface cycles"`
-       InlineSCCOnePass      int    `help:"visit SCC funcs only once during inlining (legacy behavior)"`
        Libfuzzer             int    `help:"enable coverage instrumentation for libfuzzer"`
        LoopVar               int    `help:"shared (0, default), 1 (private loop variables), 2, private + log"`
        LoopVarHash           string `help:"for debugging changes in loop behavior. Overrides experiment and loopvar flag."`
index b6949bb5ac6522971e31bba8fce8fb730b518bf2..528e96461121444616a5d39dd168c20e1b0f43b1 100644 (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 ...
-                       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.
+
+               // 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)
-                               if doInline {
-                                       InlineCalls(n, p)
-                               }
+                               InlineCalls(n, p)
                        }
                }
        })