]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/ssa: simplify nil checks in opt.
authorAlexandru Moșoi <mosoi@google.com>
Mon, 7 Mar 2016 18:29:15 +0000 (19:29 +0100)
committerAlexandru Moșoi <alexandru@mosoi.ro>
Tue, 8 Mar 2016 22:17:47 +0000 (22:17 +0000)
commitfb2f99d5fd9fe651d26de9a9550935897907d27b
treea625b7e1e50460df8c421f9b43fbd02c8d500685
parente806cd9f95ccf14163623792425db2b066d4198e
cmd/compile/internal/ssa: simplify nil checks in opt.

* Simplify the nilcheck generated by
for _, e := range a {}
* No effect on the generated code because these nil checks
don't end up in the generated code.
* Useful for other analysis, e.g. it'll remove one dependecy
on the induction variable.

Change-Id: I6ee66ddfdc010ae22aea8dca48163303d93de7a9
Reviewed-on: https://go-review.googlesource.com/20307
Run-TryBot: Alexandru Moșoi <alexandru@mosoi.ro>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/ssa/gen/generic.rules
src/cmd/compile/internal/ssa/rewritegeneric.go