Skip to content

Commit b7736cb

Browse files
cuonglmgopherbot
authored andcommitted
cmd/compile: disable inline static init optimization
There are a plenty of regression in 1.20 with this optimization. This CL disable inline static init, so it's safer to backport to 1.20 branch. The optimization will be enabled again during 1.21 cycle. Updates #58293 Updates #58339 For #58293 Change-Id: If5916008597b46146b4dc7108c6b389d53f35e95 Reviewed-on: https://go-review.googlesource.com/c/go/+/467015 Reviewed-by: Keith Randall <[email protected]> Reviewed-by: Keith Randall <[email protected]> Run-TryBot: Cuong Manh Le <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Matthew Dempsky <[email protected]> Auto-Submit: Cuong Manh Le <[email protected]>
1 parent 8ffcd3d commit b7736cb

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/cmd/compile/internal/base/flag.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ func ParseFlags() {
168168

169169
Debug.ConcurrentOk = true
170170
Debug.InlFuncsWithClosures = 1
171-
Debug.InlStaticInit = 1
171+
Debug.InlStaticInit = 0
172172
Debug.SyncFrames = -1 // disable sync markers by default
173173

174174
Debug.Checkptr = -1 // so we can tell whether it is set explicitly

test/fixedbugs/issue56778.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compiledir
1+
// compiledir -d=inlstaticinit=1
22

33
// Copyright 2022 The Go Authors. All rights reserved.
44
// Use of this source code is governed by a BSD-style

test/inline.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// errorcheckwithauto -0 -m -d=inlfuncswithclosures=1
1+
// errorcheckwithauto -0 -m -d=inlfuncswithclosures=1 -d=inlstaticinit=1
22

33
// Copyright 2015 The Go Authors. All rights reserved.
44
// Use of this source code is governed by a BSD-style

test/noinit.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// run
1+
// run -gcflags=-d=inlstaticinit=1
22
//go:build !gcflags_noopt
33

44
// Copyright 2010 The Go Authors. All rights reserved.

0 commit comments

Comments
 (0)