internal/goexperiment: add "NewInliner" experiment

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>
This commit is contained in:
Than McIntosh 2023-07-11 10:34:48 -04:00
parent ce5e37ec21
commit fbf9076ee8
3 changed files with 30 additions and 0 deletions

View file

@ -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

View file

@ -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

View 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
}