From 00e4354558b0d7c9156413be1353b55a0fb293f7 Mon Sep 17 00:00:00 2001 From: Mogball Date: Mon, 20 Dec 2021 21:10:53 +0000 Subject: [PATCH] [mlir][ods] FIx incorrect comments in PassGen (NFC) And incorrect command option description for `-gen-pass-decls`. --- mlir/tools/mlir-tblgen/PassGen.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/mlir/tools/mlir-tblgen/PassGen.cpp b/mlir/tools/mlir-tblgen/PassGen.cpp index e09746b..1edd4db 100644 --- a/mlir/tools/mlir-tblgen/PassGen.cpp +++ b/mlir/tools/mlir-tblgen/PassGen.cpp @@ -145,12 +145,10 @@ static void emitPassDecls(ArrayRef passes, raw_ostream &os) { // GEN: Pass registration generation //===----------------------------------------------------------------------===// -/// The code snippet used to generate the start of a pass base class. +/// The code snippet used to generate a pass registration. /// /// {0}: The def name of the pass record. -/// {1}: The argument of the pass. -/// {2): The summary of the pass. -/// {3}: The code for constructing the pass. +/// {1}: The pass constructor call. const char *const passRegistrationCode = R"( //===----------------------------------------------------------------------===// // {0} Registration @@ -163,6 +161,9 @@ inline void register{0}Pass() {{ } )"; +/// The code snippet used to generate a function to register all passes in a +/// group. +/// /// {0}: The name of the pass group. const char *const passGroupRegistrationCode = R"( //===----------------------------------------------------------------------===// @@ -204,7 +205,7 @@ static void emitDecls(const llvm::RecordKeeper &recordKeeper, raw_ostream &os) { } static mlir::GenRegistration - genRegister("gen-pass-decls", "Generate operation documentation", + genRegister("gen-pass-decls", "Generate pass declarations", [](const llvm::RecordKeeper &records, raw_ostream &os) { emitDecls(records, os); return false; -- 2.7.4