[PATCH] D79438: [mlir] Add a MemRefCastOp canonicalization pattern.

Nicolas Vasilache via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 5 11:20:18 PDT 2020


nicolasvasilache created this revision.
nicolasvasilache added reviewers: ftynse, poechsel.
Herald added subscribers: llvm-commits, Kayjukh, frgossen, grosul1, Joonsoo, liufengdb, aartbik, lucyrfox, mgester, arpith-jacob, antiagainst, shauheen, jpienaar, rriddle, mehdi_amini.
Herald added a project: LLVM.

This revision adds a conservative canonicalization pattern for MemRefCastOp that are typically inserted during ViewOp and SubViewOp canonicalization.
Ideally such canonicalizations would propagate the type to consumers but this is not a local behavior. As a consequence MemRefCastOp are introduced to keep type compatibility but need to be cleaned up later, in the case where more dynamic behavior than necessary is introduced.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D79438

Files:
  mlir/include/mlir/Dialect/StandardOps/IR/Ops.h
  mlir/include/mlir/Dialect/StandardOps/IR/Ops.td
  mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
  mlir/lib/Dialect/StandardOps/IR/Ops.cpp
  mlir/test/Transforms/canonicalize.mlir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79438.262177.patch
Type: text/x-patch
Size: 10317 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200505/ffcfe895/attachment.bin>


More information about the llvm-commits mailing list