[Mlir-commits] [mlir] 0841f71 - [MLIR][Linalg] Fix assertion in dependency analysis

Frederik Gossen llvmlistbot at llvm.org
Tue Sep 22 03:21:48 PDT 2020


Author: Frederik Gossen
Date: 2020-09-22T10:21:26Z
New Revision: 0841f7172b74e1cbe2ce9839e5f4e1f0c2836bef

URL: https://github.com/llvm/llvm-project/commit/0841f7172b74e1cbe2ce9839e5f4e1f0c2836bef
DIFF: https://github.com/llvm/llvm-project/commit/0841f7172b74e1cbe2ce9839e5f4e1f0c2836bef.diff

LOG: [MLIR][Linalg] Fix assertion in dependency analysis

The assertion falsely expected ranked memrefs only.  Now both, ranked and
unranked memrefs are allowed.

Differential Revision: https://reviews.llvm.org/D88080

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 af15740af2a8..292a3268cf88 100644
--- a/mlir/lib/Dialect/Linalg/Analysis/DependenceAnalysis.cpp
+++ b/mlir/lib/Dialect/Linalg/Analysis/DependenceAnalysis.cpp
@@ -30,7 +30,8 @@ Value Aliases::find(Value v) {
 
   auto it = aliases.find(v);
   if (it != aliases.end()) {
-    assert(it->getSecond().getType().isa<MemRefType>() && "Memref expected");
+    assert(it->getSecond().getType().isa<BaseMemRefType>() &&
+           "Memref expected");
     return it->getSecond();
   }
 


        


More information about the Mlir-commits mailing list