[Mlir-commits] [mlir] [MLIR][EmitC] Add support for pointer-array types in the TypeConverter and related MemRef-to-EmitC operations, and update the C emitter. (PR #160159)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Oct 29 02:17:02 PDT 2025
================
@@ -51,9 +57,15 @@ module @globals {
// CHECK-LABEL: use_global
func.func @use_global() {
// CHECK-NEXT: emitc.get_global @public_global : !emitc.array<3x7xf32>
+ // CHECK-NEXT: "emitc.constant"() <{value = 0 : index}> : () -> index
----------------
LekkalaSravya3 wrote:
In the current type conversion, MemRef types are lowered to emitc.array types, While using alloc operation - the lowered result becomes a ptr<element-type>. This creates a mismatch because load and store operations expect an emitc.array type. As a result, builtin.unrealized_conversion_cast ops are inserted automatically to bridge between the pointer type and the array type.
https://github.com/llvm/llvm-project/pull/160159
More information about the Mlir-commits
mailing list