]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: in poset, change the way inequality is recorded
authorGiovanni Bajo <rasky@develer.com>
Sat, 12 Oct 2019 23:30:51 +0000 (01:30 +0200)
committerGiovanni Bajo <rasky@develer.com>
Mon, 14 Oct 2019 21:29:11 +0000 (21:29 +0000)
commit90888ed97b5b3c0d104b2e9f28e5b74c1b0d07dd
tree486889c06d1a7a86c5bb3ec60f29b83fd36302b9
parent233f45499b7f3a775311b824ac53bbe67e811e1f
cmd/compile: in poset, change the way inequality is recorded

Before this CL, inequality was recorded in a bit matrix using
SSA IDs. This allowed to record inequality for SSA values that
we didn't know any relation in the partial order of. Unfortunately,
this also means that inequality is harder to use within the poset
itself as there is not fast way to map from internal poset indices
and SSA values.

Since we will need to check for inequality in following CLs within
code that lost track of SSA values, switch to use a bit matrix
of poset indices instead. This requires always allocate a poset
node (as a new root) for values that are first seen in a SetNonEqual
call, but it doesn't sound like a big problem. The other solution
(creating and maintaining a reverse map from poset indices to SSA
values) seem more complicated and memory hungry.

Change-Id: Ic917485abbe70aef7ad6fa98408e5430328b6cd9
Reviewed-on: https://go-review.googlesource.com/c/go/+/196782
Run-TryBot: Giovanni Bajo <rasky@develer.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/internal/ssa/poset.go