[Mlir-commits] [mlir] [mlir] Add support for `memref.alloca` sub-byte emulation (PR #73138)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Nov 22 09:42:00 PST 2023


================
@@ -53,18 +53,22 @@ static Value getOffsetForBitwidth(Location loc, OpFoldResult srcIdx,
 namespace {
 
 //===----------------------------------------------------------------------===//
-// ConvertMemRefAlloc
+// ConvertMemRefAllocation
 //===----------------------------------------------------------------------===//
 
-struct ConvertMemRefAlloc final : OpConversionPattern<memref::AllocOp> {
-  using OpConversionPattern::OpConversionPattern;
+template <typename OpTy>
+struct ConvertMemRefAllocation final : OpConversionPattern<OpTy> {
----------------
MaheshRavishankar wrote:

Do you think we can do this using an `AllocLikeOpInterface` ? Its fine to do as a follow up as well (or leave a TODO saying this could be generalized using the interface).

https://github.com/llvm/llvm-project/pull/73138


More information about the Mlir-commits mailing list