[PATCH] D44853: [AArch64] Change std::sort to llvm::sort in response to r327219
Mandeep Singh Grang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 23 16:44:19 PDT 2018
mgrang created this revision.
mgrang added reviewers: t.p.northover, jmolloy.
Herald added subscribers: kristof.beyls, javed.absar, rengolin.
r327219 added wrappers to std::sort which randomly shuffle the container before sorting.
This will help in uncovering non-determinism caused due to undefined sorting
order of objects having the same key.
To make use of that infrastructure we need to invoke llvm::sort instead of std::sort.
Repository:
rL LLVM
https://reviews.llvm.org/D44853
Files:
lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp
Index: lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp
===================================================================
--- lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp
+++ lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp
@@ -375,9 +375,9 @@
// Now we have a set of sets, order them by start address so
// we can iterate over them sequentially.
- std::sort(V.begin(), V.end(),
- [](const std::vector<Chain*> &A,
- const std::vector<Chain*> &B) {
+ llvm::sort(V.begin(), V.end(),
+ [](const std::vector<Chain*> &A,
+ const std::vector<Chain*> &B) {
return A.front()->startsBefore(B.front());
});
@@ -451,7 +451,7 @@
// change them to!
// Final tie-break with instruction order so pass output is stable (i.e. not
// dependent on malloc'd pointer values).
- std::sort(GV.begin(), GV.end(), [](const Chain *G1, const Chain *G2) {
+ llvm::sort(GV.begin(), GV.end(), [](const Chain *G1, const Chain *G2) {
if (G1->size() != G2->size())
return G1->size() > G2->size();
if (G1->requiresFixup() != G2->requiresFixup())
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44853.139674.patch
Type: text/x-patch
Size: 1128 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180323/909badcf/attachment.bin>
More information about the llvm-commits
mailing list