cmd/compile: rename poset method dominates to reaches
cmd/compile: rename poset method dominates to reaches

The partially ordered set uses a method named 'dominates' to determine whether
two nodes are partially ordered. Dominates does a depth-first search of the
DAG, beginning at the source node, and returns true as soon as it finds a path
to the target node. In the context of the forest-of-DAGs that makes up the
poset, dominates is not necessarily checking dominance, but is checking
reachability. See the issue tracker for a more detailed discussion of the
difference.

Fortunately, reachability is logically correct everywhere dominates is currently
used in poset.go. Reachability within a DAG is sufficient to establish the
partial ordering (source < target).

This CL changes the name of the method (dominates -> reaches) and updates
all the comments in the file accordingly.

Fixes #33971.

Change-Id: Ia3a34f7b14b363801d75b05099cfc686035f7d96
Reviewed-on: https://go-review.googlesource.com/c/go/+/192617
Reviewed-by: Giovanni Bajo <387225cd66f97dc812a00599dbc5b6544a73295c@develer.com>
Run-TryBot: Giovanni Bajo <387225cd66f97dc812a00599dbc5b6544a73295c@develer.com>
TryBot-Result: Gobot Gobot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>

nawawi/go,akutz/go,CAFxX/go,nawawi/go,akutz/go,nawawi/go,cloudflare/go,akutz/go,nawawi/go,golang/go,golang/go,golang/go,akutz/go,cloudflare/go,golang/go,CAFxX/go,CAFxX/go,akutz/go,golang/go,nawawi/go,akutz/go,CAFxX/go,CAFxX/go,cloudflare/go,golang/go,cloudflare/go,cloudflare/go,akutz/go,CAFxX/go,nawawi/go,CAFxX/go,cloudflare/go,cloudflare/go,cloudflare/go,nawawi/go,akutz/go,golang/go,nawawi/go,golang/go,CAFxX/go