[llvm] f8f2e65 - [llvm] Use llvm::any_of (NFC) (#141444)
via llvm-commits
llvm-commits at lists.llvm.org
Mon May 26 09:13:24 PDT 2025
Author: Kazu Hirata
Date: 2025-05-26T09:13:21-07:00
New Revision: f8f2e65c9498adc752f5dce1a7fd08db8ac97e75
URL: https://github.com/llvm/llvm-project/commit/f8f2e65c9498adc752f5dce1a7fd08db8ac97e75
DIFF: https://github.com/llvm/llvm-project/commit/f8f2e65c9498adc752f5dce1a7fd08db8ac97e75.diff
LOG: [llvm] Use llvm::any_of (NFC) (#141444)
Added:
Modified:
llvm/lib/Target/AMDGPU/AMDGPUWaitSGPRHazards.cpp
llvm/unittests/DebugInfo/LogicalView/DWARFReaderTest.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUWaitSGPRHazards.cpp b/llvm/lib/Target/AMDGPU/AMDGPUWaitSGPRHazards.cpp
index 4c88b7e09eee7..61c5dcd5ebada 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUWaitSGPRHazards.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUWaitSGPRHazards.cpp
@@ -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
diff --git a/llvm/unittests/DebugInfo/LogicalView/DWARFReaderTest.cpp b/llvm/unittests/DebugInfo/LogicalView/DWARFReaderTest.cpp
index 0af560f2b65f6..54a5bd400baf8 100644
--- a/llvm/unittests/DebugInfo/LogicalView/DWARFReaderTest.cpp
+++ b/llvm/unittests/DebugInfo/LogicalView/DWARFReaderTest.cpp
@@ -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.
More information about the llvm-commits
mailing list