[libcxx-commits] [PATCH] D118329: [libc++] Optimize algorithms on uninitialized memory for trivial types.
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Jan 29 05:08:25 PST 2022
Mordante added a comment.
In D118329#3281020 <https://reviews.llvm.org/D118329#3281020>, @var-const wrote:
> In D118329#3277050 <https://reviews.llvm.org/D118329#3277050>, @Quuxplusone wrote:
>
>> FWIW, libc++'s historical position on this kind of optimization (which I associate particularly with Marshall's tenure) is "libc++ should do the simple thing; file a codegen bug against //Clang// if it's failing to optimize our simple template code for some trivial type." TBF, I have not looked closely at this PR to know whether that attitude would be unfair here for some reason.
>> Do you have a Godbolt of the codegen before and after? (You should.)
>
> @Quuxplusone This is a very good point. I'd suggest holding off the review for now until I have some data.
Thanks, I too like to see this data.
I only skimmed over the patch and didn't do a review.
================
Comment at: libcxx/include/__memory/construct_at.h:113
+ return _VSTD::next(__first, __n);
+ }
+
----------------
For an `if constexpr` there needs to be an `else` branch to guarantee the code below isn't used.
Please search the patch for other occurances of `if constexpr`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118329/new/
https://reviews.llvm.org/D118329
More information about the libcxx-commits
mailing list