diff options
Diffstat (limited to 'llvm/tools/llvm-mca/lib/InstrBuilder.cpp')
-rw-r--r-- | llvm/tools/llvm-mca/lib/InstrBuilder.cpp | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/llvm/tools/llvm-mca/lib/InstrBuilder.cpp b/llvm/tools/llvm-mca/lib/InstrBuilder.cpp index 4ada7df1e11..5195ef2fe95 100644 --- a/llvm/tools/llvm-mca/lib/InstrBuilder.cpp +++ b/llvm/tools/llvm-mca/lib/InstrBuilder.cpp @@ -64,16 +64,15 @@ static void initializeUsedResources(InstrDesc &ID, // Sort elements by mask popcount, so that we prioritize resource units over // resource groups, and smaller groups over larger groups. - llvm::sort(Worklist, - [](const ResourcePlusCycles &A, const ResourcePlusCycles &B) { - unsigned popcntA = countPopulation(A.first); - unsigned popcntB = countPopulation(B.first); - if (popcntA < popcntB) - return true; - if (popcntA > popcntB) - return false; - return A.first < B.first; - }); + sort(Worklist, [](const ResourcePlusCycles &A, const ResourcePlusCycles &B) { + unsigned popcntA = countPopulation(A.first); + unsigned popcntB = countPopulation(B.first); + if (popcntA < popcntB) + return true; + if (popcntA > popcntB) + return false; + return A.first < B.first; + }); uint64_t UsedResourceUnits = 0; @@ -351,7 +350,7 @@ InstrBuilder::createInstrDescImpl(const MCInst &MCI) { const MCSchedClassDesc &SCDesc = *SM.getSchedClassDesc(SchedClassID); if (SCDesc.NumMicroOps == MCSchedClassDesc::InvalidNumMicroOps) { std::string ToString; - llvm::raw_string_ostream OS(ToString); + raw_string_ostream OS(ToString); WithColor::error() << "found an unsupported instruction in the input" << " assembly sequence.\n"; MCIP.printInst(&MCI, OS, "", STI); |