43 markAllAnalysesPreserved();
45 if (!llvm::isa<mlir::ModuleOp>(getOperation())) {
46 const char *msg =
"ConstraintDependencyGraphPrinterPass error: should be run on ModuleOp!";
47 getOperation()->emitError(msg).report();
48 llvm::report_fatal_error(msg);
51 auto &cs = getAnalysis<ConstraintDependencyGraphModuleAnalysis>();
53 auto am = getAnalysisManager();
54 cs.ensureAnalysisRun(am);
55 for (
auto &[s, cdg] : cs.getCurrentResults()) {
59 mlir::succeeded(fullName),
60 "could not resolve fully qualified name of struct " + mlir::Twine(structDef.getName())
62 os << fullName.value() <<
' ';