]> Cypherpunks repositories - gostls13.git/commit
[dev.ssa] cmd/compile/ssa: don't nil check phis with non-nil arguments
authorTodd Neal <todd@tneal.org>
Fri, 7 Aug 2015 01:13:27 +0000 (20:13 -0500)
committerTodd Neal <todd@tneal.org>
Tue, 11 Aug 2015 00:00:55 +0000 (00:00 +0000)
commite0e556620aaf9861c422191fc1efb8020c2f1507
treed9306a2b0ef18b7a536d666c8165b9e2539f1e35
parent9787ba43eeaebe2d61c701f27a5b50d095533b9b
[dev.ssa] cmd/compile/ssa: don't nil check phis with non-nil arguments

Move the known-non-nil scan outside the work loop to resolve an issue
with values that were declared outside the block being operated on.
Also consider phis whose arguments are all non-nil, as non-nil.

Change-Id: I4d5b840042de9eb181f2cb918f36913fb5d517a2
Reviewed-on: https://go-review.googlesource.com/13441
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/ssa/nilcheck.go
src/cmd/compile/internal/ssa/nilcheck_test.go