public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/50824] New: memset or memcpy on structure prevents SRA
@ 2011-10-21 15:26 andi-gcc at firstfloor dot org
  2011-10-23 10:57 ` [Bug tree-optimization/50824] " rguenth at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: andi-gcc at firstfloor dot org @ 2011-10-21 15:26 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 50824
           Summary: memset or memcpy on structure prevents SRA
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: andi-gcc@firstfloor.org


Clearing a structure using memset or copying it using memcpy currently
disables SRA for the structure because it counts as escaping. 

Since this is common it would be better
if it was handled. Clearing it using an initializer or copying it with
= already works, so those could be handled the same way.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug tree-optimization/50824] memset or memcpy on structure prevents SRA
  2011-10-21 15:26 [Bug tree-optimization/50824] New: memset or memcpy on structure prevents SRA andi-gcc at firstfloor dot org
@ 2011-10-23 10:57 ` rguenth at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-10-23 10:57 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2011-10-23
     Ever Confirmed|0                           |1

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-10-23 10:57:29 UTC ---
No, I think because it counts as address-taken, not because it escapes.

Do you have a testcase?  Most memcpys should be folded to a plain assignment
already, but we don't fold memset to zero to = {} I guess.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-10-23 10:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-21 15:26 [Bug tree-optimization/50824] New: memset or memcpy on structure prevents SRA andi-gcc at firstfloor dot org
2011-10-23 10:57 ` [Bug tree-optimization/50824] " rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).