aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa/likelyadjust.go
diff options
context:
space:
mode:
authorTodd Neal <todd@tneal.org>2016-03-13 23:04:31 -0500
committerTodd Neal <todd@tneal.org>2016-03-14 11:04:40 +0000
commit98b88de56f50ac67eeafcb326ed6a0b198182f59 (patch)
tree2087647ffc8594114d98924186e902c4e5810f24 /src/cmd/compile/internal/ssa/likelyadjust.go
parent2dcbbbd193bf604570ecdfe4f696f32da95e7ffe (diff)
downloadgo-98b88de56f50ac67eeafcb326ed6a0b198182f59.tar.gz
go-98b88de56f50ac67eeafcb326ed6a0b198182f59.zip
cmd/compile: change the type of ssa Warnl line number
Line numbers are always int32, so the Warnl function should take the line number as an int32 as well. This matches gc.Warnl and removes a cast every place it's used. Change-Id: I5d6201e640d52ec390eb7174f8fd8c438d4efe58 Reviewed-on: https://go-review.googlesource.com/20662 Run-TryBot: Todd Neal <todd@tneal.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/ssa/likelyadjust.go')
-rw-r--r--src/cmd/compile/internal/ssa/likelyadjust.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd/compile/internal/ssa/likelyadjust.go b/src/cmd/compile/internal/ssa/likelyadjust.go
index 93f32c72bf..4046958c7b 100644
--- a/src/cmd/compile/internal/ssa/likelyadjust.go
+++ b/src/cmd/compile/internal/ssa/likelyadjust.go
@@ -69,7 +69,7 @@ func describePredictionAgrees(b *Block, prediction BranchPrediction) string {
}
func describeBranchPrediction(f *Func, b *Block, likely, not int8, prediction BranchPrediction) {
- f.Config.Warnl(int(b.Line), "Branch prediction rule %s < %s%s",
+ f.Config.Warnl(b.Line, "Branch prediction rule %s < %s%s",
bllikelies[likely-blMin], bllikelies[not-blMin], describePredictionAgrees(b, prediction))
}
@@ -144,7 +144,7 @@ func likelyadjust(f *Func) {
noprediction = true
}
if f.pass.debug > 0 && !noprediction {
- f.Config.Warnl(int(b.Line), "Branch prediction rule stay in loop%s",
+ f.Config.Warnl(b.Line, "Branch prediction rule stay in loop%s",
describePredictionAgrees(b, prediction))
}
@@ -180,7 +180,7 @@ func likelyadjust(f *Func) {
}
}
if f.pass.debug > 2 {
- f.Config.Warnl(int(b.Line), "BP: Block %s, local=%s, certain=%s", b, bllikelies[local[b.ID]-blMin], bllikelies[certain[b.ID]-blMin])
+ f.Config.Warnl(b.Line, "BP: Block %s, local=%s, certain=%s", b, bllikelies[local[b.ID]-blMin], bllikelies[certain[b.ID]-blMin])
}
}