aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/noder
diff options
context:
space:
mode:
authorCuong Manh Le <cuong.manhle.vn@gmail.com>2023-11-16 22:19:37 +0700
committerGopher Robot <gobot@golang.org>2023-11-17 12:45:41 +0000
commit5b6d3dea8744311825fd544a73edb8d26d9c7e98 (patch)
treee382ead133e372d9b392d069b537276fd2e46139 /src/cmd/compile/internal/noder
parentb9a08f159d3074ad5921a9d8625b267b64d957bc (diff)
downloadgo-5b6d3dea8744311825fd544a73edb8d26d9c7e98.tar.xz
cmd/compile: use internal/buildcfg for checking newinliner enable
internal/goexperiment reports what GOEXPERIMENT the compiler itself was compiled with, not what experiment to use for the object code that the compiler is compiling. Fixes #64189 Change-Id: I892d78611f8c76376032fd7459e755380afafac6 Reviewed-on: https://go-review.googlesource.com/c/go/+/542995 Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Than McIntosh <thanm@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/cmd/compile/internal/noder')
-rw-r--r--src/cmd/compile/internal/noder/linker.go3
-rw-r--r--src/cmd/compile/internal/noder/reader.go3
2 files changed, 2 insertions, 4 deletions
diff --git a/src/cmd/compile/internal/noder/linker.go b/src/cmd/compile/internal/noder/linker.go
index 3bc5c32e1b..f5667f57ab 100644
--- a/src/cmd/compile/internal/noder/linker.go
+++ b/src/cmd/compile/internal/noder/linker.go
@@ -6,7 +6,6 @@ package noder
import (
"internal/buildcfg"
- "internal/goexperiment"
"internal/pkgbits"
"io"
@@ -297,7 +296,7 @@ func (l *linker) relocFuncExt(w *pkgbits.Encoder, name *ir.Name) {
if inl := name.Func.Inl; w.Bool(inl != nil) {
w.Len(int(inl.Cost))
w.Bool(inl.CanDelayResults)
- if goexperiment.NewInliner {
+ if buildcfg.Experiment.NewInliner {
w.String(inl.Properties)
}
}
diff --git a/src/cmd/compile/internal/noder/reader.go b/src/cmd/compile/internal/noder/reader.go
index b4c2801e53..c1145f980e 100644
--- a/src/cmd/compile/internal/noder/reader.go
+++ b/src/cmd/compile/internal/noder/reader.go
@@ -8,7 +8,6 @@ import (
"fmt"
"go/constant"
"internal/buildcfg"
- "internal/goexperiment"
"internal/pkgbits"
"path/filepath"
"strings"
@@ -1103,7 +1102,7 @@ func (r *reader) funcExt(name *ir.Name, method *types.Sym) {
Cost: int32(r.Len()),
CanDelayResults: r.Bool(),
}
- if goexperiment.NewInliner {
+ if buildcfg.Experiment.NewInliner {
fn.Inl.Properties = r.String()
}
}