Lines Matching refs:os

37   llvm::raw_string_ostream os(buf);  in strFromOs()  local
38 func(os); in strFromOs()
39 return os.str(); in strFromOs()
44 return strFromOs([&](raw_ostream &os) { os.write_escaped(str); }); in escapeString() argument
77 PrintOpPass(raw_ostream &os) : os(os) {} in PrintOpPass() argument
78 PrintOpPass(const PrintOpPass &o) : PrintOpPass(o.os.getOStream()) {} in PrintOpPass()
99 os << edge << ";\n"; in emitAllEdgeStmts()
107 os << "subgraph cluster_" << clusterId << " {\n"; in emitClusterStmt()
108 os.indent(); in emitClusterStmt()
111 os << attrStmt("label", quoteString(escapeString(std::move(label)))) in emitClusterStmt()
114 os.unindent(); in emitClusterStmt()
115 os << "}\n"; in emitClusterStmt()
125 void emitAttrList(raw_ostream &os, const AttributeMap &map) { in emitAttrList() argument
126 os << "["; in emitAttrList()
127 interleaveComma(map, os, [&](const auto &it) { in emitAttrList()
128 os << this->attrStmt(it.getKey(), it.getValue()); in emitAttrList()
130 os << "]"; in emitAttrList()
134 void emitMlirAttr(raw_ostream &os, Attribute attr) { in emitMlirAttr() argument
140 attr.print(os); in emitMlirAttr()
147 os << std::string(elements.getType().getRank(), '[') << "..." in emitMlirAttr()
155 os << "[...]"; in emitMlirAttr()
163 os << truncateString(ss.str()); in emitMlirAttr()
182 edges.push_back(strFromOs([&](raw_ostream &os) { in emitEdgeStmt() argument
183 os << llvm::format("v%i -> v%i ", n1.id, n2.id); in emitEdgeStmt()
184 emitAttrList(os, attrs); in emitEdgeStmt()
190 os << "digraph G {\n"; in emitGraph()
191 os.indent(); in emitGraph()
193 os << attrStmt("compound", "true") << ";\n"; in emitGraph()
195 os.unindent(); in emitGraph()
196 os << "}\n"; in emitGraph()
205 os << llvm::format("v%i ", nodeId); in emitNodeStmt()
206 emitAttrList(os, attrs); in emitNodeStmt()
207 os << ";\n"; in emitNodeStmt()
213 return strFromOs([&](raw_ostream &os) { in getLabel() argument
215 os << op->getName(); in getLabel()
217 os << " : ("; in getLabel()
221 os << truncateString(ss.str()) << ")"; in getLabel()
222 os << ")"; in getLabel()
227 os << "\n"; in getLabel()
229 os << '\n' << attr.getName().getValue() << ": "; in getLabel()
230 emitMlirAttr(os, attr.getValue()); in getLabel()
305 raw_indented_ostream os; member in __anon2ace0bc30211::PrintOpPass
317 std::unique_ptr<Pass> mlir::createPrintOpGraphPass(raw_ostream &os) { in createPrintOpGraphPass() argument
318 return std::make_unique<PrintOpPass>(os); in createPrintOpGraphPass()
326 llvm::raw_fd_ostream os(fd, /*shouldClose=*/true); in llvmViewGraph() local
331 PrintOpPass pass(os); in llvmViewGraph()