]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: place reg spills after OpArg{Int,Float}Reg ops
authorThan McIntosh <thanm@google.com>
Tue, 25 May 2021 14:13:07 +0000 (10:13 -0400)
committerThan McIntosh <thanm@google.com>
Thu, 27 May 2021 18:47:37 +0000 (18:47 +0000)
commit56af34f875f55485b4ebc521fe0c695dafb9bc23
tree1f3aefba7ff8453200a9243ad34617a48a96ec11
parentdb66e9e15d16cfdb555140b26a5f009fd0d23d0e
cmd/compile: place reg spills after OpArg{Int,Float}Reg ops

Tweak the register allocator to maintain the invariant that
OpArg{Int,Float}Reg values are placed together at the start of the
entry block, before any other non-pseudo-op values. Without this
change, when the register allocator adds spills we can wind up with an
interleaving of OpArg*Reg and stores, which complicates debug location
analysis.

Updates #40724.

Change-Id: Icf30dd814a9e25263ecbea2e48feb840a6e7f2bd
Reviewed-on: https://go-review.googlesource.com/c/go/+/322630
Trust: Than McIntosh <thanm@google.com>
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/cmd/compile/internal/ssa/regalloc.go