]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: in prove, simplify logic of branch pushing
authorGiovanni Bajo <rasky@develer.com>
Sun, 1 Apr 2018 23:39:03 +0000 (01:39 +0200)
committerGiovanni Bajo <rasky@develer.com>
Tue, 3 Apr 2018 11:14:26 +0000 (11:14 +0000)
commit321bd8c93b451b3028bc32096e73e719b5e3cfd3
tree28be1fc3a3780b564a05edb30aeb71493bc1c2c5
parent26e0e8a840249d13f94596ebb519154505bd15f4
cmd/compile: in prove, simplify logic of branch pushing

prove used a complex logic when trying to prove branch conditions:
tryPushBranch() was sometimes leaving a checkpoint on the factsTable,
sometimes not, and the caller was supposed to check the return value
to know what to do.

Since we're going to make the prove descend logic a little bit more
complex by adding also induction variables, simplify the tryPushBranch
logic, by removing any factsTable checkpoint handling from it.

Passes toolstash -cmp.

Change-Id: Idfb1703df8a455f612f93158328b36c461560781
Reviewed-on: https://go-review.googlesource.com/104035
Run-TryBot: Giovanni Bajo <rasky@develer.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
src/cmd/compile/internal/ssa/prove.go