mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: stop generating block successor vars in rewrite rules
They are left over from the days before we had BlockKindFirst and swapSuccessors. Change-Id: I9259d53ac2821ca4d5de5dd520ca4b78f52ecad4 Reviewed-on: https://go-review.googlesource.com/41206 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
db8437eb58
commit
eaa198f3d1
10 changed files with 1 additions and 2183 deletions
|
|
@ -23705,13 +23705,9 @@ func rewriteBlockgeneric(b *Block) bool {
|
|||
break
|
||||
}
|
||||
cond := v.Args[0]
|
||||
yes := b.Succs[0]
|
||||
no := b.Succs[1]
|
||||
b.Kind = BlockIf
|
||||
b.SetControl(cond)
|
||||
b.swapSuccessors()
|
||||
_ = no
|
||||
_ = yes
|
||||
return true
|
||||
}
|
||||
// match: (If (ConstBool [c]) yes no)
|
||||
|
|
@ -23723,15 +23719,11 @@ func rewriteBlockgeneric(b *Block) bool {
|
|||
break
|
||||
}
|
||||
c := v.AuxInt
|
||||
yes := b.Succs[0]
|
||||
no := b.Succs[1]
|
||||
if !(c == 1) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockFirst
|
||||
b.SetControl(nil)
|
||||
_ = yes
|
||||
_ = no
|
||||
return true
|
||||
}
|
||||
// match: (If (ConstBool [c]) yes no)
|
||||
|
|
@ -23743,16 +23735,12 @@ func rewriteBlockgeneric(b *Block) bool {
|
|||
break
|
||||
}
|
||||
c := v.AuxInt
|
||||
yes := b.Succs[0]
|
||||
no := b.Succs[1]
|
||||
if !(c == 0) {
|
||||
break
|
||||
}
|
||||
b.Kind = BlockFirst
|
||||
b.SetControl(nil)
|
||||
b.swapSuccessors()
|
||||
_ = no
|
||||
_ = yes
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue