[libcxx-commits] [PATCH] D110494: [libc++][format][1/6] Reduce binary size.

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Nov 22 11:41:59 PST 2021


Mordante marked 2 inline comments as done.
Mordante added a comment.

In D110494#3145162 <https://reviews.llvm.org/D110494#3145162>, @vitaut wrote:

> LGTM provided that the extra copy and buffering is eliminated in the follow-up diffs.

Thanks for the review.
The followup patches in this branch should indeed eliminated the extra copying and buffering.



================
Comment at: libcxx/include/format:519
 _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT _OutIt
-vformat_to(_OutIt __out_it, string_view __fmt,
-           format_args_t<type_identity_t<_OutIt>, char> __args) {
+vformat_to(_OutIt __out_it, string_view __fmt, format_args __args) {
   return _VSTD::__vformat_to(_VSTD::move(__out_it), __fmt, __args);
----------------
vitaut wrote:
> vitaut wrote:
> > Maybe force inline `format_to*` / `vformat_to*` to make debug codegen less horrible (https://godbolt.org/z/Kah4sqY5z) and since they are just trivial wrappers around `__vformat_to*`?
> Note that without this code bloat prevention isn't working even with -O2 right now which is quite worrying: https://godbolt.org/z/1dn836jzG.
I've added force inlines. I still want to look at the size of the generated code at a later point in time. I think it makes more sense to look at after the all papers and LWG issues have been implemented. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110494/new/

https://reviews.llvm.org/D110494



More information about the libcxx-commits mailing list