aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa/rewriteRISCV64.go
diff options
context:
space:
mode:
authorJosh Bleecher Snyder <josharian@gmail.com>2020-03-01 13:09:09 -0800
committerJosh Bleecher Snyder <josharian@gmail.com>2020-03-02 17:40:00 +0000
commit5e4da0adac18aad82b85e6ce3f928392b7998994 (patch)
treed5d889ce4337929ccc2d3713ea05bf8cc7ccfe64 /src/cmd/compile/internal/ssa/rewriteRISCV64.go
parentd8bf079751cbdbebe8425be7c93b963dc0f31360 (diff)
downloadgo-5e4da0adac18aad82b85e6ce3f928392b7998994.tar.gz
go-5e4da0adac18aad82b85e6ce3f928392b7998994.zip
cmd/compile: add streamlined Block Reset+AddControl routines
For use in rewrite rules. Shrinks cmd/compile: compile 20082104 19967416 -114688 -0.571% Passes toolstash-check -all. Change-Id: Ic856508b27ec5b7fb9b6ca63e955a7139ae7dc30 Reviewed-on: https://go-review.googlesource.com/c/go/+/221780 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/ssa/rewriteRISCV64.go')
-rw-r--r--src/cmd/compile/internal/ssa/rewriteRISCV64.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/cmd/compile/internal/ssa/rewriteRISCV64.go b/src/cmd/compile/internal/ssa/rewriteRISCV64.go
index f20f744456..2e0b34de8d 100644
--- a/src/cmd/compile/internal/ssa/rewriteRISCV64.go
+++ b/src/cmd/compile/internal/ssa/rewriteRISCV64.go
@@ -4258,8 +4258,7 @@ func rewriteBlockRISCV64(b *Block) bool {
// result: (BNE cond yes no)
for {
cond := b.Controls[0]
- b.Reset(BlockRISCV64BNE)
- b.AddControl(cond)
+ b.resetWithControl(BlockRISCV64BNE, cond)
return true
}
}