public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/67955] New: tree-dse does not use pointer info
Date: Tue, 13 Oct 2015 13:57:00 -0000	[thread overview]
Message-ID: <bug-67955-4@http.gcc.gnu.org/bugzilla/> (raw)

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.


             reply	other threads:[~2015-10-13 13:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-13 13:57 vries at gcc dot gnu.org [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-67955-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).