@@ -106,17 +106,17 @@ type posetNode struct {
106
106
// order so that if we know that A<B<C and later learn that A==D, Ordered will return
107
107
// true for D<C.
108
108
//
109
+ // It is also possible to record inequality relations between nodes with SetNonEqual;
110
+ // non-equality relations are not transitive, but they can still be useful: for instance
111
+ // if we know that A<=B and later we learn that A!=B, we can deduce that A<B.
112
+ // NonEqual can be used to check whether it is known that the nodes are different, either
113
+ // because SetNonEqual was called before, or because we know that they are strictly ordered.
114
+ //
109
115
// poset will refuse to record new relations that contradict existing relations:
110
116
// for instance if A<B<C, calling SetOrder for C<A will fail returning false; also
111
117
// calling SetEqual for C==A will fail.
112
118
//
113
- // It is also possible to record inequality relations between nodes with SetNonEqual;
114
- // given that non-equality is not transitive, the only effect is that a later call
115
- // to SetEqual for the same values will fail. NonEqual checks whether it is known that
116
- // the nodes are different, either because SetNonEqual was called before, or because
117
- // we know that they are strictly ordered.
118
- //
119
- // It is implemented as a forest of DAGs; in each DAG, if there is a path (directed)
119
+ // poset is implemented as a forest of DAGs; in each DAG, if there is a path (directed)
120
120
// from node A to B, it means that A<B (or A<=B). Equality is represented by mapping
121
121
// two SSA values to the same DAG node; when a new equality relation is recorded
122
122
// between two existing nodes,the nodes are merged, adjusting incoming and outgoing edges.
0 commit comments