]> Cypherpunks repositories - gostls13.git/commitdiff
internal/goexperiment: add "NewInliner" experiment
authorThan McIntosh <thanm@google.com>
Tue, 11 Jul 2023 14:34:48 +0000 (10:34 -0400)
committerThan McIntosh <thanm@google.com>
Wed, 2 Aug 2023 19:47:40 +0000 (19:47 +0000)
Add "NewInliner" to the list of Go experiments, used for enabling an
updated/improved version of the function inlining phase within the Go
compiler.

Updates #61502.

Change-Id: I3218b3ae59a2d05156e8017cd9ee1d7b66cad031
Reviewed-on: https://go-review.googlesource.com/c/go/+/511555
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Than McIntosh <thanm@google.com>

src/internal/goexperiment/exp_newinliner_off.go [new file with mode: 0644]
src/internal/goexperiment/exp_newinliner_on.go [new file with mode: 0644]
src/internal/goexperiment/flags.go

diff --git a/src/internal/goexperiment/exp_newinliner_off.go b/src/internal/goexperiment/exp_newinliner_off.go
new file mode 100644 (file)
index 0000000..27bdec3
--- /dev/null
@@ -0,0 +1,13 @@
+// Copyright 2023 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Code generated by mkconsts.go. DO NOT EDIT.
+
+//go:build !goexperiment.newinliner
+// +build !goexperiment.newinliner
+
+package goexperiment
+
+const NewInliner = false
+const NewInlinerInt = 0
diff --git a/src/internal/goexperiment/exp_newinliner_on.go b/src/internal/goexperiment/exp_newinliner_on.go
new file mode 100644 (file)
index 0000000..099e4e5
--- /dev/null
@@ -0,0 +1,13 @@
+// Copyright 2023 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Code generated by mkconsts.go. DO NOT EDIT.
+
+//go:build goexperiment.newinliner
+// +build goexperiment.newinliner
+
+package goexperiment
+
+const NewInliner = true
+const NewInlinerInt = 1
index ae3cbaf89fa5dd646300ce26b4e710c591c17a99..f767cfa45d5bcbdefeeab6175738892f089515c1 100644 (file)
@@ -109,4 +109,8 @@ type Flags struct {
        // CacheProg adds support to cmd/go to use a child process to implement
        // the build cache; see https://github.com/golang/go/issues/59719.
        CacheProg bool
+
+       // NewInliner enables a new+improved version of the function
+       // inlining phase within the Go compiler.
+       NewInliner bool
 }