diff options
author | David Chase <drchase@google.com> | 2020-12-29 22:44:30 -0500 |
---|---|---|
committer | David Chase <drchase@google.com> | 2021-01-20 19:57:48 +0000 |
commit | 92cb157cf3aa51d28e441dbb2b671795f22140f8 (patch) | |
tree | 1ba6d33a55e396c0a1533f12382847ed9a59119e /src/cmd/compile/internal/ssa/func.go | |
parent | 9423d50d53f132d7d00f5126144736bfe65627b6 (diff) | |
download | go-92cb157cf3aa51d28e441dbb2b671795f22140f8.tar.gz go-92cb157cf3aa51d28e441dbb2b671795f22140f8.zip |
[dev.regabi] cmd/compile: late expansion of return values
By-hand rebase of earlier CL, because that was easier than
letting git try to figure things out.
This will naively insert self-moves; in the case that these
involve memory, the expander detects these and removes them
and their vardefs.
Change-Id: Icf72575eb7ae4a186b0de462bc8cf0bedc84d3e9
Reviewed-on: https://go-review.googlesource.com/c/go/+/279519
Trust: David Chase <drchase@google.com>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/ssa/func.go')
-rw-r--r-- | src/cmd/compile/internal/ssa/func.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cmd/compile/internal/ssa/func.go b/src/cmd/compile/internal/ssa/func.go index f753b4407b..de99a8d4af 100644 --- a/src/cmd/compile/internal/ssa/func.go +++ b/src/cmd/compile/internal/ssa/func.go @@ -60,6 +60,8 @@ type Func struct { // RegArgs is a slice of register-memory pairs that must be spilled and unspilled in the uncommon path of function entry. RegArgs []ArgPair + // AuxCall describing parameters and results for this function. + OwnAux *AuxCall // WBLoads is a list of Blocks that branch on the write // barrier flag. Safe-points are disabled from the OpLoad that @@ -774,7 +776,7 @@ func DebugNameMatch(evname, name string) bool { } func (f *Func) spSb() (sp, sb *Value) { - initpos := f.Entry.Pos + initpos := src.NoXPos // These are originally created with no position in ssa.go; if they are optimized out then recreated, should be the same. for _, v := range f.Entry.Values { if v.Op == OpSB { sb = v @@ -783,7 +785,7 @@ func (f *Func) spSb() (sp, sb *Value) { sp = v } if sb != nil && sp != nil { - break + return } } if sb == nil { |