public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrew Haley <aph@redhat.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: New flag: TREE_THIS_NOTRAP
Date: Tue, 15 Jun 2004 11:50:00 -0000	[thread overview]
Message-ID: <16590.52354.580748.995008@cuddles.cambridge.redhat.com> (raw)
In-Reply-To: <87brjl4sfc.fsf@fleche.redhat.com>

Tom Tromey writes:
 > >>>>> "Andrew" == Andrew Haley <aph@redhat.com> writes:
 > 
 > rth> So the NOTRAP bit is on the pointer and not the INDIRECT_REF?
 > 
 > Andrew> It has to be doesn't it?  The trapping in
 > Andrew>    *exp
 > Andrew> is a property of exp, not a property of *.
 > 
 > Suppose for example we have a sequence of field assignments via a
 > local variable:
 > 
 >    point *var = ...;
 >    var->x = 1;
 >    var->y = 1;
 > 
 > The first `*var' might trap, but the second one can't.

I think that's true for Java, where we're not allowed to re-order
stores.

 > But in both cases wouldn't this be INDIRECT_REF<VAR_DECL> -- with the
 > same argument?

Yes.  But I've already been persuaded to attach the NOTRAP bit to the
INDIRECT_REF anyway.  This should probably become a type attribute, so
the above could be

    point *var = ...;
    var->x = 1;
    ((notrap point*)var)->y = 1;

I'm a bit lary of generating new types, though, because I want to
avoid a memory explosion.  It's perhaps worth experimenting with.
 
Andrew.

      reply	other threads:[~2004-06-15 10:17 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-09 14:03 Andrew Haley
2004-06-09 21:45 ` Richard Henderson
2004-06-09 21:46 ` Richard Henderson
2004-06-10 12:45   ` Andrew Haley
2004-06-10 18:06     ` Richard Henderson
2004-06-11 18:18       ` Andrew Haley
2004-06-11 20:37         ` Richard Henderson
2004-06-11 20:44           ` Andrew Haley
2004-06-11 20:49             ` Richard Henderson
2004-06-14 22:26               ` Jason Merrill
2004-06-16 17:17               ` Andrew Haley
2004-06-16 17:17                 ` Andrew Haley
2004-06-16 17:35                   ` Frank Ch. Eigler
2004-06-16 17:35                     ` Andrew Haley
2004-06-16 18:30                 ` Richard Henderson
2004-06-15  2:39             ` Tom Tromey
2004-06-15 11:50               ` Andrew Haley [this message]

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=16590.52354.580748.995008@cuddles.cambridge.redhat.com \
    --to=aph@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=tromey@redhat.com \
    /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).