NFC. Clean up memref utils library
authorUday Bondhugula <uday@polymagelabs.com>
Wed, 9 Mar 2022 06:25:49 +0000 (11:55 +0530)
committerUday Bondhugula <uday@polymagelabs.com>
Wed, 9 Mar 2022 10:30:39 +0000 (16:00 +0530)
commitaf9f7d319b8c12063a9d105c9e13984141a51c62
treef58292234cc49070636d9dd52b94594058967c86
parent092601d4baab7c13c06b31eda2d5bed91d9a6b65
NFC. Clean up memref utils library

NFC. Clean up memref utils library. This library had a single function
that was completely misplaced. MemRefUtils is expected to be (also per
its comment) a library providing analysis/transforms utilities on memref
dialect ops or memref types. However, in reality it had a helper that
was depended upon by the MemRef dialect, i.e., it was a helper for the
dialect ops library and couldn't contain anything that itself depends on
the MemRef dialect. Move the single method to the memref dialect that
will now allow actual utilities depending on the memref dialect to be
placed in it.

Put findDealloc in the `memref` namespace. This is a pure move.

Differential Revision: https://reviews.llvm.org/D121273
mlir/include/mlir/Dialect/MemRef/IR/MemRef.h
mlir/include/mlir/Dialect/MemRef/Utils/MemRefUtils.h
mlir/lib/Dialect/Bufferization/IR/BufferizationOps.cpp
mlir/lib/Dialect/Bufferization/Transforms/BufferUtils.cpp
mlir/lib/Dialect/MemRef/IR/CMakeLists.txt
mlir/lib/Dialect/MemRef/IR/MemRefDialect.cpp
mlir/lib/Dialect/MemRef/Utils/CMakeLists.txt
mlir/lib/Dialect/MemRef/Utils/MemRefUtils.cpp