mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: simplify jump table case in prove pass
Change-Id: I01e0c4953667594b84daaa38082fad1175343861 Reviewed-on: https://go-review.googlesource.com/c/go/+/599196 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com>
This commit is contained in:
parent
f32ec41df5
commit
aba16d17c5
1 changed files with 1 additions and 13 deletions
|
|
@ -1869,19 +1869,7 @@ func addBranchRestrictions(ft *factsTable, b *Block, br branch) {
|
|||
c = v
|
||||
val -= off
|
||||
}
|
||||
old := ft.limits[c.ID]
|
||||
ft.limitStack = append(ft.limitStack, limitFact{c.ID, old})
|
||||
if val < old.min || val > old.max || uint64(val) < old.umin || uint64(val) > old.umax {
|
||||
ft.unsat = true
|
||||
if b.Func.pass.debug > 2 {
|
||||
b.Func.Warnl(b.Pos, "block=%s outedge=%d %s=%d unsat", b, idx, c, val)
|
||||
}
|
||||
} else {
|
||||
ft.limits[c.ID] = limit{val, val, uint64(val), uint64(val)}
|
||||
if b.Func.pass.debug > 2 {
|
||||
b.Func.Warnl(b.Pos, "block=%s outedge=%d %s=%d", b, idx, c, val)
|
||||
}
|
||||
}
|
||||
ft.newLimit(c, limit{min: val, max: val, umin: uint64(val), umax: uint64(val)})
|
||||
default:
|
||||
panic("unknown branch")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue