[Mlir-commits] [mlir] ffac5b8 - [mlir][linalg] Allow tensor_to_memref in dependence analysis

Stephan Herhut llvmlistbot at llvm.org
Tue Nov 17 05:38:01 PST 2020


Author: Stephan Herhut
Date: 2020-11-17T14:37:47+01:00
New Revision: ffac5b8e4cc03cbc7ff6d53bb6bf0118dace8d55

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

LOG: [mlir][linalg] Allow tensor_to_memref in dependence analysis

This enables the use of fusion on buffers in partially lowered
programs.

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

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 96da933888f2..0a49cac6a65a 100644
--- a/mlir/lib/Dialect/Linalg/Analysis/DependenceAnalysis.cpp
+++ b/mlir/lib/Dialect/Linalg/Analysis/DependenceAnalysis.cpp
@@ -43,6 +43,9 @@ Value Aliases::find(Value v) {
     if (!defOp)
       return v;
 
+    if (isa<TensorToMemrefOp>(defOp))
+      return v;
+
     if (auto memEffect = dyn_cast<MemoryEffectOpInterface>(defOp)) {
       // Collect all memory effects on `v`.
       SmallVector<MemoryEffects::EffectInstance, 1> effects;


        


More information about the Mlir-commits mailing list