[Mlir-commits] [mlir] [mlir][EmitC] Add rank-0 MemRef conversion (PR #205774)
Gil Rapaport
llvmlistbot at llvm.org
Tue Jun 30 06:28:30 PDT 2026
================
@@ -60,6 +59,16 @@ void mlir::registerConvertMemRefToEmitCInterface(DialectRegistry ®istry) {
// Conversion Patterns
//===----------------------------------------------------------------------===//
+Type convertMemRefType(MemRefType opTy, const TypeConverter *typeConverter) {
+ Type resultTy;
+ if (opTy.getRank() == 0) {
+ resultTy = typeConverter->convertType(mlir::getElementTypeOrSelf(opTy));
----------------
aniragil wrote:
Doesn't seem to do what function name implies: when rank > 0 the function actually returns the memref type (ArrayType), so for rank == 0 then memref type should be PointerType<element-type>, right?
https://github.com/llvm/llvm-project/pull/205774
More information about the Mlir-commits
mailing list