]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/ssa: generalize prove to all booleans
authorAlexandru Moșoi <mosoi@google.com>
Mon, 7 Mar 2016 17:36:16 +0000 (18:36 +0100)
committerAlexandru Moșoi <alexandru@mosoi.ro>
Sun, 13 Mar 2016 12:05:41 +0000 (12:05 +0000)
commitcd798dcb88c69867d1a09e0d2e9430d8edec0f77
tree3f73f65cbdcfd189968ff1df233cf805c0c0a448
parent6dfcc336c520efc85c5aab06ea9d6c45d0aad214
cmd/compile/internal/ssa: generalize prove to all booleans

* Refacts a bit saving and restoring parents restrictions
* Shaves ~100k from pkg/tools/linux_amd64,
but most of the savings come from the rewrite rules.
* Improves on the following artificial test case:
func f1(a4 bool, a6 bool) bool {
  return a6 || (a6 || (a6 || a4)) || (a6 || (a4 || a6 || (false || a6)))
}

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