Skip to content

Commit 6e18003

Browse files
[llvm] Use llvm::any_of (NFC)
1 parent 5a98dd6 commit 6e18003

File tree

2 files changed

+11
-14
lines changed

2 files changed

+11
-14
lines changed

llvm/lib/DebugInfo/LogicalView/Core/LVCompare.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -206,11 +206,10 @@ Error LVCompare::execute(LVReader *ReferenceReader, LVReader *TargetReader) {
206206
updateExpected(Reference);
207207
Reference->setIsInCompare();
208208
LVElement *CurrentTarget = nullptr;
209-
if (std::any_of(Targets.begin(), Targets.end(),
210-
[&](auto Target) -> bool {
211-
CurrentTarget = Target;
212-
return Reference->equals(Target);
213-
})) {
209+
if (llvm::any_of(Targets, [&](auto Target) -> bool {
210+
CurrentTarget = Target;
211+
return Reference->equals(Target);
212+
})) {
214213
if (Pass == LVComparePass::Missing && Reference->getIsScope()) {
215214
// If the elements being compared are scopes and are a match,
216215
// they are recorded, to be used when creating the augmented

llvm/lib/Target/AMDGPU/AMDGPUIGroupLP.cpp

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -965,11 +965,10 @@ class MFMASmallGemmSingleWaveOpt final : public IGLPStrategy {
965965

966966
// Does the VALU have a DS_WRITE successor that is the same as other
967967
// VALU already in the group. The V_PERMs will all share 1 DS_W succ
968-
return std::any_of(Cache->begin(), Cache->end(), [&SU](SUnit *Elt) {
969-
return std::any_of(SU->Succs.begin(), SU->Succs.end(),
970-
[&Elt](const SDep &ThisSucc) {
971-
return ThisSucc.getSUnit() == Elt;
972-
});
968+
return llvm::any_of(*Cache, [&SU](SUnit *Elt) {
969+
return llvm::any_of(SU->Succs, [&Elt](const SDep &ThisSucc) {
970+
return ThisSucc.getSUnit() == Elt;
971+
});
973972
});
974973
}
975974

@@ -1088,10 +1087,9 @@ class MFMASmallGemmSingleWaveOpt final : public IGLPStrategy {
10881087
auto DAG = SyncPipe[0].DAG;
10891088
// Does the previous DS_WRITE share a V_PERM predecessor with this
10901089
// VMEM_READ
1091-
return (
1092-
std::any_of(Cache->begin(), Cache->end(), [&SU, &DAG](SUnit *Elt) {
1093-
return DAG->IsReachable(const_cast<SUnit *>(SU), Elt);
1094-
}));
1090+
return llvm::any_of(*Cache, [&SU, &DAG](SUnit *Elt) {
1091+
return DAG->IsReachable(const_cast<SUnit *>(SU), Elt);
1092+
});
10951093
}
10961094
SharesPredWithPrevNthGroup(unsigned Distance, const SIInstrInfo *TII,
10971095
unsigned SGID, bool NeedsCache = false)

0 commit comments

Comments
 (0)