]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile: bce when max and limit are consts
authorAlexandru Moșoi <mosoi@google.com>
Fri, 1 Apr 2016 13:09:19 +0000 (15:09 +0200)
committerAlexandru Moșoi <alexandru@mosoi.ro>
Mon, 11 Apr 2016 16:01:22 +0000 (16:01 +0000)
commit6c6089b3fdba9eb0cff863a03074dbac47c92f63
tree8d4eacf7fc80504db1a2bf1468b3192060ce1dcd
parent00681eec6aec03b8b2822c9220fba27c18923c01
cmd/compile: bce when max and limit are consts

Removes 49 more bound checks in make.bash. For example:

var a[100]int
for i := 0; i < 50; i++ {
  use a[i+25]
}

Change-Id: I85e0130ee5d07f0ece9b17044bba1a2047414ce7
Reviewed-on: https://go-review.googlesource.com/21379
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: Alexandru Moșoi <alexandru@mosoi.ro>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/compile/internal/ssa/loopbce.go
test/checkbce.go
test/loopbce.go