Skip to content

Commit

Permalink
[llvm] Use llvm::any_of (NFC)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazutakahirata committed Oct 22, 2023
1 parent 5a98dd6 commit 6e18003
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
9 changes: 4 additions & 5 deletions llvm/lib/DebugInfo/LogicalView/Core/LVCompare.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,10 @@ Error LVCompare::execute(LVReader *ReferenceReader, LVReader *TargetReader) {
updateExpected(Reference);
Reference->setIsInCompare();
LVElement *CurrentTarget = nullptr;
if (std::any_of(Targets.begin(), Targets.end(),
[&](auto Target) -> bool {
CurrentTarget = Target;
return Reference->equals(Target);
})) {
if (llvm::any_of(Targets, [&](auto Target) -> bool {
CurrentTarget = Target;
return Reference->equals(Target);
})) {
if (Pass == LVComparePass::Missing && Reference->getIsScope()) {
// If the elements being compared are scopes and are a match,
// they are recorded, to be used when creating the augmented
Expand Down
16 changes: 7 additions & 9 deletions llvm/lib/Target/AMDGPU/AMDGPUIGroupLP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -965,11 +965,10 @@ class MFMASmallGemmSingleWaveOpt final : public IGLPStrategy {

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

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

0 comments on commit 6e18003

Please sign in to comment.