diff options
author | David Chase <drchase@google.com> | 2021-04-16 00:15:31 -0400 |
---|---|---|
committer | David Chase <drchase@google.com> | 2021-04-16 20:12:20 +0000 |
commit | b6e1c336037e53ae095e84cfed4a312d8fd3ad45 (patch) | |
tree | fb6a9784ec9249331e75f642bfd7d56e7ec9b266 /src/cmd/compile/internal/ssa/location.go | |
parent | fff236e659fa819e036ab849130931dd6245c7b2 (diff) | |
download | go-b6e1c336037e53ae095e84cfed4a312d8fd3ad45.tar.gz go-b6e1c336037e53ae095e84cfed4a312d8fd3ad45.zip |
cmd/compile: spill all the parameters around morestack
former code only spilled those parameters mentioned in code
AT THE REGISTER LEVEL, this caused problems with liveness
sometimes (which worked on whole variables including
aggregates).
Updates #40724.
Change-Id: Ib9fdc50d95d1d2b1f1e405dd370540e88582ac71
Reviewed-on: https://go-review.googlesource.com/c/go/+/310690
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/location.go')
-rw-r--r-- | src/cmd/compile/internal/ssa/location.go | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/src/cmd/compile/internal/ssa/location.go b/src/cmd/compile/internal/ssa/location.go index af0a913d17..252c47cdeb 100644 --- a/src/cmd/compile/internal/ssa/location.go +++ b/src/cmd/compile/internal/ssa/location.go @@ -102,28 +102,8 @@ func (t LocResults) String() string { return a } -type ArgPair struct { - reg *Register - mem LocalSlot -} - -func (ap *ArgPair) Reg() int16 { - return ap.reg.objNum -} - -func (ap *ArgPair) Type() *types.Type { - return ap.mem.Type -} - -func (ap *ArgPair) Mem() *LocalSlot { - return &ap.mem -} - -func (t ArgPair) String() string { - n0 := "nil" - if t.reg != nil { - n0 = t.reg.String() - } - n1 := t.mem.String() - return fmt.Sprintf("<%s,%s>", n0, n1) +type Spill struct { + Type *types.Type + Offset int64 + Reg int16 } |