diff options
| author | Matthew Dempsky <mdempsky@google.com> | 2020-12-10 21:04:41 -0800 |
|---|---|---|
| committer | Alexander Rakoczy <alex@golang.org> | 2020-12-14 11:43:58 -0500 |
| commit | 8ce37e4110316030159972e17c67152e8f8e9359 (patch) | |
| tree | 58faceb54afe09eb53667c654cca9061713df2e0 /test/interface/explicit.go | |
| parent | 7e17b46c58cbb0aff2b42490a73e807bb04757d7 (diff) | |
| download | go-8ce37e4110316030159972e17c67152e8f8e9359.tar.xz | |
[dev.regabi] cmd/compile: fix noopt builder
The non-simple, phi-insertion algorithm can leave OpFwdRefs in the SSA
graph unresolved if they're in dead blocks. Normally, these would be
harmlessly removed later during SSA dead-code elimination, but those
passes are omitted for -N builds. And so they reach zcse, where the
Value.Aux is used within a hash map.
This became a problem after golang.org/cl/275788, which added
FwdRefAux to wrap OpFwdRef's ir.Node, and to ensure that it's not
compared for equality / used as a map key.
This CL adds a simple fix: if there are any OpFwdRefs remaining after
resolveFwdRef, then they must be dead code and we can simply replace
them with OpUnknown.
Change-Id: I72e4116d52d3f6441ebb0bf6160906617cd59513
Reviewed-on: https://go-review.googlesource.com/c/go/+/277075
Trust: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'test/interface/explicit.go')
0 files changed, 0 insertions, 0 deletions
