[Mlir-commits] [mlir] [mlir][EmitC]Allow Fields to have initial values (PR #151437)
Jacques Pienaar
llvmlistbot at llvm.org
Thu Jul 31 00:46:45 PDT 2025
================
@@ -19,9 +19,9 @@ module attributes { } {
// CHECK: module {
// CHECK-NEXT: emitc.class @modelClass {
-// CHECK-NEXT: emitc.field @fieldName0 : !emitc.array<1xf32> {emitc.name_hint = "another_feature"}
-// CHECK-NEXT: emitc.field @fieldName1 : !emitc.array<1xf32> {emitc.name_hint = "some_feature"}
-// CHECK-NEXT: emitc.field @fieldName2 : !emitc.array<1xf32> {emitc.name_hint = "output_0"}
+// CHECK-NEXT: emitc.field @fieldName0 : !emitc.array<1xf32> {attrs = {emitc.name_hint = "another_feature"}}
----------------
jpienaar wrote:
And if you remove above, then this gets reset to what it was before (here it ended up that it is needed as the two things in your asm is different and this resulted in populating the one you wanted, but can also just reference the Operation*'s attributes for the name_hint.
https://github.com/llvm/llvm-project/pull/151437
More information about the Mlir-commits
mailing list