Update mlir/lib/Dialect/Affine/IR/AffineOps.cpp

Co-authored-by: Mehdi Amini <joker.eph@gmail.com>
This commit is contained in:
William Moses 2025-08-22 13:22:18 +02:00 committed by GitHub
parent 19530291b9
commit fadebb7526
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -430,11 +430,7 @@ bool mlir::affine::isValidSymbol(Value value) {
/// 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();
Region *parentRegion = value.getParentRegion();
do {
if (parentRegion == region)
return true;