]> Cypherpunks repositories - gostls13.git/commit
[dev.ssa] cmd/compile: clean up nilcheck logic
authorTodd Neal <todd@tneal.org>
Sun, 6 Sep 2015 20:00:01 +0000 (16:00 -0400)
committerTodd Neal <todd@tneal.org>
Mon, 7 Sep 2015 20:04:59 +0000 (20:04 +0000)
commit6bf383c7b31c990231c2a6c148b98e035b3b1b53
tree6d83910097bf45d498387ced5034e5c15de065be
parent1fc52b61f24c210514d4b14e9cc2f8e0aa3f3d9b
[dev.ssa] cmd/compile: clean up nilcheck logic

Be more clear about the two conditions that we care about:
1) a block that performs a nil check (OpIsNonNil), which may be removed
2) a block that is the non-nil sucessor for an OpIsNonNil block

Now we only care about removing nilchecks for two scenarios:
- a type 1 block is dominated by a type 2 block for the same value
- a block is both type 1 and type 2 for the same value

Fixes math/big.

Change-Id: I50018a4014830461ddfe2a2daf588468e4a8f0b4
Reviewed-on: https://go-review.googlesource.com/14325
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/ssa/nilcheck.go
src/cmd/compile/internal/ssa/nilcheck_test.go
src/cmd/dist/test.go [changed mode: 0755->0644]