aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa/tighten.go
diff options
context:
space:
mode:
authorDavid Chase <drchase@google.com>2021-02-04 16:42:35 -0500
committerDavid Chase <drchase@google.com>2021-02-26 02:52:33 +0000
commite25040d16288563c89cead5e8da8d3b9c74ab655 (patch)
tree4e57425c9764cf01ac69447f06d1bb52f07d9e46 /src/cmd/compile/internal/ssa/tighten.go
parent9a555fc24c318bf1b07bdc07d5c02e372681e401 (diff)
downloadgo-e25040d16288563c89cead5e8da8d3b9c74ab655.tar.gz
go-e25040d16288563c89cead5e8da8d3b9c74ab655.zip
cmd/compile: change StaticCall to return a "Results"
StaticLECall (multiple value in +mem, multiple value result +mem) -> StaticCall (multiple ergister value in +mem, multiple register-sized-value result +mem) -> ARCH CallStatic (multiple ergister value in +mem, multiple register-sized-value result +mem) But the architecture-dependent stuff is indifferent to whether it is mem->mem or (mem)->(mem) until Prog generation. Deal with OpSelectN -> Prog in ssagen/ssa.go, others, as they appear. For #40724. Change-Id: I1d0436f6371054f1881862641d8e7e418e4a6a16 Reviewed-on: https://go-review.googlesource.com/c/go/+/293391 Trust: David Chase <drchase@google.com> Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/cmd/compile/internal/ssa/tighten.go')
-rw-r--r--src/cmd/compile/internal/ssa/tighten.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/ssa/tighten.go b/src/cmd/compile/internal/ssa/tighten.go
index 5dfc453649..bd08334a5f 100644
--- a/src/cmd/compile/internal/ssa/tighten.go
+++ b/src/cmd/compile/internal/ssa/tighten.go
@@ -18,10 +18,11 @@ func tighten(f *Func) {
continue
}
switch v.Op {
- case OpPhi, OpArg, OpSelect0, OpSelect1:
+ case OpPhi, OpArg, OpSelect0, OpSelect1, OpSelectN:
// Phis need to stay in their block.
// Arg must stay in the entry block.
// Tuple selectors must stay with the tuple generator.
+ // SelectN is typically, ultimately, a register.
continue
}
if v.MemoryArg() != nil {