http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47611

Aldy Hernandez <aldyh at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P5
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011.02.04 21:11:43
     Ever Confirmed|0                           |1

--- Comment #1 from Aldy Hernandez <aldyh at gcc dot gnu.org> 2011-02-04 
21:11:43 UTC ---
Bringing in a note from the other PR...

The reason memory allocated by the C++ new operator does not get
optimized by the TM-memopt pass is not because of a missing ECF_MALLOC
attribute, but because the alias oracle in GCC considers the chunk of memory as
possibly able to escape from the current function.

That is, the following hunk of code returns true in the TM-memopt pass:

      if (ptr_deref_may_alias_global_p (x))

Apparently, since new/delete operators may be overridden by class specific
hooks, the memory must be considered escaped.

Reply via email to