[PATCH] D44870: [PowerPC] Change std::sort to llvm::sort in response to r327219

Mandeep Singh Grang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 24 10:40:52 PDT 2018


mgrang created this revision.
mgrang added reviewers: hfinkel, RKSimon.
Herald added subscribers: kbarton, nemanjai.

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.

Note: This patch is one of a series of patches to replace *all* std::sort to llvm::sort.
Refer the comments section in https://reviews.llvm.org/D44363 for a list of all the required patches.


Repository:
  rL LLVM

https://reviews.llvm.org/D44870

Files:
  lib/Target/PowerPC/PPCISelDAGToDAG.cpp


Index: lib/Target/PowerPC/PPCISelDAGToDAG.cpp
===================================================================
--- lib/Target/PowerPC/PPCISelDAGToDAG.cpp
+++ lib/Target/PowerPC/PPCISelDAGToDAG.cpp
@@ -1394,7 +1394,7 @@
     for (auto &I : ValueRots) {
       ValueRotsVec.push_back(I.second);
     }
-    std::sort(ValueRotsVec.begin(), ValueRotsVec.end());
+    llvm::sort(ValueRotsVec.begin(), ValueRotsVec.end());
   }
 
   // In 64-bit mode, rlwinm and friends have a rotation operator that


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44870.139720.patch
Type: text/x-patch
Size: 498 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180324/6c253b3e/attachment.bin>


More information about the llvm-commits mailing list