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 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits