NFC. Clean up memref utils libraryNFC. Clean up memref utils library. This library had a single functionthat was completely misplaced. MemRefUtils is expected to be (also perits comment) a librar
NFC. Clean up memref utils libraryNFC. Clean up memref utils library. This library had a single functionthat was completely misplaced. MemRefUtils is expected to be (also perits comment) a library providing analysis/transforms utilities on memrefdialect ops or memref types. However, in reality it had a helper thatwas depended upon by the MemRef dialect, i.e., it was a helper for thedialect ops library and couldn't contain anything that itself depends onthe MemRef dialect. Move the single method to the memref dialect thatwill now allow actual utilities depending on the memref dialect to beplaced in it.Put findDealloc in the `memref` namespace. This is a pure move.Differential Revision: https://reviews.llvm.org/D121273
show more ...
[MLIR][memref] Fix findDealloc() to handle > 1 dealloc for the given alloc.- Change findDealloc() to return Optional<Operation *> and return None if > 1 dealloc is associated with the given alloc
[MLIR][memref] Fix findDealloc() to handle > 1 dealloc for the given alloc.- Change findDealloc() to return Optional<Operation *> and return None if > 1 dealloc is associated with the given alloc.- Add findDeallocs() to return all deallocs associated with the given alloc.- Fix current uses of findDealloc() to bail out if > 1 dealloc is found.Differential Revision: https://reviews.llvm.org/D106456
[mlir] Move memref.subview patterns to MemRef/Transforms/These patterns have been used as a prerequisite step for loweringto SPIR-V. But they don't involve SPIR-V dialect ops; they arepure memref
[mlir] Move memref.subview patterns to MemRef/Transforms/These patterns have been used as a prerequisite step for loweringto SPIR-V. But they don't involve SPIR-V dialect ops; they arepure memref/vector op transformations. Given now we have a dedicatedMemRef dialect, moving them to Memref/Transforms/, which is a moresuitable place to host them, to allow used by others.This commit just moves code around and renames patterns/passesaccordingly. CMakeLists.txt for existing MemRef libraries arealso improved along the way.Reviewed By: mravishankarDifferential Revision: https://reviews.llvm.org/D100326
Revert "Revert "[mlir] Introduce CloneOp and adapt test cases in BufferDeallocation.""This reverts commit 883912abe669ef246ada0adc9cf1c9748b742400.
Revert "[mlir] Introduce CloneOp and adapt test cases in BufferDeallocation."This reverts commit 06b03800f3fcbf49f5ddd4145b40f04e4ba4eb42.Until some kind of support for region args is added.
[mlir] Introduce CloneOp and adapt test cases in BufferDeallocation.Add a new clone operation to the memref dialect. This operation implicitlycopies data from a source buffer to a new buffer. In c
[mlir] Introduce CloneOp and adapt test cases in BufferDeallocation.Add a new clone operation to the memref dialect. This operation implicitlycopies data from a source buffer to a new buffer. In contrast to the linalg.copyoperation, this operation does not accept a target buffer as an argument.Instead, this operation performs a conceptual allocation which does not need tobe performed manually.Furthermore, this operation resolves the dependency from the linalg-dialectin the BufferDeallocation pass. In addition, we also extended the canonicalizationpatterns to fold clone operations. The copy removal pass has been removed.Differential Revision: https://reviews.llvm.org/D99172