This causes different output between libstdc++ and libc++.
Consider A,B,C,D,E, and F.
DT->properlyDominates() says;
- D dominates A
- E dominates C
- F dominates B
libstdc++'s stable_sort did;
- D (dominates A)
- A
- B
- E (dominates C)
- C
- F (oughta dominate B...)
F was not hoisted.
libc++ didn't modify order, oops.
I suggest to introduce stupid sort here. Please suggest me if you had better algorithm.
this is going to be stale once you have a value numbering to fix this in linear time.