[Pipeliner] Use std::stable_sort when ordering NodeSets

There are cases when individual NodeSets can be equal with respect to
the ordering criteria. Since they are stored in an ordered container,
use stable_sort to preserve the relative order of equal NodeSets. 

This should remove non-determinism discovered by shuffling done in
llvm::sort with expensive checks enabled.

llvm-svn: 329915
This commit is contained in:
Krzysztof Parzyszek 2018-04-12 15:11:11 +00:00
parent 321f24ec42
commit 6c2f868bbd
1 changed files with 1 additions and 1 deletions

View File

@ -931,7 +931,7 @@ void SwingSchedulerDAG::schedule() {
}
});
llvm::sort(NodeSets.begin(), NodeSets.end(), std::greater<NodeSet>());
std::stable_sort(NodeSets.begin(), NodeSets.end(), std::greater<NodeSet>());
groupRemainingNodes(NodeSets);