public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Guenther <rguenther@suse.de>
To: Zdenek Dvorak <rakdver@kam.mff.cuni.cz>
Cc: gcc@gcc.gnu.org
Subject: Re: New no-undefined-overflow branch
Date: Fri, 27 Feb 2009 10:16:00 -0000	[thread overview]
Message-ID: <alpine.LNX.2.00.0902271112160.11836@zhemvz.fhfr.qr> (raw)
In-Reply-To: <20090226230834.GA3470@kam.mff.cuni.cz>

On Fri, 27 Feb 2009, Zdenek Dvorak wrote:

> Hi,
> 
> in general, I like this proposal a lot.  However,
> 
> > As a start there will be no-overflow variants of NEGATE_EXPR,
> > PLUS_EXPR, MINUS_EXPR, MULT_EXPR and POINTER_PLUS_EXPR.
> > 
> > The sizetypes will simply be operated on in no-overflow variants
> > by default (by size_binop and friends).
> > 
> > Naming suggestions welcome, at the moment I consider NEGATEV_EXPR
> > (thus appending V to the first part).

First, for the bikeshedding part I agree that NV is probably a better
idea.

> introducing new codes seems like a bad idea to me.  There are many
> places that do not care about the distinction between PLUS_EXPR and
> PLUSV_EXPR, and handling both cases will complicate the code (see eg.
> the problems caused by introducing POINTER_PLUS_EXPR vs PLUS_EXPR
> distinction).  Why not just use a flag to mark the operation as
> non-overflowing?

I obviously thought about this.  The issue with using a flag is
that there is no convenient place to stick it and that it makes
the distinction between the two variants less visible.  Consider
the folding routines that take split trees for a start.

IMHO using new tree-codes is much less complicated than carrying
around flags.  I did consider putting flags on the tree code
itself, but that isn't going to make the changes easier either.

Richard.

  reply	other threads:[~2009-02-27 10:16 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-26 11:05 Richard Guenther
2009-02-26 11:28 ` Manuel López-Ibáñez
2009-02-26 12:02   ` Richard Guenther
2009-02-26 13:07 ` Joseph S. Myers
2009-02-26 13:22   ` Richard Guenther
2009-02-26 14:16 ` Dave Korn
2009-02-26 23:08 ` Zdenek Dvorak
2009-02-27 10:16   ` Richard Guenther [this message]
2009-02-27 12:07     ` Dave Korn
2009-02-27 13:17       ` Richard Guenther
2009-02-27 13:35         ` Dave Korn
2009-02-27 13:45           ` Richard Guenther
2009-02-27 18:07       ` Zdenek Dvorak
2009-02-27 17:58     ` Zdenek Dvorak
2009-02-27 18:17       ` Richard Guenther
2009-02-27 23:07 ` Diego Novillo
2009-02-28  0:04   ` Joseph S. Myers
2009-02-28 10:29     ` Richard Guenther
2009-03-05 17:24       ` Geert Bosch
2009-03-06 12:28         ` Richard Guenther
2009-03-06 13:54           ` Joseph S. Myers
2009-03-06 14:10             ` Richard Guenther
2009-03-06 14:29               ` Joseph S. Myers
2009-03-06 17:17                 ` Geert Bosch
2009-03-06 17:42                   ` Joseph S. Myers
2009-03-06 14:44           ` Paolo Bonzini
2009-03-06 15:10             ` Richard Guenther
2009-03-06 15:23               ` Paolo Bonzini
2009-03-06 15:39                 ` Paolo Bonzini
2009-03-06 16:19                 ` Richard Guenther
2009-03-06 17:23                   ` Joseph S. Myers
2009-03-06 18:54                 ` Richard Earnshaw
2009-03-06 19:53                   ` Ian Lance Taylor
2009-03-06 20:42                     ` Robert Dewar
     [not found]                 ` <1236364189.1654.2.camel@pc960.cambridge.arm.com>
2009-03-06 19:34                   ` Paolo Bonzini
2009-03-06 15:58               ` Ian Lance Taylor
2009-03-06 17:25             ` Joseph S. Myers
2009-03-06 17:52               ` Paolo Bonzini
2009-03-06 18:36                 ` Joseph S. Myers
2009-03-27 13:11             ` Eus
2009-03-27 18:07               ` Paolo Bonzini
2009-03-31  4:55                 ` Eus
2009-03-06 17:21           ` Geert Bosch
2009-03-06 17:38             ` Joseph S. Myers
2009-03-06 18:47               ` Paolo Bonzini
2009-03-07  3:00                 ` Joseph S. Myers
2009-03-06 22:46               ` Geert Bosch
2009-03-07  1:21                 ` Richard Guenther
2009-02-28 10:25   ` Richard Guenther
2009-02-27 19:58 Jay Foad
2009-02-27 22:41 ` Richard Guenther
2009-02-27 23:00 ` Ian Lance Taylor

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=alpine.LNX.2.00.0902271112160.11836@zhemvz.fhfr.qr \
    --to=rguenther@suse.de \
    --cc=gcc@gcc.gnu.org \
    --cc=rakdver@kam.mff.cuni.cz \
    /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).