[Mlir-commits] [mlir] [MLIR][NFC] Speed up is valid symbol check (PR #154924)
William Moses
llvmlistbot at llvm.org
Fri Aug 22 04:54:18 PDT 2025
================
@@ -465,22 +478,22 @@ bool mlir::affine::isValidSymbol(Value value, Region *region) {
return true;
// `Pure` operation that whose operands are valid symbolic identifiers.
- if (isPure(defOp) && llvm::all_of(defOp->getOperands(), [&](Value operand) {
- return affine::isValidSymbol(operand, region);
- })) {
- return true;
+ if (isPure(defOp)) {
+ bool allValid = true;
+ for (auto operand : defOp->getOperands()) {
+ if (!affine::isValidSymbol(operand, region)) {
+ allValid = false;
+ break;
+ }
+ }
+ if (allValid)
+ return true;
----------------
wsmoses wrote:
made like a change from 3m56s on the big code to 3m57s, putting this part back to all_of
https://github.com/llvm/llvm-project/pull/154924
More information about the Mlir-commits
mailing list