]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: remove -d=typecheckinl flag
authorMatthew Dempsky <mdempsky@google.com>
Fri, 2 Dec 2022 00:43:05 +0000 (16:43 -0800)
committerGopher Robot <gobot@golang.org>
Thu, 26 Jan 2023 00:28:48 +0000 (00:28 +0000)
This flag forced the compiler to eagerly type check all available
inline function bodies, which presumably was useful in the early days
of implementing inlining support. However, it shouldn't have any
significance with the unified frontend, since the same code paths are
used for constructing normal function bodies as for inlining.

Updates #57410.

Change-Id: I6842cf86bcd0fbf22ac336f2fc0b7b8fe14bccca
Reviewed-on: https://go-review.googlesource.com/c/go/+/458617
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

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

index b1dc9bc211d79778a25df23a0e164d1e827f15e4..f9debd55064510b9303f6200daf49b7be6c782d1 100644 (file)
@@ -46,7 +46,6 @@ type DebugFlags struct {
        SoftFloat             int    `help:"force compiler to emit soft-float code" concurrent:"ok"`
        SyncFrames            int    `help:"how many writer stack frames to include at sync points in unified export data"`
        TypeAssert            int    `help:"print information about type assertion inlining"`
-       TypecheckInl          int    `help:"eager typechecking of inline function bodies" concurrent:"ok"`
        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" concurrent:"ok"`
index 4a37548ecc682400be06d4e2ada711f851908394..e391ae7b5a4476ff13a754d5dff283193e1dd089 100644 (file)
@@ -250,12 +250,6 @@ func Main(archInit func(*ssagen.ArchInfo)) {
        }
        typecheck.IncrementalAddrtaken = true
 
-       if base.Debug.TypecheckInl != 0 {
-               // Typecheck imported function bodies if Debug.l > 1,
-               // otherwise lazily when used or re-exported.
-               typecheck.AllImportedBodies()
-       }
-
        // Read profile file and build profile-graph and weighted-call-graph.
        base.Timer.Start("fe", "pgoprofile")
        var profile *pgo.Profile
index de25d451ebb053369c8167e69c7ffc6b74815ee4..59d97e9b0f911a515483eb8f4104522131c194b6 100644 (file)
@@ -1096,10 +1096,6 @@ func CalleeEffects(init *ir.Nodes, callee ir.Node) {
 // the inlining tree position index, for use with src.NewInliningBase
 // when rewriting positions.
 func oldInlineCall(call *ir.CallExpr, fn *ir.Func, inlIndex int) *ir.InlinedCallExpr {
-       if base.Debug.TypecheckInl == 0 {
-               typecheck.ImportedBody(fn)
-       }
-
        SSADumpInline(fn)
 
        ninit := call.Init()