public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Guenther <rguenther@suse.de>
To: Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
Cc: gcc-patches@gcc.gnu.org, joseph@codesourcery.com, matz@suse.de
Subject: Re: [PATCH] Make alias_sets_conflict_p less conservative
Date: Wed, 05 Mar 2008 15:52:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.64.0803051646130.4133@zhemvz.fhfr.qr> (raw)
In-Reply-To: <10803051543.AA07294@vlsi1.ultra.nyu.edu>

On Wed, 5 Mar 2008, Richard Kenner wrote:

> > But in the case we are trying to fix, the current alias behavior would
> > make
> > 
> >   s.size = 0;
> > 
> > conflict with the store and load from p->d, which is incorrect.
> 
> I don't think so.  In that case, we look at the alias set of s.size, not of s.

Ok, so the problem (of PR27799) is that our tree aliasing machinery
creates SMTs (structure-memory-tags) that represent all structures
with a given type.  TBAA relations here are computed by asking wheter
for example a pointer can access struct X which is done by asking for
alias_sets_conflict_p (get_alias_set (*ptr), get_alias_set (struct-type))
which in this case returns true (as struc-type has a char member).
[this all happens in may_alias_p]

Later during operand scanning we (could) ask again, but only the
same question -- does the access p->x alias a SMT?  And the answer
would be the same.  [access_can_touch_variable]

So we are lost here, as we obviously cannot ask the question this way
with the current scheme. (?)

To recap:

struct A { int i; char c; };
struct B { float f; };

the question we ask is, can you access any struct A through a pointer
to struct B?  And, can ((struct B *)p)->f touch any struct A?

For this sort of questions (with char having alias set zero and the
subsetting work as is), we can only answer yes.  With my patch
we can start to say no here.

Richard.

  reply	other threads:[~2008-03-05 15:52 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-04 20:59 Richard Guenther
2008-03-04 23:54 ` Richard Kenner
2008-03-05  0:20   ` Daniel Berlin
2008-03-05  1:35     ` Richard Kenner
2008-03-05 10:00       ` Richard Guenther
2008-03-05 11:10         ` Paolo Bonzini
2008-03-05 11:17           ` Eric Botcazou
2008-03-05 12:05             ` Paolo Bonzini
2008-03-05 12:09               ` Eric Botcazou
2008-03-05 12:29               ` Richard Kenner
2008-03-05 11:31         ` Richard Kenner
2008-03-05 11:47           ` Richard Guenther
2008-03-05 12:25             ` Richard Kenner
2008-03-05 12:42               ` Richard Guenther
2008-03-05 12:55                 ` Richard Kenner
2008-03-05 14:07                   ` Richard Guenther
2008-03-05 14:24                     ` Richard Kenner
2008-03-05 15:01                       ` Richard Guenther
2008-03-05 15:13                         ` Richard Kenner
2008-03-05 15:21                           ` Richard Guenther
2008-03-05 15:29                             ` Michael Matz
2008-03-05 15:38                               ` Richard Guenther
2008-03-05 15:42                                 ` Richard Kenner
2008-03-05 15:52                                   ` Richard Guenther [this message]
2008-03-05 15:59                                     ` Richard Kenner
2008-03-05 16:07                                       ` Richard Guenther
2008-03-05 16:13                                         ` Richard Kenner
2008-03-05 16:17                                           ` Richard Guenther
2008-03-05 16:21                                             ` Richard Guenther
2008-03-05 16:55                                               ` Daniel Berlin
2008-03-05 16:55                                                 ` Richard Guenther
2008-03-05 17:00                                                   ` Daniel Berlin
2008-03-05 16:23                                             ` Richard Kenner
2008-03-05 16:27                                               ` Richard Guenther
2008-03-05 16:28                                                 ` Richard Kenner
2008-03-05 16:57                                                   ` Daniel Berlin
2008-03-05 15:18                       ` Michael Matz
2008-03-05 15:28                         ` Richard Kenner
2008-03-05  9:21   ` Richard Guenther
2008-03-05 11:29     ` Richard Kenner
2008-03-20  7:09       ` Mark Mitchell
2008-03-05 14:10     ` Richard Guenther

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=Pine.LNX.4.64.0803051646130.4133@zhemvz.fhfr.qr \
    --to=rguenther@suse.de \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=joseph@codesourcery.com \
    --cc=kenner@vlsi1.ultra.nyu.edu \
    --cc=matz@suse.de \
    /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).