[Mlir-commits] [mlir] [MLIR][NFC] Speed up is valid symbol check (PR #154924)
William Moses
llvmlistbot at llvm.org
Fri Aug 22 04:22:22 PDT 2025
================
@@ -427,6 +427,25 @@ bool mlir::affine::isValidSymbol(Value value) {
return false;
}
+/// A utility function to check if a value is defined at the top level of
+/// `region` or is an argument of `region` or dominates the region.
+static bool isTopLevelValueOrDominator(Value value, Region *region) {
+ Region *parentRegion;
+ if (auto arg = dyn_cast<BlockArgument>(value))
+ parentRegion = arg.getParentRegion();
+ else
+ parentRegion = value.getDefiningOp()->getParentRegion();
----------------
wsmoses wrote:
sure, I just left it the way it was in isTopLevelValue
https://github.com/llvm/llvm-project/pull/154924
More information about the Mlir-commits
mailing list