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:
Josh Bleecher Snyder 2017-04-20 15:26:05 -07:00
parent db8437eb58
commit eaa198f3d1
10 changed files with 1 additions and 2183 deletions

View file

@ -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
}
}