mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: add MakeTuple generic SSA op to remove duplicate Select[01] rules
Change-Id: Id94a5e503f02aa29dc1e334b521770107d4261db Reviewed-on: https://go-review.googlesource.com/c/go/+/656615 Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Jorropo <jorropo.pgm@gmail.com>
This commit is contained in:
parent
99411d7847
commit
4ff70cf868
4 changed files with 136 additions and 180 deletions
|
|
@ -585,6 +585,7 @@ var genericOps = []opData{
|
|||
// pseudo-ops for breaking Tuple
|
||||
{name: "Select0", argLength: 1, zeroWidth: true}, // the first component of a tuple
|
||||
{name: "Select1", argLength: 1, zeroWidth: true}, // the second component of a tuple
|
||||
{name: "MakeTuple", argLength: 2}, // arg0 arg1 are components of a "Tuple" (like the result from a 128bits op).
|
||||
{name: "SelectN", argLength: 1, aux: "Int64"}, // arg0=result, auxint=field index. Returns the auxint'th member.
|
||||
{name: "SelectNAddr", argLength: 1, aux: "Int64"}, // arg0=result, auxint=field index. Returns the address of auxint'th member. Used for un-SSA-able result types.
|
||||
{name: "MakeResult", argLength: -1}, // arg0 .. are components of a "Result" (like the result from a Call). The last arg should be memory (like the result from a call).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue