]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: teach regalloc about temporary registers
authorKeith Randall <khr@golang.org>
Tue, 5 Apr 2022 22:07:29 +0000 (15:07 -0700)
committerKeith Randall <khr@golang.org>
Thu, 17 Nov 2022 18:53:13 +0000 (18:53 +0000)
commit5f7abeca5a584a847033bbd1bc1123872bb0925e
tree0bc56dff63a5de8a2606d6c86f1a4968648b2544
parent249e51e5d9aac5124628d524499ea9c067bc37d5
cmd/compile: teach regalloc about temporary registers

Temporary registers are sometimes needed for an architecture backend
which needs to use several machine instructions to implement a single
SSA instruction.

Mark such instructions so that regalloc can reserve the temporary register
for it. That way we don't have to reserve a fixed register like we do now.

Convert the temp-register-using instructions on amd64 to use this
new mechanism. Other archs can follow as needed.

Change-Id: I1d0c8588afdad5cd18b4398eb5a0f755be5dead7
Reviewed-on: https://go-review.googlesource.com/c/go/+/398556
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/internal/amd64/ssa.go
src/cmd/compile/internal/ssa/_gen/AMD64Ops.go
src/cmd/compile/internal/ssa/_gen/main.go
src/cmd/compile/internal/ssa/func.go
src/cmd/compile/internal/ssa/html.go
src/cmd/compile/internal/ssa/op.go
src/cmd/compile/internal/ssa/opGen.go
src/cmd/compile/internal/ssa/regalloc.go
src/cmd/compile/internal/ssa/value.go