mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-17 15:31:05 +08:00
Remove not needed __builtin_expect due to malloc predictor.
2018-08-10 Martin Liska <mliska@suse.cz> * libsupc++/new_op.cc (new): Remove __builtin_expect as malloc predictor can handle that. * libsupc++/new_opa.cc: Likewise. * libsupc++/new_opnt.cc (new): Likewise. From-SVN: r263470
This commit is contained in:
parent
aa40590559
commit
8b9a5b5e0e
@ -1,3 +1,10 @@
|
||||
2018-08-10 Martin Liska <mliska@suse.cz>
|
||||
|
||||
* libsupc++/new_op.cc (new): Remove __builtin_expect as malloc
|
||||
predictor can handle that.
|
||||
* libsupc++/new_opa.cc: Likewise.
|
||||
* libsupc++/new_opnt.cc (new): Likewise.
|
||||
|
||||
2018-08-10 Sebastian Huber <sebastian.huber@embedded-brains.de>
|
||||
|
||||
PR target/85904
|
||||
|
@ -47,7 +47,7 @@ operator new (std::size_t sz) _GLIBCXX_THROW (std::bad_alloc)
|
||||
if (sz == 0)
|
||||
sz = 1;
|
||||
|
||||
while (__builtin_expect ((p = malloc (sz)) == 0, false))
|
||||
while ((p = malloc (sz)) == 0)
|
||||
{
|
||||
new_handler handler = std::get_new_handler ();
|
||||
if (! handler)
|
||||
|
@ -126,7 +126,7 @@ operator new (std::size_t sz, std::align_val_t al)
|
||||
#endif
|
||||
|
||||
using __gnu_cxx::aligned_alloc;
|
||||
while (__builtin_expect ((p = aligned_alloc (align, sz)) == 0, false))
|
||||
while ((p = aligned_alloc (align, sz)) == 0)
|
||||
{
|
||||
new_handler handler = std::get_new_handler ();
|
||||
if (! handler)
|
||||
|
@ -40,7 +40,7 @@ operator new (std::size_t sz, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
|
||||
if (sz == 0)
|
||||
sz = 1;
|
||||
|
||||
while (__builtin_expect ((p = malloc (sz)) == 0, false))
|
||||
while ((p = malloc (sz)) == 0)
|
||||
{
|
||||
new_handler handler = std::get_new_handler ();
|
||||
if (! handler)
|
||||
|
Loading…
x
Reference in New Issue
Block a user