[Mlir-commits] [mlir] [NFC] Rename variable `recordKeeper` to `records` (PR #110989)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Oct 3 06:08:05 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-mlir-llvm

Author: Rahul Joshi (jurahul)

<details>
<summary>Changes</summary>



---

Patch is 39.50 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/110989.diff


17 Files Affected:

- (modified) mlir/include/mlir/TableGen/GenInfo.h (+4-4) 
- (modified) mlir/tools/mlir-tblgen/DialectGen.cpp (+8-9) 
- (modified) mlir/tools/mlir-tblgen/DirectiveCommonGen.cpp (+3-3) 
- (modified) mlir/tools/mlir-tblgen/EnumPythonBindingGen.cpp (+3-3) 
- (modified) mlir/tools/mlir-tblgen/EnumsGen.cpp (+6-6) 
- (modified) mlir/tools/mlir-tblgen/LLVMIRConversionGen.cpp (+11-18) 
- (modified) mlir/tools/mlir-tblgen/OmpOpGen.cpp (+5-6) 
- (modified) mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp (+18-18) 
- (modified) mlir/tools/mlir-tblgen/OpDocGen.cpp (+18-19) 
- (modified) mlir/tools/mlir-tblgen/OpGenHelpers.cpp (+3-3) 
- (modified) mlir/tools/mlir-tblgen/OpGenHelpers.h (+1-1) 
- (modified) mlir/tools/mlir-tblgen/OpInterfacesGen.cpp (+2-2) 
- (modified) mlir/tools/mlir-tblgen/PassDocGen.cpp (+2-2) 
- (modified) mlir/tools/mlir-tblgen/PassGen.cpp (+4-4) 
- (modified) mlir/tools/mlir-tblgen/RewriterGen.cpp (+7-7) 
- (modified) mlir/tools/mlir-tblgen/SPIRVUtilsGen.cpp (+29-35) 
- (modified) mlir/tools/tblgen-to-irdl/OpDefinitionsGen.cpp (+4-6) 


``````````diff
diff --git a/mlir/include/mlir/TableGen/GenInfo.h b/mlir/include/mlir/TableGen/GenInfo.h
index ef2e12f07df16d..9dec0e4f1bd919 100644
--- a/mlir/include/mlir/TableGen/GenInfo.h
+++ b/mlir/include/mlir/TableGen/GenInfo.h
@@ -21,8 +21,8 @@ class RecordKeeper;
 namespace mlir {
 
 /// Generator function to invoke.
-using GenFunction = std::function<bool(const llvm::RecordKeeper &recordKeeper,
-                                       raw_ostream &os)>;
+using GenFunction =
+    std::function<bool(const llvm::RecordKeeper &records, raw_ostream &os)>;
 
 /// Structure to group information about a generator (argument to invoke via
 /// mlir-tblgen, description, and generator function).
@@ -34,9 +34,9 @@ class GenInfo {
       : arg(arg), description(description), generator(std::move(generator)) {}
 
   /// Invokes the generator and returns whether the generator failed.
-  bool invoke(const llvm::RecordKeeper &recordKeeper, raw_ostream &os) const {
+  bool invoke(const llvm::RecordKeeper &records, raw_ostream &os) const {
     assert(generator && "Cannot call generator with null generator");
-    return generator(recordKeeper, os);
+    return generator(records, os);
   }
 
   /// Returns the command line option that may be passed to 'mlir-tblgen' to
diff --git a/mlir/tools/mlir-tblgen/DialectGen.cpp b/mlir/tools/mlir-tblgen/DialectGen.cpp
index 76da9d7cea4e8d..55c3d9da259005 100644
--- a/mlir/tools/mlir-tblgen/DialectGen.cpp
+++ b/mlir/tools/mlir-tblgen/DialectGen.cpp
@@ -297,11 +297,10 @@ static void emitDialectDecl(Dialect &dialect, raw_ostream &os) {
        << "::" << dialect.getCppClassName() << ")\n";
 }
 
-static bool emitDialectDecls(const RecordKeeper &recordKeeper,
-                             raw_ostream &os) {
-  emitSourceFileHeader("Dialect Declarations", os, recordKeeper);
+static bool emitDialectDecls(const RecordKeeper &records, raw_ostream &os) {
+  emitSourceFileHeader("Dialect Declarations", os, records);
 
-  auto dialectDefs = recordKeeper.getAllDerivedDefinitions("Dialect");
+  auto dialectDefs = records.getAllDerivedDefinitions("Dialect");
   if (dialectDefs.empty())
     return false;
 
@@ -342,7 +341,7 @@ static const char *const dialectDestructorStr = R"(
 
 )";
 
-static void emitDialectDef(Dialect &dialect, const RecordKeeper &recordKeeper,
+static void emitDialectDef(Dialect &dialect, const RecordKeeper &records,
                            raw_ostream &os) {
   std::string cppClassName = dialect.getCppClassName();
 
@@ -390,10 +389,10 @@ static void emitDialectDef(Dialect &dialect, const RecordKeeper &recordKeeper,
     os << llvm::formatv(dialectDestructorStr, cppClassName);
 }
 
-static bool emitDialectDefs(const RecordKeeper &recordKeeper, raw_ostream &os) {
-  emitSourceFileHeader("Dialect Definitions", os, recordKeeper);
+static bool emitDialectDefs(const RecordKeeper &records, raw_ostream &os) {
+  emitSourceFileHeader("Dialect Definitions", os, records);
 
-  auto dialectDefs = recordKeeper.getAllDerivedDefinitions("Dialect");
+  auto dialectDefs = records.getAllDerivedDefinitions("Dialect");
   if (dialectDefs.empty())
     return false;
 
@@ -401,7 +400,7 @@ static bool emitDialectDefs(const RecordKeeper &recordKeeper, raw_ostream &os) {
   std::optional<Dialect> dialect = findDialectToGenerate(dialects);
   if (!dialect)
     return true;
-  emitDialectDef(*dialect, recordKeeper, os);
+  emitDialectDef(*dialect, records, os);
   return false;
 }
 
diff --git a/mlir/tools/mlir-tblgen/DirectiveCommonGen.cpp b/mlir/tools/mlir-tblgen/DirectiveCommonGen.cpp
index 26de95fcc57736..09c068fb766935 100644
--- a/mlir/tools/mlir-tblgen/DirectiveCommonGen.cpp
+++ b/mlir/tools/mlir-tblgen/DirectiveCommonGen.cpp
@@ -42,7 +42,7 @@ using llvm::RecordKeeper;
 // Clause record in OMP.td. This name can be used to specify the type of the
 // OpenMP operation's operand. The allowedClauseValues field provides the list
 // of ClauseValues which are part of the enumeration.
-static bool emitDecls(const RecordKeeper &recordKeeper, llvm::StringRef dialect,
+static bool emitDecls(const RecordKeeper &records, llvm::StringRef dialect,
                       raw_ostream &os) {
   // A dialect must be selected for the generated attributes.
   if (dialect.empty()) {
@@ -51,10 +51,10 @@ static bool emitDecls(const RecordKeeper &recordKeeper, llvm::StringRef dialect,
   }
 
   const auto directiveLanguages =
-      recordKeeper.getAllDerivedDefinitions("DirectiveLanguage");
+      records.getAllDerivedDefinitions("DirectiveLanguage");
   assert(!directiveLanguages.empty() && "DirectiveLanguage missing.");
 
-  for (const Clause c : recordKeeper.getAllDerivedDefinitions("Clause")) {
+  for (const Clause c : records.getAllDerivedDefinitions("Clause")) {
     const auto &clauseVals = c.getClauseVals();
     if (clauseVals.empty())
       continue;
diff --git a/mlir/tools/mlir-tblgen/EnumPythonBindingGen.cpp b/mlir/tools/mlir-tblgen/EnumPythonBindingGen.cpp
index 189487794f8f7c..3f660ae151c749 100644
--- a/mlir/tools/mlir-tblgen/EnumPythonBindingGen.cpp
+++ b/mlir/tools/mlir-tblgen/EnumPythonBindingGen.cpp
@@ -132,16 +132,16 @@ static bool emitDialectEnumAttributeBuilder(StringRef attrDefName,
 
 /// Emits Python bindings for all enums in the record keeper. Returns
 /// `false` on success, `true` on failure.
-static bool emitPythonEnums(const RecordKeeper &recordKeeper, raw_ostream &os) {
+static bool emitPythonEnums(const RecordKeeper &records, raw_ostream &os) {
   os << fileHeader;
   for (const Record *it :
-       recordKeeper.getAllDerivedDefinitionsIfDefined("EnumAttrInfo")) {
+       records.getAllDerivedDefinitionsIfDefined("EnumAttrInfo")) {
     EnumAttr enumAttr(*it);
     emitEnumClass(enumAttr, os);
     emitAttributeBuilder(enumAttr, os);
   }
   for (const Record *it :
-       recordKeeper.getAllDerivedDefinitionsIfDefined("EnumAttr")) {
+       records.getAllDerivedDefinitionsIfDefined("EnumAttr")) {
     AttrOrTypeDef attr(&*it);
     if (!attr.getMnemonic()) {
       llvm::errs() << "enum case " << attr
diff --git a/mlir/tools/mlir-tblgen/EnumsGen.cpp b/mlir/tools/mlir-tblgen/EnumsGen.cpp
index 5f2008818e3eb7..47ffd291cae687 100644
--- a/mlir/tools/mlir-tblgen/EnumsGen.cpp
+++ b/mlir/tools/mlir-tblgen/EnumsGen.cpp
@@ -641,11 +641,11 @@ class {1} : public ::mlir::{2} {
   emitDenseMapInfo(qualName, underlyingType, cppNamespace, os);
 }
 
-static bool emitEnumDecls(const RecordKeeper &recordKeeper, raw_ostream &os) {
-  llvm::emitSourceFileHeader("Enum Utility Declarations", os, recordKeeper);
+static bool emitEnumDecls(const RecordKeeper &records, raw_ostream &os) {
+  llvm::emitSourceFileHeader("Enum Utility Declarations", os, records);
 
   for (const Record *def :
-       recordKeeper.getAllDerivedDefinitionsIfDefined("EnumAttrInfo"))
+       records.getAllDerivedDefinitionsIfDefined("EnumAttrInfo"))
     emitEnumDecl(*def, os);
 
   return false;
@@ -679,11 +679,11 @@ static void emitEnumDef(const Record &enumDef, raw_ostream &os) {
   os << "\n";
 }
 
-static bool emitEnumDefs(const RecordKeeper &recordKeeper, raw_ostream &os) {
-  llvm::emitSourceFileHeader("Enum Utility Definitions", os, recordKeeper);
+static bool emitEnumDefs(const RecordKeeper &records, raw_ostream &os) {
+  llvm::emitSourceFileHeader("Enum Utility Definitions", os, records);
 
   for (const Record *def :
-       recordKeeper.getAllDerivedDefinitionsIfDefined("EnumAttrInfo"))
+       records.getAllDerivedDefinitionsIfDefined("EnumAttrInfo"))
     emitEnumDef(*def, os);
 
   return false;
diff --git a/mlir/tools/mlir-tblgen/LLVMIRConversionGen.cpp b/mlir/tools/mlir-tblgen/LLVMIRConversionGen.cpp
index 4e7ddab75fc1dd..9e19f479d673a0 100644
--- a/mlir/tools/mlir-tblgen/LLVMIRConversionGen.cpp
+++ b/mlir/tools/mlir-tblgen/LLVMIRConversionGen.cpp
@@ -177,9 +177,8 @@ static LogicalResult emitOneBuilder(const Record &record, raw_ostream &os) {
 
 // Emit all builders.  Returns false on success because of the generator
 // registration requirements.
-static bool emitBuilders(const RecordKeeper &recordKeeper, raw_ostream &os) {
-  for (const Record *def :
-       recordKeeper.getAllDerivedDefinitions("LLVM_OpBase")) {
+static bool emitBuilders(const RecordKeeper &records, raw_ostream &os) {
+  for (const Record *def : records.getAllDerivedDefinitions("LLVM_OpBase")) {
     if (failed(emitOneBuilder(*def, os)))
       return true;
   }
@@ -305,15 +304,14 @@ static LogicalResult emitOneMLIRBuilder(const Record &record, raw_ostream &os,
 
 // Emit all intrinsic MLIR builders. Returns false on success because of the
 // generator registration requirements.
-static bool emitIntrMLIRBuilders(const RecordKeeper &recordKeeper,
-                                 raw_ostream &os) {
+static bool emitIntrMLIRBuilders(const RecordKeeper &records, raw_ostream &os) {
   // Emit condition to check if "llvmEnumName" matches the intrinsic id.
   auto emitIntrCond = [](const Record &record) {
     return "intrinsicID == llvm::Intrinsic::" +
            record.getValueAsString("llvmEnumName");
   };
   for (const Record *def :
-       recordKeeper.getAllDerivedDefinitions("LLVM_IntrOpBase")) {
+       records.getAllDerivedDefinitions("LLVM_IntrOpBase")) {
     if (failed(emitOneMLIRBuilder(*def, os, emitIntrCond)))
       return true;
   }
@@ -322,15 +320,13 @@ static bool emitIntrMLIRBuilders(const RecordKeeper &recordKeeper,
 
 // Emit all op builders. Returns false on success because of the
 // generator registration requirements.
-static bool emitOpMLIRBuilders(const RecordKeeper &recordKeeper,
-                               raw_ostream &os) {
+static bool emitOpMLIRBuilders(const RecordKeeper &records, raw_ostream &os) {
   // Emit condition to check if "llvmInstName" matches the instruction opcode.
   auto emitOpcodeCond = [](const Record &record) {
     return "inst->getOpcode() == llvm::Instruction::" +
            record.getValueAsString("llvmInstName");
   };
-  for (const Record *def :
-       recordKeeper.getAllDerivedDefinitions("LLVM_OpBase")) {
+  for (const Record *def : records.getAllDerivedDefinitions("LLVM_OpBase")) {
     if (failed(emitOneMLIRBuilder(*def, os, emitOpcodeCond)))
       return true;
   }
@@ -536,17 +532,15 @@ static void emitOneCEnumFromConversion(const Record *record, raw_ostream &os) {
 // Emits conversion functions between MLIR enum attribute case and corresponding
 // LLVM API enumerants for all registered LLVM dialect enum attributes.
 template <bool ConvertTo>
-static bool emitEnumConversionDefs(const RecordKeeper &recordKeeper,
+static bool emitEnumConversionDefs(const RecordKeeper &records,
                                    raw_ostream &os) {
-  for (const Record *def :
-       recordKeeper.getAllDerivedDefinitions("LLVM_EnumAttr"))
+  for (const Record *def : records.getAllDerivedDefinitions("LLVM_EnumAttr"))
     if (ConvertTo)
       emitOneEnumToConversion(def, os);
     else
       emitOneEnumFromConversion(def, os);
 
-  for (const Record *def :
-       recordKeeper.getAllDerivedDefinitions("LLVM_CEnumAttr"))
+  for (const Record *def : records.getAllDerivedDefinitions("LLVM_CEnumAttr"))
     if (ConvertTo)
       emitOneCEnumToConversion(def, os);
     else
@@ -562,10 +556,9 @@ static void emitOneIntrinsic(const Record &record, raw_ostream &os) {
 
 // Emit the list of LLVM IR intrinsics identifiers that are convertible to a
 // matching MLIR LLVM dialect intrinsic operation.
-static bool emitConvertibleIntrinsics(const RecordKeeper &recordKeeper,
+static bool emitConvertibleIntrinsics(const RecordKeeper &records,
                                       raw_ostream &os) {
-  for (const Record *def :
-       recordKeeper.getAllDerivedDefinitions("LLVM_IntrOpBase"))
+  for (const Record *def : records.getAllDerivedDefinitions("LLVM_IntrOpBase"))
     emitOneIntrinsic(*def, os);
 
   return false;
diff --git a/mlir/tools/mlir-tblgen/OmpOpGen.cpp b/mlir/tools/mlir-tblgen/OmpOpGen.cpp
index 68bb5ddca153a6..1c20a6a9bcf4e8 100644
--- a/mlir/tools/mlir-tblgen/OmpOpGen.cpp
+++ b/mlir/tools/mlir-tblgen/OmpOpGen.cpp
@@ -328,8 +328,8 @@ static void genOperandsDef(const Record *op, raw_ostream &os) {
 
 /// Verify that all properties of `OpenMP_Clause`s of records deriving from
 /// `OpenMP_Op`s have been inherited by the latter.
-static bool verifyDecls(const RecordKeeper &recordKeeper, raw_ostream &) {
-  for (const Record *op : recordKeeper.getAllDerivedDefinitions("OpenMP_Op")) {
+static bool verifyDecls(const RecordKeeper &records, raw_ostream &) {
+  for (const Record *op : records.getAllDerivedDefinitions("OpenMP_Op")) {
     for (const Record *clause : op->getValueAsListOfDefs("clauseList"))
       verifyClause(op, clause);
   }
@@ -341,16 +341,15 @@ static bool verifyDecls(const RecordKeeper &recordKeeper, raw_ostream &) {
 /// `OpenMP_Clause` definitions and aggregate them into operation-specific
 /// structures according to the `clauses` argument of each definition deriving
 /// from `OpenMP_Op`.
-static bool genClauseOps(const RecordKeeper &recordKeeper, raw_ostream &os) {
+static bool genClauseOps(const RecordKeeper &records, raw_ostream &os) {
   mlir::tblgen::NamespaceEmitter ns(os, "mlir::omp");
-  for (const Record *clause :
-       recordKeeper.getAllDerivedDefinitions("OpenMP_Clause"))
+  for (const Record *clause : records.getAllDerivedDefinitions("OpenMP_Clause"))
     genClauseOpsStruct(clause, os);
 
   // Produce base mixin class.
   os << baseMixinClass;
 
-  for (const Record *op : recordKeeper.getAllDerivedDefinitions("OpenMP_Op"))
+  for (const Record *op : records.getAllDerivedDefinitions("OpenMP_Op"))
     genOperandsDef(op, os);
 
   return false;
diff --git a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
index cbe8a055958567..67df002ce38181 100644
--- a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
+++ b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
@@ -4498,7 +4498,7 @@ void OpOperandAdaptorEmitter::emitDef(
 
 /// Emit the class declarations or definitions for the given op defs.
 static void
-emitOpClasses(const RecordKeeper &recordKeeper,
+emitOpClasses(const RecordKeeper &records,
               const std::vector<const Record *> &defs, raw_ostream &os,
               const StaticVerifierFunctionEmitter &staticVerifierEmitter,
               bool emitDecl) {
@@ -4535,7 +4535,7 @@ emitOpClasses(const RecordKeeper &recordKeeper,
 }
 
 /// Emit the declarations for the provided op classes.
-static void emitOpClassDecls(const RecordKeeper &recordKeeper,
+static void emitOpClassDecls(const RecordKeeper &records,
                              const std::vector<const Record *> &defs,
                              raw_ostream &os) {
   // First emit forward declaration for each class, this allows them to refer
@@ -4550,37 +4550,37 @@ static void emitOpClassDecls(const RecordKeeper &recordKeeper,
   IfDefScope scope("GET_OP_CLASSES", os);
   if (defs.empty())
     return;
-  StaticVerifierFunctionEmitter staticVerifierEmitter(os, recordKeeper);
+  StaticVerifierFunctionEmitter staticVerifierEmitter(os, records);
   staticVerifierEmitter.collectOpConstraints(defs);
-  emitOpClasses(recordKeeper, defs, os, staticVerifierEmitter,
+  emitOpClasses(records, defs, os, staticVerifierEmitter,
                 /*emitDecl=*/true);
 }
 
 /// Emit the definitions for the provided op classes.
-static void emitOpClassDefs(const RecordKeeper &recordKeeper,
+static void emitOpClassDefs(const RecordKeeper &records,
                             ArrayRef<const Record *> defs, raw_ostream &os,
                             StringRef constraintPrefix = "") {
   if (defs.empty())
     return;
 
   // Generate all of the locally instantiated methods first.
-  StaticVerifierFunctionEmitter staticVerifierEmitter(os, recordKeeper,
+  StaticVerifierFunctionEmitter staticVerifierEmitter(os, records,
                                                       constraintPrefix);
   os << formatv(opCommentHeader, "Local Utility Method", "Definitions");
   staticVerifierEmitter.collectOpConstraints(defs);
   staticVerifierEmitter.emitOpConstraints(defs);
 
   // Emit the classes.
-  emitOpClasses(recordKeeper, defs, os, staticVerifierEmitter,
+  emitOpClasses(records, defs, os, staticVerifierEmitter,
                 /*emitDecl=*/false);
 }
 
 /// Emit op declarations for all op records.
-static bool emitOpDecls(const RecordKeeper &recordKeeper, raw_ostream &os) {
-  emitSourceFileHeader("Op Declarations", os, recordKeeper);
+static bool emitOpDecls(const RecordKeeper &records, raw_ostream &os) {
+  emitSourceFileHeader("Op Declarations", os, records);
 
-  std::vector<const Record *> defs = getRequestedOpDefinitions(recordKeeper);
-  emitOpClassDecls(recordKeeper, defs, os);
+  std::vector<const Record *> defs = getRequestedOpDefinitions(records);
+  emitOpClassDecls(records, defs, os);
 
   // If we are generating sharded op definitions, emit the sharded op
   // registration hooks.
@@ -4606,7 +4606,7 @@ static bool emitOpDecls(const RecordKeeper &recordKeeper, raw_ostream &os) {
 
 /// Generate the dialect op registration hook and the op class definitions for a
 /// shard of ops.
-static void emitOpDefShard(const RecordKeeper &recordKeeper,
+static void emitOpDefShard(const RecordKeeper &records,
                            ArrayRef<const Record *> defs,
                            const Dialect &dialect, unsigned shardIndex,
                            unsigned shardCount, raw_ostream &os) {
@@ -4640,14 +4640,14 @@ static void emitOpDefShard(const RecordKeeper &recordKeeper,
   os << "}\n";
 
   // Generate the per-shard op definitions.
-  emitOpClassDefs(recordKeeper, defs, os, indexStr);
+  emitOpClassDefs(records, defs, os, indexStr);
 }
 
 /// Emit op definitions for all op records.
-static bool emitOpDefs(const RecordKeeper &recordKeeper, raw_ostream &os) {
-  emitSourceFileHeader("Op Definitions", os, recordKeeper);
+static bool emitOpDefs(const RecordKeeper &records, raw_ostream &os) {
+  emitSourceFileHeader("Op Definitions", os, records);
 
-  std::vector<const Record *> defs = getRequestedOpDefinitions(recordKeeper);
+  std::vector<const Record *> defs = getRequestedOpDefinitions(records);
   SmallVector<ArrayRef<const Record *>, 4> shardedDefs;
   shardOpDefinitions(defs, shardedDefs);
 
@@ -4662,7 +4662,7 @@ static bool emitOpDefs(const RecordKeeper &recordKeeper, raw_ostream &os) {
     }
     {
       IfDefScope scope("GET_OP_CLASSES", os);
-      emitOpClassDefs(recordKeeper, defs, os);
+      emitOpClassDefs(records, defs, os);
     }
     return false;
   }
@@ -4671,7 +4671,7 @@ static bool emitOpDefs(const RecordKeeper &recordKeeper, raw_ostream &os) {
     return false;
   Dialect dialect = Operator(defs.front()).getDialect();
   for (auto [idx, value] : llvm::enumerate(shardedDefs)) {
-    emitOpDefShard(recordKeeper, value, dialect, idx, shardedDefs.size(), os);
+    emitOpDefShard(records, value, dialect, idx, shardedDefs.size(), os);
   }
   return false;
 }
diff --git a/mlir/tools/mlir-tblgen/OpDocGen.cpp b/mlir/tools/mlir-tblgen/OpDocGen.cpp
index 5171e3fad9e84b..ff3c6b16bb6ebc 100644
--- a/mlir/tools/mlir-tblgen/OpDocGen.cpp
+++ b/mlir/tools/mlir-tblgen/OpDocGen.cpp
@@ -282,11 +282,11 @@ static void emitSourceLink(StringRef inputFilename, raw_ostream &os) {
      << inputFromMlirInclude << ")\n\n";
 }
 
-static void emitOpDoc(const RecordKeeper &recordKeeper, raw_ostream &os) {
-  auto opDefs = getRequestedOpDefinitions(recordKeeper);
+static void emitOpDoc(const RecordKeeper &records, raw_ostream &os) {
+  auto opDefs = getRequestedOpDefinitions(records);
 
   os << "<!-- Autogenerated by mlir-tblgen; don't manually edit -->\n";
-  emitSourceLink(recordKeeper.getInputFilename(), os);
+  emitSourceLink(records.getInputFilename(), os);
   for (const Record *opDef : opDefs)
     emitOpDoc(Operator(opDef), os);
 }
@@ -371,9 +371,9 @@ static void emitAttrOrTypeDefDoc(const AttrOrTypeDef &def, raw_ostream &os) {
   os << "\n";
 }
 
-static void emitAttrOrTypeDefDoc(const RecordKeeper &recordKeeper,
-                                 raw_ostream &os, StringRef recordTypeName) {
-  auto defs = recordKeeper.getAllDerivedDefinitions(recordTypeName);
+static void emitAttrOrTypeDefDoc(const RecordKeeper &records, raw_ostream &os,
+                                 StringRef recordTypeName) {
+  auto defs = records.getAllDerivedDefinitions(recordTypeName);
 
   os << "<!-- Autogenerated by mlir-tblgen; don't manually edit -->\n";
   for (cons...
[truncated]

``````````

</details>


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


More information about the Mlir-commits mailing list