[MLIR] Support for ReturnOps in memref map layout normalization
authoravarmapml <abhishek.varma@polymagelabs.com>
Thu, 13 Aug 2020 13:39:22 +0000 (19:09 +0530)
committerUday Bondhugula <uday@polymagelabs.com>
Thu, 13 Aug 2020 13:40:47 +0000 (19:10 +0530)
commit6d4f7801b1d2a0ec6fbc0cb4eb9d3613df788d78
tree3b12c1023615d9b2e33bbf80b1996173d83efb67
parentfc7f004b887594ed9b5e25497aa4475b3e74cc94
[MLIR] Support for ReturnOps in memref map layout normalization

-- This commit handles the returnOp in memref map layout normalization.
-- An initial filter is applied on FuncOps which helps us know which functions can be
   a suitable candidate for memref normalization which doesn't lead to invalid IR.
-- Handles memref map normalization for external function assuming the external function
   is normalizable.

Differential Revision: https://reviews.llvm.org/D85226
mlir/lib/Transforms/NormalizeMemRefs.cpp
mlir/lib/Transforms/Utils/Utils.cpp
mlir/test/Transforms/normalize-memrefs.mlir