diff options
author | Fangrui Song <maskray@google.com> | 2018-09-27 02:13:45 +0000 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2018-09-27 02:13:45 +0000 |
commit | 0cac726a00a2be06a959a89efe6587dba28e5822 (patch) | |
tree | ca196a4c9ae371e54d735a6e5ee085de8c885d4f /llvm/tools/llvm-exegesis/lib/Analysis.cpp | |
parent | f1c96490d425cb2253871936a91083e177e866b0 (diff) | |
download | llvm-0cac726a00a2be06a959a89efe6587dba28e5822.zip llvm-0cac726a00a2be06a959a89efe6587dba28e5822.tar.gz llvm-0cac726a00a2be06a959a89efe6587dba28e5822.tar.bz2 |
llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...)
Summary: The convenience wrapper in STLExtras is available since rL342102.
Reviewers: dblaikie, javed.absar, JDevlieghere, andreadb
Subscribers: MatzeB, sanjoy, arsenm, dschuff, mehdi_amini, sdardis, nemanjai, jvesely, nhaehnle, sbc100, jgravelle-google, eraman, aheejin, kbarton, JDevlieghere, javed.absar, gbedwell, jrtc27, mgrang, atanasyan, steven_wu, george.burgess.iv, dexonsmith, kristina, jsji, llvm-commits
Differential Revision: https://reviews.llvm.org/D52573
llvm-svn: 343163
Diffstat (limited to 'llvm/tools/llvm-exegesis/lib/Analysis.cpp')
-rw-r--r-- | llvm/tools/llvm-exegesis/lib/Analysis.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/llvm/tools/llvm-exegesis/lib/Analysis.cpp b/llvm/tools/llvm-exegesis/lib/Analysis.cpp index 1da36b2..805bd52 100644 --- a/llvm/tools/llvm-exegesis/lib/Analysis.cpp +++ b/llvm/tools/llvm-exegesis/lib/Analysis.cpp @@ -668,10 +668,9 @@ void distributePressure(float RemainingPressure, llvm::SmallVector<float, 32> &DensePressure) { // Find the number of subunits with minimal pressure (they are at the // front). - llvm::sort(Subunits.begin(), Subunits.end(), - [&DensePressure](const uint16_t A, const uint16_t B) { - return DensePressure[A] < DensePressure[B]; - }); + llvm::sort(Subunits, [&DensePressure](const uint16_t A, const uint16_t B) { + return DensePressure[A] < DensePressure[B]; + }); const auto getPressureForSubunit = [&DensePressure, &Subunits](size_t I) -> float & { return DensePressure[Subunits[I]]; @@ -718,11 +717,10 @@ std::vector<std::pair<uint16_t, float>> computeIdealizedProcResPressure( llvm::SmallVector<llvm::MCWriteProcResEntry, 8> WPRS) { // DensePressure[I] is the port pressure for Proc Resource I. llvm::SmallVector<float, 32> DensePressure(SM.getNumProcResourceKinds()); - llvm::sort(WPRS.begin(), WPRS.end(), - [](const llvm::MCWriteProcResEntry &A, - const llvm::MCWriteProcResEntry &B) { - return A.ProcResourceIdx < B.ProcResourceIdx; - }); + llvm::sort(WPRS, [](const llvm::MCWriteProcResEntry &A, + const llvm::MCWriteProcResEntry &B) { + return A.ProcResourceIdx < B.ProcResourceIdx; + }); for (const llvm::MCWriteProcResEntry &WPR : WPRS) { // Get units for the entry. const llvm::MCProcResourceDesc *const ProcResDesc = |