[Mlir-commits] [mlir] [mlir][bytecode] Fix D155919 and enable backward-compatibility and ba… (PR #70498)

Mehdi Amini llvmlistbot at llvm.org
Fri Oct 27 17:44:28 PDT 2023


================
@@ -1580,15 +1615,30 @@ void OpEmitter::genPropertiesSupportForBytecode(
   readPropertiesMethod
       << "  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;";
   writePropertiesMethod << "  auto &prop = getProperties(); (void)prop;\n";
-  for (const auto &attrOrProp : attrOrProperties) {
+  for (const auto &item : llvm::enumerate(attrOrProperties)) {
+    auto &attrOrProp = item.value();
+    FmtContext fctx;
+    fctx.addSubst("_reader", "reader")
+        .addSubst("_writer", "writer")
+        .addSubst("_storage", propertyStorage)
+        .addSubst("_ctxt", "this->getContext()");
+    if (emitHelper.getOperandSegmentsSize().has_value() &&
----------------
joker-eph wrote:

Add a comment for the block around the legacy stuff

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


More information about the Mlir-commits mailing list