diff options
author | Mandeep Singh Grang <mgrang@codeaurora.org> | 2018-03-24 17:15:04 +0000 |
---|---|---|
committer | Mandeep Singh Grang <mgrang@codeaurora.org> | 2018-03-24 17:15:04 +0000 |
commit | 860adef9e6e41d6a7669b89a8b7068c0b85357c2 (patch) | |
tree | c522c3e3b501b31c5119eeabf6f91b476d27fd1b | |
parent | 94fafdfdedcf9230331a0c4ba9629888657e187d (diff) | |
download | bcm5719-llvm-860adef9e6e41d6a7669b89a8b7068c0b85357c2.tar.gz bcm5719-llvm-860adef9e6e41d6a7669b89a8b7068c0b85357c2.zip |
[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
llvm-svn: 328429
-rw-r--r-- | llvm/lib/Target/AMDGPU/GCNIterativeScheduler.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/AMDGPU/GCNIterativeScheduler.cpp b/llvm/lib/Target/AMDGPU/GCNIterativeScheduler.cpp index 9c6a307ea09..26282970ff0 100644 --- a/llvm/lib/Target/AMDGPU/GCNIterativeScheduler.cpp +++ b/llvm/lib/Target/AMDGPU/GCNIterativeScheduler.cpp @@ -433,7 +433,7 @@ void GCNIterativeScheduler::scheduleRegion(Region &R, Range &&Schedule, // 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); }); |