[llvm-branch-commits] [mlir] 7ea9492 - [mlir] Allow RegionBranchOps in dependence analysis
Tres Popp via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Dec 9 13:36:14 PST 2020
Author: Tres Popp
Date: 2020-12-09T22:32:04+01:00
New Revision: 7ea94922fa0d8ac6b041c0dc4cd9f8135f0e60bb
URL: https://github.com/llvm/llvm-project/commit/7ea94922fa0d8ac6b041c0dc4cd9f8135f0e60bb
DIFF: https://github.com/llvm/llvm-project/commit/7ea94922fa0d8ac6b041c0dc4cd9f8135f0e60bb.diff
LOG: [mlir] Allow RegionBranchOps in dependence analysis
This is to prevent assertion failures on scf.if and shape.assuming
operations where this is not enough information currently to handle any
aliasing information.
Differential Revision: https://reviews.llvm.org/D92963
Added:
Modified:
mlir/lib/Dialect/Linalg/Analysis/DependenceAnalysis.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/Linalg/Analysis/DependenceAnalysis.cpp b/mlir/lib/Dialect/Linalg/Analysis/DependenceAnalysis.cpp
index 99e2e6ab07f2..ca2d16e8de86 100644
--- a/mlir/lib/Dialect/Linalg/Analysis/DependenceAnalysis.cpp
+++ b/mlir/lib/Dialect/Linalg/Analysis/DependenceAnalysis.cpp
@@ -43,6 +43,10 @@ Value Aliases::find(Value v) {
if (!defOp)
return v;
+ // Treat RegionBranchOpInterfaces like an allocate and don't try to follow
+ // the aliasing further.
+ if (isa<RegionBranchOpInterface>(defOp))
+ return v;
if (isa<TensorToMemrefOp>(defOp))
return v;
More information about the llvm-branch-commits
mailing list