public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Daniel Berlin" <dberlin@dberlin.org>
To: "Richard Kenner" <kenner@vlsi1.ultra.nyu.edu>
Cc: rguenther@suse.de, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Make alias_sets_conflict_p less conservative
Date: Wed, 05 Mar 2008 00:20:00 -0000	[thread overview]
Message-ID: <4aca3dc20803041620g70075ae3h40d22a4531ad7566@mail.gmail.com> (raw)
In-Reply-To: <10803042355.AA00168@vlsi1.ultra.nyu.edu>

On Tue, Mar 4, 2008 at 6:55 PM, Richard Kenner
<kenner@vlsi1.ultra.nyu.edu> wrote:
> > This makes alias_sets_conflict_p less conservative.  rev 34373 (Kenner)
>  > added a check that makes a structure containing a member with alias
>  > set zero alias everything.  Which IMHO is non-obvious and pessimizes
>  > for example the testcase in PR27799.  Richard, can you explain this
>  > change?
>
>  I'm not certain, but I think it goes like this: if a structure has
>  a member with alias set X (nonzero), we normally mark the alias sets
>  in such a way that the alias set of the structure as a whole conflicts
>  with alias set X.  But if X is zero, the subsetting mechanism doesn't
>  allow doing that.  So we have to do it explicitly, like in this code.
>
>  In other words, this is exactly analogous to the non-zero alias set
>  of a field case.
>

Sadly, you are right about how the subsetting mechanism works, but he
is right in what the result we want should be.

This is because the the type based rules (at least for C) say "access
through pointer char can validly alias anything" but not "access
through pointer to anything can validly alias char".

Because alias_sets_conflicts_p checks both ways, it ends up claiming
the second statement is true as well.

In reality, you need a directional aliasing test here, not
alias_sets_conflict_p (IE you want something that says "can a pointer
of this point to this type over there)

--Dan

  reply	other threads:[~2008-03-05  0:20 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 [this message]
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
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=4aca3dc20803041620g70075ae3h40d22a4531ad7566@mail.gmail.com \
    --to=dberlin@dberlin.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=kenner@vlsi1.ultra.nyu.edu \
    --cc=rguenther@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).