Added a trait, MemRefsNormalizable in LoadOp and StoreOp of Standard Ops
to normalize input memrefs in LoadOp and StoreOp.
Related revision: https://reviews.llvm.org/D86236
Differential D88156
[mlir] Normalize memrefs in LoadOp and StoreOp of Standard Ops imaihal on Sep 23 2020, 8:24 AM. Authored by
Details Added a trait, MemRefsNormalizable in LoadOp and StoreOp of Standard Ops Related revision: https://reviews.llvm.org/D86236
Diff Detail
Event TimelineComment Actions When we use load and store ops like the test in this patch, the --normalize-memrefs does not work. This patch fix it by adding MemRefsNormalizable trait in load and store ops. More practical example is here. https://github.com/llvm/llvm-project/blob/master/mlir/test/Dialect/Linalg/affine.mlir#L92-L94 affine.load can not be used here. @bondhugula @AlexEichenberger @avarmapml Could you review this patch? Comment Actions Thanks for adding this!
Comment Actions Thanks, glad to see that the traits make such changes easy... Please correct Uday's nit, and its good to go. Comment Actions
Yes. The traits are very useful. We might need to add them in other ops depending on use-case, but it is easy. @bondhugula I don't have commit permission. Could you commit this patch? |
Nit: for readability, it may be good to define the map to use here right before the function instead of reusing #map0 defined all the way up. You could use say:
#map_tile = ...