Skip to content

Conversation

@kazutakahirata
Copy link
Contributor

We don't need a lambda here.

@llvmbot
Copy link
Member

llvmbot commented Jun 6, 2025

@llvm/pr-subscribers-llvm-transforms

Author: Kazu Hirata (kazutakahirata)

Changes

We don't need a lambda here.


Full diff: https://github.com/llvm/llvm-project/pull/143059.diff

1 Files Affected:

  • (modified) llvm/lib/Transforms/IPO/SCCP.cpp (+2-4)
diff --git a/llvm/lib/Transforms/IPO/SCCP.cpp b/llvm/lib/Transforms/IPO/SCCP.cpp
index 9d15dd0c10388..43c5df3575003 100644
--- a/llvm/lib/Transforms/IPO/SCCP.cpp
+++ b/llvm/lib/Transforms/IPO/SCCP.cpp
@@ -76,10 +76,8 @@ static void findReturnsToZap(Function &F,
                if (!isa<CallBase>(U))
                  return true;
                if (U->getType()->isStructTy()) {
-                 return all_of(Solver.getStructLatticeValueFor(U),
-                               [](const ValueLatticeElement &LV) {
-                                 return !SCCPSolver::isOverdefined(LV);
-                               });
+                 return none_of(Solver.getStructLatticeValueFor(U),
+                                SCCPSolver::isOverdefined);
                }
 
                // We don't consider assume-like intrinsics to be actual address

@kazutakahirata kazutakahirata merged commit ad6631f into llvm:main Jun 6, 2025
9 checks passed
@kazutakahirata kazutakahirata deleted the cleanup_20250605_lambda_llvm_SCCP branch June 6, 2025 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants