//===- PassDocGen.cpp - MLIR pass documentation generator -----------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // PassDocGen uses the description of passes to generate documentation. // //===----------------------------------------------------------------------===// #include "DocGenUtilities.h" #include "mlir/TableGen/GenInfo.h" #include "mlir/TableGen/Pass.h" #include "llvm/Support/FormatVariadic.h" #include "llvm/TableGen/Record.h" usingnamespacemlir; usingnamespacemlir::tblgen; /// Emit the documentation for the given pass. static void emitDoc(const Pass &pass, raw_ostream &os) { … } static void emitDocs(const llvm::RecordKeeper &recordKeeper, raw_ostream &os) { … } static mlir::GenRegistration genRegister("gen-pass-doc", "Generate pass documentation", [](const llvm::RecordKeeper &records, raw_ostream &os) { … });