[Mlir-commits] [mlir] [mlir][bufferization] Remove remaining dialect conversion-based infra parts (PR #114155)

Matthias Springer llvmlistbot at llvm.org
Thu Nov 21 17:14:05 PST 2024


================
@@ -138,8 +140,8 @@ bufferization::getGlobalFor(arith::ConstantOp constantOp, uint64_t alignment,
       alignment > 0 ? IntegerAttr::get(globalBuilder.getI64Type(), alignment)
                     : IntegerAttr();
 
-  BufferizeTypeConverter typeConverter;
----------------
matthias-springer wrote:

This code is computing the type for a `memref.global`. For globals we always want types such as `memref<10x5xf32>`, i.e., without custom layout map. It would not make sense to put custom strides.

`typeConverter.convertType(TensorType)` used to always return such a type. But the type converter is deleted in this commit, so we have to use `getMemRefTypeWithStaticIdentityLayout`, which does the same.


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


More information about the Mlir-commits mailing list