mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.ssa] cmd/compile: fix -N build
The OpSB hack didn't quite work. We need to really CSE these ops to make regalloc happy. Change-Id: I9f4d7bfb0929407c84ee60c9e25ff0c0fbea84af Reviewed-on: https://go-review.googlesource.com/19083 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
This commit is contained in:
parent
056c09bb88
commit
8a961aee28
3 changed files with 29 additions and 7 deletions
|
|
@ -316,12 +316,6 @@ func (s *regAllocState) assignReg(r register, v *Value, c *Value) {
|
|||
fmt.Printf("assignReg %s %s/%s\n", registers[r].Name(), v, c)
|
||||
}
|
||||
if s.regs[r].v != nil {
|
||||
if v.Op == OpSB && !v.Block.Func.Config.optimize {
|
||||
// Rewrite rules may introduce multiple OpSB, and with
|
||||
// -N they don't get CSEd. Ignore the extra assignments.
|
||||
s.f.setHome(c, ®isters[r])
|
||||
return
|
||||
}
|
||||
s.f.Fatalf("tried to assign register %d to %s/%s but it is already used by %s", r, v, c, s.regs[r].v)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue