17#include "mlir/Pass/Pass.h"
18#include "llvm/Support/GraphWriter.h"
19#include "llvm/Support/raw_ostream.h"
23#define GEN_PASS_DEF_PRINTFSMGRAPH
24#include "circt/Dialect/FSM/Passes.h.inc"
32struct PrintFSMGraphPass
33 :
public circt::fsm::impl::PrintFSMGraphBase<PrintFSMGraphPass> {
34 PrintFSMGraphPass(raw_ostream &os) : os(os) {}
35 void runOnOperation()
override {
37 auto fsmGraph = fsm::FSMGraph(machine);
38 llvm::WriteGraph(os, &fsmGraph,
false);
46 return std::make_unique<PrintFSMGraphPass>(llvm::errs());
std::unique_ptr< mlir::Pass > createPrintFSMGraphPass()
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.