Skip to content

[llvm] Use llvm::any_of (NFC) #141444

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions llvm/lib/Target/AMDGPU/AMDGPUWaitSGPRHazards.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -357,10 +357,8 @@ class AMDGPUWaitSGPRHazards {

// Only consider implicit VCC specified by instruction descriptor.
const bool HasImplicitVCC =
llvm::any_of(MI->getDesc().implicit_uses(),
[](MCPhysReg Reg) { return isVCC(Reg); }) ||
llvm::any_of(MI->getDesc().implicit_defs(),
[](MCPhysReg Reg) { return isVCC(Reg); });
llvm::any_of(MI->getDesc().implicit_uses(), isVCC) ||
llvm::any_of(MI->getDesc().implicit_defs(), isVCC);

if (IsSetPC) {
// All SGPR writes before a call/return must be flushed as the
Expand Down
11 changes: 4 additions & 7 deletions llvm/unittests/DebugInfo/LogicalView/DWARFReaderTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,10 @@ void checkUnspecifiedParameters(LVReader *Reader) {
// `int foo_printf(const char *, ...)`, where the '...' is represented by a
// DW_TAG_unspecified_parameters, i.e. we expect to find at least one child
// for which getIsUnspecified() returns true.
EXPECT_EQ(std::any_of(
Elements->begin(), Elements->end(),
[](const LVElement *elt) {
return elt->getIsSymbol() &&
static_cast<const LVSymbol *>(elt)->getIsUnspecified();
}),
true);
EXPECT_TRUE(llvm::any_of(*Elements, [](const LVElement *elt) {
return elt->getIsSymbol() &&
static_cast<const LVSymbol *>(elt)->getIsUnspecified();
}));
}

// Check the basic properties on parsed DW_TAG_module.
Expand Down