public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/36201]  New: NVR in the front-end causes missed optimization later on (<retval> thought to alias arguments)
@ 2008-05-10 19:36 pinskia at gcc dot gnu dot org
  2008-05-13  8:44 ` [Bug middle-end/36201] " rguenth at gcc dot gnu dot org
                   ` (12 more replies)
  0 siblings, 13 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-05-10 19:36 UTC (permalink / raw)
  To: gcc-bugs

Testcase:
#define SIZE 1024
While looking into why manually SRA'd testcase worked better. I found this
interesting problem.
Take:
struct a
{
  long long b;
  a();
};
a f(a &g, a &h)
{
  int i;
  a res = g;
  for (i = 0; i < SIZE; i++)
    res.b += h.b;
  return res;
}

at -O2 we change res here to <retval> so we have <retval> in the inner loop. 
If we supply -fno-elide-constructors which disables NVR in C++ front-end, we
get good code of doing loop based Copy Prop (SCEV copy prop) as we able to pull
out res.b.  The issue is that we say h can alias <retval> but we don't say the
same thing for res though.


-- 
           Summary: NVR in the front-end causes missed optimization later on
                    (<retval> thought to alias arguments)
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: missed-optimization, alias
          Severity: enhancement
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org


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


^ permalink raw reply	[flat|nested] 17+ messages in thread
[parent not found: <bug-36201-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2012-03-13 16:23 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-10 19:36 [Bug middle-end/36201] New: NVR in the front-end causes missed optimization later on (<retval> thought to alias arguments) pinskia at gcc dot gnu dot org
2008-05-13  8:44 ` [Bug middle-end/36201] " rguenth at gcc dot gnu dot org
2008-05-13  9:15 ` rguenth at gcc dot gnu dot org
2008-05-13 11:42 ` rguenth at gcc dot gnu dot org
2008-05-13 13:16 ` rguenth at gcc dot gnu dot org
2008-12-31 21:12 ` [Bug middle-end/36201] [4.4 Regression] " pinskia at gcc dot gnu dot org
2009-01-05 11:19 ` rguenth at gcc dot gnu dot org
2009-04-03 10:28 ` [Bug middle-end/36201] [4.4/4.5 " rguenth at gcc dot gnu dot org
2009-04-03 10:33 ` [Bug middle-end/36201] [4.4 " rguenth at gcc dot gnu dot org
2009-04-21 16:01 ` jakub at gcc dot gnu dot org
2009-07-22 10:35 ` jakub at gcc dot gnu dot org
2009-10-15 12:53 ` jakub at gcc dot gnu dot org
2010-01-21 13:19 ` jakub at gcc dot gnu dot org
2010-04-30  8:58 ` jakub at gcc dot gnu dot org
     [not found] <bug-36201-4@http.gcc.gnu.org/bugzilla/>
2010-10-01 12:05 ` jakub at gcc dot gnu.org
2011-04-16 11:26 ` jakub at gcc dot gnu.org
2012-03-13 16:23 ` jakub 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).