]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.8] cmd/compile: add opcode flag hasSideEffects for do-not-remove
authorDavid Chase <drchase@google.com>
Tue, 21 Feb 2017 20:22:52 +0000 (15:22 -0500)
committerAustin Clements <austin@google.com>
Wed, 5 Apr 2017 16:58:14 +0000 (16:58 +0000)
commit11a224bc5617577fd7c2e02c7ee072303e8d592d
treecdaa615162c5b3792f40d4a6a3cd199763c4564c
parent3a8841bcaf5e89bc3059ddbf251c1e9a533fdc95
[release-branch.go1.8] cmd/compile: add opcode flag hasSideEffects for do-not-remove

Added a flag to generic and various architectures' atomic
operations that are judged to have observable side effects
and thus cannot be dead-code-eliminated.

Test requires GOMAXPROCS > 1 without preemption in loop.

Fixes #19182.

Change-Id: Id2230031abd2cca0bbb32fd68fc8a58fb912070f
Reviewed-on: https://go-review.googlesource.com/39595
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/internal/ssa/deadcode.go
src/cmd/compile/internal/ssa/gen/AMD64Ops.go
src/cmd/compile/internal/ssa/gen/ARM64Ops.go
src/cmd/compile/internal/ssa/gen/MIPSOps.go
src/cmd/compile/internal/ssa/gen/S390XOps.go
src/cmd/compile/internal/ssa/gen/genericOps.go
src/cmd/compile/internal/ssa/gen/main.go
src/cmd/compile/internal/ssa/op.go
src/cmd/compile/internal/ssa/opGen.go
test/fixedbugs/issue19182.go [new file with mode: 0644]