diff options
Diffstat (limited to 'mlir/lib/Analysis/Utils.cpp')
-rw-r--r-- | mlir/lib/Analysis/Utils.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mlir/lib/Analysis/Utils.cpp b/mlir/lib/Analysis/Utils.cpp index 14635a1..7b3cd58 100644 --- a/mlir/lib/Analysis/Utils.cpp +++ b/mlir/lib/Analysis/Utils.cpp @@ -974,11 +974,12 @@ void mlir::getSequentialLoops(AffineForOp forOp, bool mlir::isLoopParallel(AffineForOp forOp) { // Collect all load and store ops in loop nest rooted at 'forOp'. SmallVector<Operation *, 8> loadAndStoreOpInsts; - auto walkResult = forOp.walk([&](Operation *opInst) { + auto walkResult = forOp.walk([&](Operation *opInst) -> WalkResult { if (isa<AffineLoadOp>(opInst) || isa<AffineStoreOp>(opInst)) loadAndStoreOpInsts.push_back(opInst); else if (!isa<AffineForOp>(opInst) && !isa<AffineTerminatorOp>(opInst) && - !isa<AffineIfOp>(opInst) && !opInst->hasNoSideEffect()) + !isa<AffineIfOp>(opInst) && + !MemoryEffectOpInterface::hasNoEffect(opInst)) return WalkResult::interrupt(); return WalkResult::advance(); |