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

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |alias, missed-optimization
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-10-14
     Ever confirmed|0                           |1

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to vries from comment #2)
> (In reply to Richard Biener from comment #1)
> > The same points-to set results from
> > 
> > int *p = (int *)((char *)&a + 2);
> > 
> > or even
> > 
> > int *p = &a + 1;
> > 
> 
> I see, I didn't realize that. But AFAICT, in both these cases, storing to *p
> is illegal (if 'a' is a scalar int).
> 
> > so you can't use points-to info that way (to derive a must-alias).
> 
> I see your point related to an array object, there pointers to different
> array elements would have identical points-to sets.
> 
> I wonder though: if we have a store '*p = 0', and the size of the store is
> the same as the size of the pointed-to object of pointer p, can't we
> conclude that  pointer p points to the start of the object?

Yes, for that special case we indeed can do that.  I wonder if it's worth
doing though ;)  Care to adjust stmt_kills_ref_p accordingly and instrument it
to see how many times during bootstrap this triggers?


  parent reply	other threads:[~2015-10-14  7:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-13 13:57 [Bug tree-optimization/67955] New: " 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 [this message]
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-dosp5OKcwV@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).