forked from OSchip/llvm-project
[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:
parent
321f24ec42
commit
6c2f868bbd
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue