[llvm-branch-commits] [libcxx] [libc++] Implement std::move_only_function (P0288R9) (PR #94670)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Jun 10 08:47:36 PDT 2024
EricWF wrote:
> @EricWF When switching to `__libcpp_operator_{new,delete}` everything gets compiled exactly the same on my system. Could you disclose which test you used for this code? You also claim that the `__pointer_int_pair` causes the optimizer to lose track of the function pointer causing the call to not be elided, but I can't see any calls other than `new` and `delete` in the code you posted either.
I meant `__libcpp_allocate` and `__libcpp_deallocate`. That's my mistake.
I may have misread the assembly earlier, it's possible there's some other issue causing the compiler to fail to optimize your code away in the same way the compiler optimizes the implementation I provided.
@philnik777 I would encourage you to read about the importance of learning to "kill your darlings". The saying comes from creating writing, but is equally important here.
https://github.com/llvm/llvm-project/pull/94670
More information about the llvm-branch-commits
mailing list