public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/67955] New: tree-dse does not use pointer info
@ 2015-10-13 13:57 vries at gcc dot gnu.org
  2015-10-13 14:25 ` [Bug tree-optimization/67955] " rguenth at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: vries at gcc dot gnu.org @ 2015-10-13 13:57 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67955

            Bug ID: 67955
           Summary: tree-dse does not use pointer info
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

Consider this testcase, with dead store '*p = 1':
...
int
f ()
{
  int a;
  int *p = &a;
  *p = 1;
  a = 2;
  return a;
}
...

We compile with -O2 -fno-tree-ccp -fno-tree-forwprop -fno-tree-fre.

At dse1 we have
...
f ()
{
  int * p;
  int a;
  int _5;

  <bb 2>:
  p_1 = &a;
  *p_1 = 1;
  a = 2;
  _5 = a;
  a ={v} {CLOBBER};
  return _5;

}
...

So, the dead store '*p_1 = 1' has not been eliminated.

However, at ealias we already know:
...
Alias information for f

Aliased symbols

a, UID D.1757, int, is addressable

Call clobber information

ESCAPED, points-to non-local, points-to vars: { }

Flow-insensitive points-to information

p_1, points-to vars: { D.1757 }
...

So, we could use points-to info in dce.


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

end of thread, other threads:[~2015-10-15  6:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-13 13:57 [Bug tree-optimization/67955] New: tree-dse does not use pointer info vries at gcc dot gnu.org
2015-10-13 14:25 ` [Bug tree-optimization/67955] " rguenth at gcc dot gnu.org
2015-10-13 15:34 ` vries at gcc dot gnu.org
2015-10-14  7:28 ` rguenth at gcc dot gnu.org
2015-10-14 11:06 ` vries at gcc dot gnu.org
2015-10-14 12:18 ` vries at gcc dot gnu.org
2015-10-14 14:56 ` vries at gcc dot gnu.org
2015-10-15  6:32 ` vries at gcc dot gnu.org
2015-10-15  6:32 ` vries 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).