[Mlir-commits] [mlir] 332ce23 - [mlir][ods] Fix incorrect accessing of segment_sizes

Jacques Pienaar llvmlistbot at llvm.org
Tue Oct 26 16:04:29 PDT 2021


Author: Jacques Pienaar
Date: 2021-10-26T16:04:15-07:00
New Revision: 332ce23f3c762c8002116f88775e23feb0ad1409

URL: https://github.com/llvm/llvm-project/commit/332ce23f3c762c8002116f88775e23feb0ad1409
DIFF: https://github.com/llvm/llvm-project/commit/332ce23f3c762c8002116f88775e23feb0ad1409.diff

LOG: [mlir][ods] Fix incorrect accessing of segment_sizes

The previous change resulted in prefixing a query that uses the raw
attribute as if function invocation. Fixing quickly, with updated test
to follow.

Added: 
    

Modified: 
    mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
index 9a5d8bd4d721e..3f530e848602b 100644
--- a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
+++ b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
@@ -2443,7 +2443,7 @@ OpOperandAdaptorEmitter::OpOperandAdaptorEmitter(const Operator &op)
     ERROR_IF_PRUNED(m, "getOperands", op);
     m->body() << "  return odsOperands;";
   }
-  std::string attr = op.getGetterName("operand_segment_sizes");
+  std::string attr = "operand_segment_sizes";
   std::string sizeAttrInit = formatv(adapterSegmentSizeAttrInitCode, attr);
   generateNamedOperandGetters(op, adaptor,
                               /*isAdaptor=*/true, sizeAttrInit,


        


More information about the Mlir-commits mailing list