]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: add -d=inlstaticinit debug flag
authorMatthew Dempsky <mdempsky@google.com>
Tue, 22 Nov 2022 01:17:06 +0000 (17:17 -0800)
committerMatthew Dempsky <mdempsky@google.com>
Tue, 22 Nov 2022 01:42:49 +0000 (01:42 +0000)
commit152119990f62e9a791493f52933b7a113aaa4234
treef80a45f80362e3a9c61b96595b4e8d4316107670
parent1c9eba19d5b7d1bba5c6c86b4625fe37bb609096
cmd/compile: add -d=inlstaticinit debug flag

This CL adds -d=inlstaticinit to control whether static initialization
of inlined function calls (added in CL 450136) is allowed.

We've needed to fix it once already (CL 451555) and Google-internal
testing is hitting additional failure cases, so putting this
optimization behind a feature flag seems appropriate regardless.

Also, while we diagnose and fix the remaining cases, this CL also
disables the optimization to avoid miscompilations.

Updates #56894.

Change-Id: If52a358ad1e9d6aad1c74fac5a81ff9cfa5a3793
Reviewed-on: https://go-review.googlesource.com/c/go/+/452676
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/base/debug.go
src/cmd/compile/internal/base/flag.go
src/cmd/compile/internal/staticinit/sched.go
test/fixedbugs/issue56778.go
test/inline.go
test/noinit.go