]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: better check for single live memory
authorKeith Randall <khr@golang.org>
Mon, 15 May 2017 16:00:55 +0000 (09:00 -0700)
committerKeith Randall <khr@golang.org>
Mon, 15 May 2017 19:17:35 +0000 (19:17 +0000)
commit256210c719608bb508a59b608a6ae615fbd7f8c0
tree226fd6412cb47d40e7a1ef685decb255c950615b
parentd5e01c044f8674ab6cc62ae6f886163eee572884
cmd/compile: better check for single live memory

Enhance the one-live-memory-at-a-time check to run during many
more phases of the SSA backend. Also make it work in an interblock
fashion.

Change types.IsMemory to return true for tuples containing a memory type.

Fix trim pass to build the merged phi correctly. Doesn't affect
code but allows the check to pass after trim runs.

Switch the AddTuple* ops to take the memory-containing tuple argument second.

Update #20335

Change-Id: I5b03ef3606b75a9e4f765276bb8b183cdc172b43
Reviewed-on: https://go-review.googlesource.com/43495
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
13 files changed:
src/cmd/compile/internal/ssa/check.go
src/cmd/compile/internal/ssa/deadstore.go
src/cmd/compile/internal/ssa/gen/AMD64.rules
src/cmd/compile/internal/ssa/gen/AMD64Ops.go
src/cmd/compile/internal/ssa/gen/S390X.rules
src/cmd/compile/internal/ssa/gen/S390XOps.go
src/cmd/compile/internal/ssa/loopreschedchecks.go
src/cmd/compile/internal/ssa/rewriteAMD64.go
src/cmd/compile/internal/ssa/rewriteS390X.go
src/cmd/compile/internal/ssa/schedule.go
src/cmd/compile/internal/ssa/trim.go
src/cmd/compile/internal/ssa/value.go
src/cmd/compile/internal/types/type.go