]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: eliminate -abiwraplimit
authorAustin Clements <austin@google.com>
Wed, 24 Mar 2021 17:55:31 +0000 (13:55 -0400)
committerAustin Clements <austin@google.com>
Mon, 29 Mar 2021 18:46:31 +0000 (18:46 +0000)
We haven't needed this debugging flag in a while and it's going to
complicate a change to how to generate wrappers. Eliminate it in favor
of just using the objabi.Experiment.RegabiWrappers global toggle.

Updates #40724.

Change-Id: Ieda660ea7a0167ae4e881b396ef556d7c962fe4c
Reviewed-on: https://go-review.googlesource.com/c/go/+/305273
Trust: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/compile/internal/base/flag.go
src/cmd/compile/internal/ssagen/abi.go

index 33c2c862b0c44fea62c4db887e10e7913b3ea3a5..4b7ef155a11573240162c2cbc359a924d350f84e 100644 (file)
@@ -82,7 +82,6 @@ type CmdFlags struct {
        CompilingRuntime bool "flag:\"+\" help:\"compiling runtime\""
 
        // Longer names
-       ABIWrapLimit       int          "help:\"emit at most N ABI wrappers (for debugging)\""
        AsmHdr             string       "help:\"write assembly header to `file`\""
        Bench              string       "help:\"append benchmark times to `file`\""
        BlockProfile       string       "help:\"write block profile to `file`\""
index b6137756d40703917359b5e64a148938e3f65c15..2f8678060dd0dace321670b7e1af45ccff72001e 100644 (file)
@@ -21,29 +21,6 @@ import (
        "cmd/internal/objabi"
 )
 
-// useNewABIWrapGen returns TRUE if the compiler should generate an
-// ABI wrapper for the function 'f'.
-func useABIWrapGen(f *ir.Func) bool {
-       if !objabi.Experiment.RegabiWrappers {
-               return false
-       }
-
-       // Support limit option for bisecting.
-       if base.Flag.ABIWrapLimit == 1 {
-               return false
-       }
-       if base.Flag.ABIWrapLimit < 1 {
-               return true
-       }
-       base.Flag.ABIWrapLimit--
-       if base.Debug.ABIWrap != 0 && base.Flag.ABIWrapLimit == 1 {
-               fmt.Fprintf(os.Stderr, "=-= limit reached after new wrapper for %s\n",
-                       f.LSym.Name)
-       }
-
-       return true
-}
-
 // symabiDefs and symabiRefs record the defined and referenced ABIs of
 // symbols required by non-Go code. These are keyed by link symbol
 // name, where the local package prefix is always `"".`
@@ -199,7 +176,7 @@ func selectLSym(f *ir.Func, hasBody bool) {
                }
 
                if needABIWrapper {
-                       if !useABIWrapGen(f) {
+                       if !objabi.Experiment.RegabiWrappers {
                                // Fallback: use alias instead. FIXME.
 
                                // These LSyms have the same name as the