16 #include "mlir/Dialect/Func/IR/FuncOps.h"
17 #include "mlir/Tools/mlir-translate/Translation.h"
21 using namespace circt;
25 llvm::raw_ostream &os) {
26 SmallVector<ModelInfo> models;
34 static mlir::TranslateFromMLIRRegistration modelInfoToJson(
35 "export-arc-model-info",
"export Arc model info in JSON format",
36 [](ModuleOp module, llvm::raw_ostream &os) {
39 [](mlir::DialectRegistry ®istry) {
40 registry.insert<arc::ArcDialect>();
41 registry.insert<func::FuncDialect>();
mlir::LogicalResult collectAndExportModelInfo(mlir::ModuleOp module, llvm::raw_ostream &os)
Collects and exports Arc model info to JSON.
void registerArcModelInfoTranslation()
Registers CIRCT translation from Arc to JSON model info.
void serializeModelInfoToJson(llvm::raw_ostream &outputStream, llvm::ArrayRef< ModelInfo > models)
Serializes models to outputStream in JSON format.
mlir::LogicalResult collectModels(mlir::ModuleOp module, llvm::SmallVector< ModelInfo > &models)
Collects information about all Arc models in the provided module, and adds it to models.
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.