public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Diego Novillo <dnovillo@redhat.com>
To: Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re:  Fix processing of ADDR_EXPR in get_expr_operands
Date: Fri, 30 Jul 2004 19:05:00 -0000	[thread overview]
Message-ID: <1091193498.5942.215.camel@localhost.localdomain> (raw)
In-Reply-To: <10407300327.AA14969@vlsi1.ultra.nyu.edu>

On Thu, 2004-07-29 at 23:27, Richard Kenner wrote:

>     I don't know *why* ADDR_EXPR of a volatile is not TREE_CONSTANT.  I
>     don't really care.  
> 
> Well, I do.  It sounds like a bug to me.  Indeed it sounds like the central
> bug in what you're trying to fix.
> 
No.  It is not a bug.  I don't know how else to tell you the same
thing.  Address constness is checked with TREE_INVARIANT.  The address
of a variable may be invariant in one invocation to a function, but have
different values from call to call.

>     All I know, and always use, is that constness of ADDR_EXPRs is tested
>     with TREE_INVARIANT.  Hence the call to is_gimple_min_invariant.  Even
>     TREE_CONSTANT is not always right, you have to check for overflow as
>     well.
> 
> Overflow?
> 
Yes.  Overflow.

>     Which you will notice sets both TREE_CONSTANT and TREE_INVARIANT, not
>     necessarily with the same value.
> 
> Right, I know it does.  Indeed I made some changes to that code.
>
Then why are we having this conversation?  You should know why we set
TREE_INVARIANT instead of TREE_CONSTANT, then.


Diego.

  reply	other threads:[~2004-07-30 13:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-30 15:51 Richard Kenner
2004-07-30 19:05 ` Diego Novillo [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-07-30 23:39 Richard Kenner
2004-07-30 20:48 Richard Kenner
2004-07-30 21:17 ` Diego Novillo
2004-07-30 19:02 Richard Kenner
2004-07-30 15:43 Richard Kenner
2004-07-30 15:44 ` Diego Novillo
2004-07-30 18:28 ` Richard Henderson
2004-07-30 14:19 Richard Kenner
2004-07-30 15:12 ` Diego Novillo
2004-07-30 18:26 ` Richard Henderson
2004-07-29 23:40 Diego Novillo

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=1091193498.5942.215.camel@localhost.localdomain \
    --to=dnovillo@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=kenner@vlsi1.ultra.nyu.edu \
    /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).