Lines Matching refs:Stream
188 static raw_ostream &operator<<(raw_ostream &Stream, const ElementType &E) { in operator <<() argument
189 return Stream << '_' << E.Size; in operator <<()
191 static raw_ostream &operator<<(raw_ostream &Stream, const Individual &O) { in operator <<() argument
192 return Stream << O.Element; in operator <<()
194 static raw_ostream &operator<<(raw_ostream &Stream, const Overlap &O) { in operator <<() argument
195 return Stream << "HeadTail<" << O.Element << '>'; in operator <<()
197 static raw_ostream &operator<<(raw_ostream &Stream, const Loop &O) { in operator <<() argument
198 return Stream << "Loop<" << O.Element << '>'; in operator <<()
200 static raw_ostream &operator<<(raw_ostream &Stream, const AlignedLoop &O) { in operator <<() argument
201 return Stream << "Align<" << O.Alignment << ',' << O.AlignTo << ">::Then<" in operator <<()
204 static raw_ostream &operator<<(raw_ostream &Stream, const Accelerator &O) { in operator <<() argument
205 return Stream << "Accelerator"; in operator <<()
220 static raw_ostream &operator<<(raw_ostream &Stream, const Zero &O) { in operator <<() argument
221 Stream << kIndent << "if(size == 0) return"; in operator <<()
223 Stream << ' ' << O.DefaultReturnValue; in operator <<()
224 return Stream << ";\n"; in operator <<()
228 static raw_ostream &operator<<(raw_ostream &Stream, const IfEq<T> &O) { in operator <<() argument
229 return Stream << kIndent << "if(size == " << O.Element.IfEq << ") return " in operator <<()
234 static raw_ostream &operator<<(raw_ostream &Stream, const IfLt<T> &O) { in operator <<() argument
235 Stream << kIndent; in operator <<()
237 Stream << "if(size < " << O.Element.IfLt << ") "; in operator <<()
238 return Stream << "return " << O.Op << '<' << O.Element << '>' << O.Args in operator <<()
242 static raw_ostream &operator<<(raw_ostream &Stream, in operator <<() argument
246 return Stream << "scalar"; in operator <<()
248 return Stream << "builtin"; in operator <<()
252 return Stream << "x86"; in operator <<()
256 static raw_ostream &operator<<(raw_ostream &Stream, in operator <<() argument
259 Stream << "static " << Ctx.FunctionReturnType << ' ' << FI.Name in operator <<()
261 Stream << kIndent << "using namespace __llvm_libc::" << FI.ElementClass in operator <<()
265 Stream << Zero{Ctx.DefaultReturnValue}; in operator <<()
267 Stream << IfEq<Individual>{Ctx.ElementOp, Ctx.FixedSizeArgs, I}; in operator <<()
269 Stream << IfLt<Overlap>{Ctx.ElementOp, Ctx.RuntimeSizeArgs, O}; in operator <<()
271 Stream << IfLt<Loop>{Ctx.ElementOp, Ctx.RuntimeSizeArgs, *C}; in operator <<()
273 Stream << IfLt<AlignedLoop>{Ctx.ElementOp, Ctx.RuntimeSizeArgs, *C}; in operator <<()
275 Stream << IfLt<Accelerator>{Ctx.ElementOp, Ctx.RuntimeSizeArgs, *C}; in operator <<()
276 return Stream << "}\n"; in operator <<()
306 static void Serialize(raw_ostream &Stream, in Serialize() argument
310 Stream << getImplementation(FD); in Serialize()
329 static raw_ostream &operator<<(raw_ostream &Stream, const SizeSpan &SS) { in operator <<() argument
330 Stream << "{" << SS.Begin << ','; in operator <<()
332 Stream << "kMaxSize"; in operator <<()
334 Stream << SS.End; in operator <<()
335 return Stream << '}'; in operator <<()
337 static raw_ostream &operator<<(raw_ostream &Stream, const Contiguous &O) { in operator <<() argument
338 return Stream << "Contiguous{" << O.Span << '}'; in operator <<()
340 static raw_ostream &operator<<(raw_ostream &Stream, const Overlap &O) { in operator <<() argument
341 return Stream << "Overlap{" << O.Span << '}'; in operator <<()
343 static raw_ostream &operator<<(raw_ostream &Stream, const Loop &O) { in operator <<() argument
344 return Stream << "Loop{" << O.Span << ',' << O.BlockSize << '}'; in operator <<()
346 static raw_ostream &operator<<(raw_ostream &Stream, const AlignArg &O) { in operator <<() argument
349 return Stream << "AlignArg::_1"; in operator <<()
351 return Stream << "AlignArg::_2"; in operator <<()
356 static raw_ostream &operator<<(raw_ostream &Stream, const AlignedLoop &O) { in operator <<() argument
357 return Stream << "AlignedLoop{" << O.Loop << ',' << O.Alignment << ',' in operator <<()
360 static raw_ostream &operator<<(raw_ostream &Stream, const Accelerator &O) { in operator <<() argument
361 return Stream << "Accelerator{" << O.Span << '}'; in operator <<()
363 static raw_ostream &operator<<(raw_ostream &Stream, const ElementTypeClass &O) { in operator <<() argument
366 return Stream << "ElementTypeClass::SCALAR"; in operator <<()
368 return Stream << "ElementTypeClass::BUILTIN"; in operator <<()
370 return Stream << "ElementTypeClass::NATIVE"; in operator <<()
373 static raw_ostream &operator<<(raw_ostream &Stream, const FunctionType &T) { in operator <<() argument
376 return Stream << "FunctionType::MEMCPY"; in operator <<()
378 return Stream << "FunctionType::MEMCMP"; in operator <<()
380 return Stream << "FunctionType::BCMP"; in operator <<()
382 return Stream << "FunctionType::MEMSET"; in operator <<()
384 return Stream << "FunctionType::BZERO"; in operator <<()
388 static raw_ostream &operator<<(raw_ostream &Stream, in operator <<() argument
391 return Stream << *MaybeT; in operator <<()
392 return Stream << "llvm::None"; in operator <<()
394 static raw_ostream &operator<<(raw_ostream &Stream, in operator <<() argument
396 return Stream << '{' << FD.Type << ',' << FD.Contiguous << ',' << FD.Overlap in operator <<()
400 static raw_ostream &operator<<(raw_ostream &Stream, in operator <<() argument
402 return Stream << '{' << '"' << NFD.Name << '"' << ',' << NFD.Desc << '}'; in operator <<()
405 static raw_ostream &operator<<(raw_ostream &Stream, in operator <<() argument
407 Stream << '{'; in operator <<()
411 Stream << ','; in operator <<()
412 Stream << Obj; in operator <<()
415 return Stream << '}'; in operator <<()
418 static void Serialize(raw_ostream &Stream, in Serialize() argument
420 Stream << R"(ArrayRef<NamedFunctionDescriptor> getFunctionDescriptors() { in Serialize()
424 Stream << kIndent << kIndent << Descriptors[I] << ",\n"; in Serialize()
426 Stream << R"( }; in Serialize()
469 static raw_ostream &operator<<(raw_ostream &Stream, const FunctionName &FN) { in operator <<() argument
472 return Stream << "getMemcpyConfigurations"; in operator <<()
474 return Stream << "getMemcmpConfigurations"; in operator <<()
476 return Stream << "getBcmpConfigurations"; in operator <<()
478 return Stream << "getMemsetConfigurations"; in operator <<()
480 return Stream << "getBzeroConfigurations"; in operator <<()
484 static raw_ostream &operator<<(raw_ostream &Stream, const ReturnType &RT) { in operator <<() argument
487 return Stream << "MemcpyConfiguration"; in operator <<()
490 return Stream << "MemcmpOrBcmpConfiguration"; in operator <<()
492 return Stream << "MemsetConfiguration"; in operator <<()
494 return Stream << "BzeroConfiguration"; in operator <<()
498 static raw_ostream &operator<<(raw_ostream &Stream, in operator <<() argument
500 return Stream << formatv("{Wrap<{0}>, \"{0}\"}", FD->Name); in operator <<()
504 operator<<(raw_ostream &Stream, in operator <<() argument
507 Stream << kIndent << kIndent << Descriptors[I] << ",\n"; in operator <<()
508 return Stream; in operator <<()
511 static raw_ostream &operator<<(raw_ostream &Stream, const Configuration &C) { in operator <<() argument
512 Stream << "llvm::ArrayRef<" << C.Type << "> " << C.Name << "() {\n"; in operator <<()
514 Stream << kIndent << "return {};\n"; in operator <<()
516 Stream << kIndent << "using namespace __llvm_libc;\n"; in operator <<()
517 Stream << kIndent << "static constexpr " << C.Type in operator <<()
519 Stream << C.Descriptors; in operator <<()
520 Stream << kIndent << "};\n"; in operator <<()
521 Stream << kIndent << "return llvm::makeArrayRef(kConfigurations);\n"; in operator <<()
523 Stream << "}\n"; in operator <<()
524 return Stream; in operator <<()
527 static void Serialize(raw_ostream &Stream, FunctionType FT, in Serialize() argument
535 Stream << Conf; in Serialize()
539 static void Serialize(raw_ostream &Stream, in Serialize() argument
541 Stream << "// This file is auto-generated by libc/benchmarks/automemcpy.\n"; in Serialize()
542 Stream << "// Functions : " << Descriptors.size() << "\n"; in Serialize()
543 Stream << "\n"; in Serialize()
544 Stream << "#include \"LibcFunctionPrototypes.h\"\n"; in Serialize()
545 Stream << "#include \"automemcpy/FunctionDescriptor.h\"\n"; in Serialize()
546 Stream << "#include \"src/string/memory_utils/elements.h\"\n"; in Serialize()
547 Stream << "\n"; in Serialize()
548 Stream << "using llvm::libc_benchmarks::BzeroConfiguration;\n"; in Serialize()
549 Stream << "using llvm::libc_benchmarks::MemcmpOrBcmpConfiguration;\n"; in Serialize()
550 Stream << "using llvm::libc_benchmarks::MemcpyConfiguration;\n"; in Serialize()
551 Stream << "using llvm::libc_benchmarks::MemmoveConfiguration;\n"; in Serialize()
552 Stream << "using llvm::libc_benchmarks::MemsetConfiguration;\n"; in Serialize()
553 Stream << "\n"; in Serialize()
554 Stream << "namespace __llvm_libc {\n"; in Serialize()
555 Stream << "\n"; in Serialize()
556 codegen::functions::Serialize(Stream, Descriptors); in Serialize()
557 Stream << "\n"; in Serialize()
558 Stream << "} // namespace __llvm_libc\n"; in Serialize()
559 Stream << "\n"; in Serialize()
560 Stream << "namespace llvm {\n"; in Serialize()
561 Stream << "namespace automemcpy {\n"; in Serialize()
562 Stream << "\n"; in Serialize()
563 codegen::descriptors::Serialize(Stream, Descriptors); in Serialize()
564 Stream << "\n"; in Serialize()
565 Stream << "} // namespace automemcpy\n"; in Serialize()
566 Stream << "} // namespace llvm\n"; in Serialize()
567 Stream << "\n"; in Serialize()
568 Stream << R"( in Serialize()
577 codegen::configurations::Serialize(Stream, FunctionType::MEMCPY, Descriptors); in Serialize()
578 Stream << R"( in Serialize()
586 codegen::configurations::Serialize(Stream, FunctionType::MEMCMP, Descriptors); in Serialize()
587 codegen::configurations::Serialize(Stream, FunctionType::BCMP, Descriptors); in Serialize()
588 Stream << R"( in Serialize()
595 codegen::configurations::Serialize(Stream, FunctionType::MEMSET, Descriptors); in Serialize()
596 Stream << R"( in Serialize()
602 codegen::configurations::Serialize(Stream, FunctionType::BZERO, Descriptors); in Serialize()
603 Stream << R"( in Serialize()
608 Stream << "// Functions : " << Descriptors.size() << "\n"; in Serialize()
635 void Serialize(raw_ostream &Stream, ArrayRef<FunctionDescriptor> Descriptors) { in Serialize() argument
648 codegen::Serialize(Stream, FunctionDescriptors); in Serialize()