This patch introduces a data structure - Disjoint Set Union - that allows to perform
operations on disjoint sets of elements:
- Check whether two elements X and Y belong to one set;
- Merge sets containing X and Y into one set.
If we have a transitive symmetrical equivalence function F, and we proved that F(X, Y)
and F(Y,Z) is true, then adding these two pairs to DSU will also allow us to prove that
F(Z, X) is true for cheap. One possible application of that is using it as cache for
comparators: if we proved that X compareTo Y == 0 and Y compareTo Z == 0, then
DSU can easily prove that X compareTo Z == 0.
You're copying T instances here -- why not take const T & instead?
(For SCEV * and Value * this does not matter, but e.g. people may eventually want to store std::string here).