[llvm] using wrapper llvm::sort(nfc) (#151000)
using wrapper llvm::sort(nfc)
This commit is contained in:
parent
d6c2e53151
commit
c7bacc9f26
@ -610,7 +610,7 @@ public:
|
|||||||
std::vector<StringRef> ModulePaths;
|
std::vector<StringRef> ModulePaths;
|
||||||
for (auto &[ModPath, _] : Index.modulePaths())
|
for (auto &[ModPath, _] : Index.modulePaths())
|
||||||
ModulePaths.push_back(ModPath);
|
ModulePaths.push_back(ModPath);
|
||||||
llvm::sort(ModulePaths.begin(), ModulePaths.end());
|
llvm::sort(ModulePaths);
|
||||||
for (auto &ModPath : ModulePaths)
|
for (auto &ModPath : ModulePaths)
|
||||||
Callback(*Index.modulePaths().find(ModPath));
|
Callback(*Index.modulePaths().find(ModPath));
|
||||||
}
|
}
|
||||||
|
@ -1163,7 +1163,7 @@ int SlotTracker::processIndex() {
|
|||||||
std::vector<StringRef> ModulePaths;
|
std::vector<StringRef> ModulePaths;
|
||||||
for (auto &[ModPath, _] : TheIndex->modulePaths())
|
for (auto &[ModPath, _] : TheIndex->modulePaths())
|
||||||
ModulePaths.push_back(ModPath);
|
ModulePaths.push_back(ModPath);
|
||||||
llvm::sort(ModulePaths.begin(), ModulePaths.end());
|
llvm::sort(ModulePaths);
|
||||||
for (auto &ModPath : ModulePaths)
|
for (auto &ModPath : ModulePaths)
|
||||||
CreateModulePathSlot(ModPath);
|
CreateModulePathSlot(ModPath);
|
||||||
|
|
||||||
|
@ -306,7 +306,7 @@ void BalancedPartitioning::split(const FunctionNodeRange Nodes,
|
|||||||
unsigned NumNodes = std::distance(Nodes.begin(), Nodes.end());
|
unsigned NumNodes = std::distance(Nodes.begin(), Nodes.end());
|
||||||
auto NodesMid = Nodes.begin() + (NumNodes + 1) / 2;
|
auto NodesMid = Nodes.begin() + (NumNodes + 1) / 2;
|
||||||
|
|
||||||
llvm::sort(Nodes.begin(), Nodes.end(), [](auto &L, auto &R) {
|
llvm::sort(Nodes, [](auto &L, auto &R) {
|
||||||
return L.InputOrderIndex < R.InputOrderIndex;
|
return L.InputOrderIndex < R.InputOrderIndex;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -236,7 +236,7 @@ cl::opt<LoweringKind> LoweringKindLoc(
|
|||||||
"Lower via mixture of above strategies")));
|
"Lower via mixture of above strategies")));
|
||||||
|
|
||||||
template <typename T> std::vector<T> sortByName(std::vector<T> &&V) {
|
template <typename T> std::vector<T> sortByName(std::vector<T> &&V) {
|
||||||
llvm::sort(V.begin(), V.end(), [](const auto *L, const auto *R) {
|
llvm::sort(V, [](const auto *L, const auto *R) {
|
||||||
return L->getName() < R->getName();
|
return L->getName() < R->getName();
|
||||||
});
|
});
|
||||||
return {std::move(V)};
|
return {std::move(V)};
|
||||||
|
@ -1987,7 +1987,7 @@ SmallVector<uint32_t, 8> HvxSelector::getPerfectCompletions(ShuffleMask SM,
|
|||||||
// times). In such cases it will be impossible to complete this to a
|
// times). In such cases it will be impossible to complete this to a
|
||||||
// perfect shuffle.
|
// perfect shuffle.
|
||||||
SmallVector<uint32_t, 8> Sorted(Worklist);
|
SmallVector<uint32_t, 8> Sorted(Worklist);
|
||||||
llvm::sort(Sorted.begin(), Sorted.end());
|
llvm::sort(Sorted);
|
||||||
|
|
||||||
for (unsigned I = 0, E = Sorted.size(); I != E;) {
|
for (unsigned I = 0, E = Sorted.size(); I != E;) {
|
||||||
unsigned P = Sorted[I], Count = 1;
|
unsigned P = Sorted[I], Count = 1;
|
||||||
|
@ -308,7 +308,7 @@ public:
|
|||||||
|
|
||||||
for (auto &U : I->uses())
|
for (auto &U : I->uses())
|
||||||
op_push_back(U.getUser());
|
op_push_back(U.getUser());
|
||||||
llvm::sort(op_begin(), op_end());
|
llvm::sort(operands());
|
||||||
}
|
}
|
||||||
|
|
||||||
void setMemoryUseOrder(unsigned MUO) { MemoryUseOrder = MUO; }
|
void setMemoryUseOrder(unsigned MUO) { MemoryUseOrder = MUO; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user