[Bug libstdc++/94295] use __builtin_operator_new and __builtin_operator_delete when available
glisse at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Mar 24 07:04:10 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94295
--- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to Richard Smith from comment #0)
> The C++ language rules do not permit optimization (eg, deletion) of direct
> calls to 'operator new' and 'operator delete'.
I thought that was considered a bug?
Gcc does optimize those, like it does malloc/free...
> This bug requests that libstdc++ uses these builtins when available.
So just in std::allocator, or are there other places?
> (Separately, it'd be great if GCC considered supporting them too.)
IIRC (would need to dig up the conversation), when the optimization for
new/delete pairs was added in gcc, the builtin option was rejected.
More information about the Gcc-bugs
mailing list