[llvm] r328429 - [AMDGPU] Change std::sort to llvm::sort in response to r327219

Mandeep Singh Grang via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 24 10:15:04 PDT 2018


Author: mgrang
Date: Sat Mar 24 10:15:04 2018
New Revision: 328429

URL: http://llvm.org/viewvc/llvm-project?rev=328429&view=rev
Log:
[AMDGPU] Change std::sort to llvm::sort in response to r327219

Summary:
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.

Reviewers: tstellar, RKSimon, arsenm

Reviewed By: arsenm

Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, tpr, llvm-commits, t-tye

Differential Revision: https://reviews.llvm.org/D44856

Modified:
    llvm/trunk/lib/Target/AMDGPU/GCNIterativeScheduler.cpp

Modified: llvm/trunk/lib/Target/AMDGPU/GCNIterativeScheduler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/GCNIterativeScheduler.cpp?rev=328429&r1=328428&r2=328429&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/GCNIterativeScheduler.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/GCNIterativeScheduler.cpp Sat Mar 24 10:15:04 2018
@@ -433,7 +433,7 @@ void GCNIterativeScheduler::scheduleRegi
 // Sort recorded regions by pressure - highest at the front
 void GCNIterativeScheduler::sortRegionsByPressure(unsigned TargetOcc) {
   const auto &ST = MF.getSubtarget<SISubtarget>();
-  std::sort(Regions.begin(), Regions.end(),
+  llvm::sort(Regions.begin(), Regions.end(),
     [&ST, TargetOcc](const Region *R1, const Region *R2) {
     return R2->MaxPressure.less(ST, R1->MaxPressure, TargetOcc);
   });




More information about the llvm-commits mailing list