aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/CodeMoverUtils.cpp
diff options
context:
space:
mode:
authorNicolas Vasilache <ntv@google.com>2020-01-28 13:44:37 -0500
committerNicolas Vasilache <ntv@google.com>2020-01-29 09:52:51 -0500
commitea1e3369f7a8aa9729f8e2fc208b8f6a79392874 (patch)
tree58ec0cd7b7b04ed4f526937e15d8feddd19e7f81 /llvm/lib/Transforms/Utils/CodeMoverUtils.cpp
parent02adfb5155e5ee1bb94b9b196db57b9902ae8278 (diff)
downloadllvm-ea1e3369f7a8aa9729f8e2fc208b8f6a79392874.zip
llvm-ea1e3369f7a8aa9729f8e2fc208b8f6a79392874.tar.gz
llvm-ea1e3369f7a8aa9729f8e2fc208b8f6a79392874.tar.bz2
[mlir][Linalg] Introduce folding patterns to remove certain MemRefCastOp
Summary: Canonicalization and folding patterns in StandardOps may interfere with the needs of Linalg. This revision introduces specific foldings for dynamic memrefs that can be proven to be static. Very concretely: Determines whether it is possible to fold it away in the parent Linalg op: ```mlir %1 = memref_cast %0 : memref<8x16xf32> to memref<?x?xf32> %2 = linalg.slice %1 ... : memref<?x?xf32> ... // or %1 = memref_cast %0 : memref<8x16xf32, affine_map<(i, j)->(16 * i + j)>> to memref<?x?xf32> linalg.generic(%1 ...) : memref<?x?xf32> ... ``` into ```mlir %2 = linalg.slice %0 ... : memref<8x16xf32> ... // or linalg.generic(%0 ... : memref<8x16xf32, affine_map<(i, j)->(16 * i + j)>> ``` Reviewers: ftynse, aartbik, jsetoain, tetuante, asaadaldien Subscribers: mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, arpith-jacob, mgester, lucyrfox, liufengdb, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D73565
Diffstat (limited to 'llvm/lib/Transforms/Utils/CodeMoverUtils.cpp')
0 files changed, 0 insertions, 0 deletions