cmd/compile: make the cached sdom always return the reverse PO
The sdom tree has a feature where the ordering of child nodes could be
customized, but in actuality, we only ever used one ordering: reverse
postorder. This order has a nice property that walking the tree will
always visit the source block of any non-retreating edge before the
destination block.
Make this ordering the default and document it. This allows passes that
use it to use the cached sdom tree instead of calculating it from
scratch each time.
Change-Id: I907b8ff7cc722e94bf364c183f26ead66a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/742340 Reviewed-by: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Junyang Shao <shaojunyang@google.com>