[PATCH] D78484: Providing buffer assignment for MLIR

Ben Vanik via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 21 13:33:36 PDT 2020


benvanik added inline comments.


================
Comment at: mlir/lib/Transforms/BufferAssignment.cpp:398
+    ConversionPatternRewriter &rewriter) const {
+  auto toMemrefConverter = [&](Type t) -> Type {
+    if (auto tensorType = t.dyn_cast<RankedTensorType>())
----------------
How tied is this pass to memref? If we have our own dialect type that represents buffers that we want to use with our own dialect alloc/dealloc ops, how can we use that here?

Specifically this kind of function type conversion seems better served by a TypeConverter that can be provided by the target dialect. For us, for example, we'd not have it change types at all probably, and instead just use this for inserting our alloc/dealloc markers.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78484/new/

https://reviews.llvm.org/D78484





More information about the llvm-commits mailing list