aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa/stackalloc.go
diff options
context:
space:
mode:
authorDavid Chase <drchase@google.com>2021-04-09 14:53:33 +0000
committerDavid Chase <drchase@google.com>2021-04-09 15:01:13 +0000
commit6951da56b0ae2cd4250fc1b0350d090aed633ac1 (patch)
tree01b6ed90c2dff64b2fd1649414a8e5804307edee /src/cmd/compile/internal/ssa/stackalloc.go
parent77b3269fb57d2f5c19a76a80f1d215dc801be3b7 (diff)
downloadgo-6951da56b0ae2cd4250fc1b0350d090aed633ac1.tar.xz
Revert "cmd/compile: ensure spills of int/float reg args land in abi slots"
This reverts CL 308510. Reason for revert: It breaks "GOEXPERIMENT=regabi,regabiargs ./make.bash" Change-Id: I553654690ec73120f8a6258dd80623853c430df0 Reviewed-on: https://go-review.googlesource.com/c/go/+/308932 Trust: David Chase <drchase@google.com> Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/cmd/compile/internal/ssa/stackalloc.go')
-rw-r--r--src/cmd/compile/internal/ssa/stackalloc.go16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/cmd/compile/internal/ssa/stackalloc.go b/src/cmd/compile/internal/ssa/stackalloc.go
index 025396f335..45058d4e72 100644
--- a/src/cmd/compile/internal/ssa/stackalloc.go
+++ b/src/cmd/compile/internal/ssa/stackalloc.go
@@ -218,15 +218,8 @@ func (s *stackAllocState) stackalloc() {
// If this is a named value, try to use the name as
// the spill location.
var name LocalSlot
- interfere := false
if v.Op == OpStoreReg {
- a := v.Args[0]
- name = names[a.ID]
- if name.N == nil && (a.Op == OpArgIntReg || a.Op == OpArgFloatReg) {
- // Try harder to spill to the abi-provided spill slot, even if the names are messed up.
- nameOff := a.Aux.(*AuxNameOffset)
- name = LocalSlot{N: nameOff.Name, Type: v.Type, Off: nameOff.Offset}
- }
+ name = names[v.Args[0].ID]
} else {
name = names[v.ID]
}
@@ -237,7 +230,6 @@ func (s *stackAllocState) stackalloc() {
// A variable can interfere with itself.
// It is rare, but it can happen.
s.nSelfInterfere++
- interfere = true
goto noname
}
}
@@ -279,11 +271,7 @@ func (s *stackAllocState) stackalloc() {
// Use the stack variable at that index for v.
loc := locs[i]
if f.pass.debug > stackDebug {
- reason := "noname"
- if interfere {
- reason = "interfere"
- }
- fmt.Printf("stackalloc (%s) %s to %s\n", reason, v, loc)
+ fmt.Printf("stackalloc %s to %s\n", v, loc)
}
f.setHome(v, loc)
slots[v.ID] = i