]> Cypherpunks repositories - gostls13.git/commit
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)
committerDavid Chase <drchase@google.com>
Wed, 22 Feb 2017 15:15:47 +0000 (15:15 +0000)
commit11b283092a29a9d402ce05706fd3a85683576218
tree67e11b89dd5f0a3d5c53735a8ac284899222984d
parentb5e51943063a1d78045f0c3ce6c87b424795e643
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/37333
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@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]