[libc-commits] [PATCH] D153999: [libc] Move printf writer to new design

Michael Jones via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Jun 28 13:30:27 PDT 2023


michaelrj created this revision.
michaelrj added reviewers: sivachandra, lntue, mcgrathr.
Herald added projects: libc-project, All.
Herald added a subscriber: libc-commits.
michaelrj requested review of this revision.

The new printf writer design focuses on optimizing the fast path. It
inlines any write to a buffer or string, and by handling buffering
itself can more effectively work with both internal and external file
implementations. The overflow hook should allow for expansion to
asprintf with minimal extra code.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D153999

Files:
  libc/src/stdio/CMakeLists.txt
  libc/src/stdio/fprintf.cpp
  libc/src/stdio/printf.cpp
  libc/src/stdio/printf_core/CMakeLists.txt
  libc/src/stdio/printf_core/char_converter.h
  libc/src/stdio/printf_core/string_converter.h
  libc/src/stdio/printf_core/string_writer.cpp
  libc/src/stdio/printf_core/string_writer.h
  libc/src/stdio/printf_core/vfprintf_internal.h
  libc/src/stdio/printf_core/writer.cpp
  libc/src/stdio/printf_core/writer.h
  libc/src/stdio/snprintf.cpp
  libc/src/stdio/sprintf.cpp
  libc/test/src/stdio/CMakeLists.txt
  libc/test/src/stdio/printf_core/CMakeLists.txt
  libc/test/src/stdio/printf_core/converter_test.cpp
  libc/test/src/stdio/printf_core/string_writer_test.cpp
  libc/test/src/stdio/printf_core/writer_test.cpp
  libc/test/src/stdio/snprintf_test.cpp
  utils/bazel/llvm-project-overlay/libc/BUILD.bazel
  utils/bazel/llvm-project-overlay/libc/test/src/stdio/BUILD.bazel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153999.535503.patch
Type: text/x-patch
Size: 49096 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230628/0f767ca8/attachment-0001.bin>


More information about the libc-commits mailing list