15#include "mlir/Pass/Pass.h"
16#include "llvm/Support/GraphWriter.h"
17#include "llvm/Support/raw_ostream.h"
21#define GEN_PASS_DEF_PRINTHWMODULEGRAPH
22#include "circt/Dialect/HW/Passes.h.inc"
30struct PrintHWModuleGraphPass
31 :
public circt::hw::impl::PrintHWModuleGraphBase<PrintHWModuleGraphPass> {
32 PrintHWModuleGraphPass(raw_ostream &os) : os(os) {}
33 void runOnOperation()
override {
38 module->setAttr("dot_verboseEdges",
39 BoolAttr::get(module.getContext(), verboseEdges));
41 llvm::WriteGraph(os, module,
false);
49 return std::make_unique<PrintHWModuleGraphPass>(llvm::errs());
std::unique_ptr< mlir::Pass > createPrintHWModuleGraphPass()
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.