]> Cypherpunks.ru repositories - gostls13.git/commitdiff
[release-branch.go1.20] cmd/compile: disable inline static init optimization
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Thu, 9 Feb 2023 19:13:05 +0000 (02:13 +0700)
committerMichael Pratt <mpratt@google.com>
Wed, 15 Feb 2023 21:45:58 +0000 (21:45 +0000)
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.

Fixes #58444

Change-Id: If5916008597b46146b4dc7108c6b389d53f35e95
Reviewed-on: https://go-review.googlesource.com/c/go/+/467015
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/467035
Run-TryBot: Matthew Dempsky <mdempsky@google.com>

src/cmd/compile/internal/base/flag.go
test/fixedbugs/issue56778.go
test/inline.go
test/noinit.go

index 25f8458e5cf0283876bf62eab7cafdb01afbc15f..be555c3d060cb3b41485fcc33120ff50f616a5ef 100644 (file)
@@ -167,7 +167,7 @@ func ParseFlags() {
 
        Debug.ConcurrentOk = true
        Debug.InlFuncsWithClosures = 1
-       Debug.InlStaticInit = 1
+       Debug.InlStaticInit = 0
        if buildcfg.Experiment.Unified {
                Debug.Unified = 1
        }
index 8bb5c3e21398f4d28cfb34ab6acd869926063c1c..3c27501fd27d870ae047fc6524d3448b7a0f08e1 100644 (file)
@@ -1,4 +1,4 @@
-// compiledir
+// compiledir -d=inlstaticinit=1
 
 // Copyright 2022 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
index cf2cd8cd60326e537ce28188feba0783e5189b88..1aa8fccbbdc62509d2f23789c680137ab4491d0d 100644 (file)
@@ -1,4 +1,4 @@
-// errorcheckwithauto -0 -m -d=inlfuncswithclosures=1
+// errorcheckwithauto -0 -m -d=inlfuncswithclosures=1 -d=inlstaticinit=1
 
 // Copyright 2015 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
index ed8e572e511121d492b15c8a0575ce0d38012a04..505467cf8f332631648889c2a4b94fae16cb888a 100644 (file)
@@ -1,4 +1,4 @@
-// run
+// run -gcflags=-d=inlstaticinit=1
 //go:build !gcflags_noopt
 
 // Copyright 2010 The Go Authors. All rights reserved.