OSDN Git Service

[Pipeliner] Use std::stable_sort when ordering NodeSets
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>
Thu, 12 Apr 2018 15:11:11 +0000 (15:11 +0000)
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>
Thu, 12 Apr 2018 15:11:11 +0000 (15:11 +0000)
commitf0086dd6e31f710fac8dfa36567b496ac06c03a8
treed04332d176e46a90c8f8539ca84ec2c36beaa250
parent293041f69056086b53b6559c69bcb7aaf4df1159
[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329915 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/MachinePipeliner.cpp