Lines Matching refs:os
97 static void emitPassOptionDecls(const Pass &pass, raw_ostream &os) { in emitPassOptionDecls() argument
99 os.indent(2) << "::mlir::Pass::" in emitPassOptionDecls()
102 os << llvm::formatv(R"(<{0}> {1}{{*this, "{2}", ::llvm::cl::desc("{3}"))", in emitPassOptionDecls()
106 os << ", ::llvm::cl::init(" << defaultVal << ")"; in emitPassOptionDecls()
108 os << ", " << *additionalFlags; in emitPassOptionDecls()
109 os << "};\n"; in emitPassOptionDecls()
114 static void emitPassStatisticDecls(const Pass &pass, raw_ostream &os) { in emitPassStatisticDecls() argument
116 os << llvm::formatv( in emitPassStatisticDecls()
122 static void emitPassDecl(const Pass &pass, raw_ostream &os) { in emitPassDecl() argument
131 os << llvm::formatv(passDeclBegin, defName, pass.getBaseClass(), in emitPassDecl()
134 emitPassOptionDecls(pass, os); in emitPassDecl()
135 emitPassStatisticDecls(pass, os); in emitPassDecl()
136 os << "};\n"; in emitPassDecl()
141 static void emitPassDecls(ArrayRef<Pass> passes, raw_ostream &os) { in emitPassDecls() argument
142 os << "#ifdef GEN_PASS_CLASSES\n"; in emitPassDecls()
144 emitPassDecl(pass, os); in emitPassDecls()
145 os << "#undef GEN_PASS_CLASSES\n"; in emitPassDecls()
146 os << "#endif // GEN_PASS_CLASSES\n"; in emitPassDecls()
183 static void emitRegistration(ArrayRef<Pass> passes, raw_ostream &os) { in emitRegistration() argument
184 os << "#ifdef GEN_PASS_REGISTRATION\n"; in emitRegistration()
186 os << llvm::formatv(passRegistrationCode, pass.getDef()->getName(), in emitRegistration()
190 os << llvm::formatv(passGroupRegistrationCode, groupName); in emitRegistration()
192 os << " register" << pass.getDef()->getName() << "Pass();\n"; in emitRegistration()
193 os << "}\n"; in emitRegistration()
194 os << "#undef GEN_PASS_REGISTRATION\n"; in emitRegistration()
195 os << "#endif // GEN_PASS_REGISTRATION\n"; in emitRegistration()
202 static void emitDecls(const llvm::RecordKeeper &recordKeeper, raw_ostream &os) { in emitDecls() argument
203 os << "/* Autogenerated by mlir-tblgen; don't manually edit */\n"; in emitDecls()
208 emitPassDecls(passes, os); in emitDecls()
209 emitRegistration(passes, os); in emitDecls()
214 [](const llvm::RecordKeeper &records, raw_ostream &os) { in __anon746dad500102() argument
215 emitDecls(records, os); in __anon746dad500102()