public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <iant@google.com>
To: "Richard Guenther" <richard.guenther@gmail.com>
Cc: "Eric Botcazou" <ebotcazou@adacore.com>,
	        "Richard Kenner" <kenner@vlsi1.ultra.nyu.edu>,
	gcc-patches@gcc.gnu.org,         mark@codesourcery.com,
	matz@suse.de
Subject: Re: [PATCH] Fix optimization regression in constant folder
Date: Sun, 14 Oct 2007 16:07:00 -0000	[thread overview]
Message-ID: <m3bqb1r972.fsf@localhost.localdomain> (raw)
In-Reply-To: <84fc9c000710140331t5b1bf94cr3a19b395c19faa22@mail.gmail.com>

"Richard Guenther" <richard.guenther@gmail.com> writes:

> On 10/14/07, Eric Botcazou <ebotcazou@adacore.com> wrote:
> > > The flags aren't fixed in stone.  In fact, I just introduced them
> > > earlier this year.  So all this tells me is that we need to change the
> > > flags.  I already proposed such a change
> > > (http://gcc.gnu.org/ml/gcc-patches/2007-10/msg00053.html).  Nobody has
> > > yet explained why my proposal wouldn't work.
> >
> > From my point of view, your proposal (TYPE_IGNORE_OVERFLOWS +
> > TYPE_OVERFLOW_WRAPS) is OK.
> 
> I don't want to have TYPE_IGNORE_OVERFLOWS.  Matters are complicated
> enough already.  I also like you to revisit the decision to make Ada sizetype
> signed.  If there are optimization regressions for expressions created by
> stor-layout.c solve them there, as that is the place where enough knowledge
> about the involved magnitudes is available.

The point of TYPE_IGNORE_OVERFLOWS is not for signed vs. unsigned, but
is rather to permit retaining the optimization currently done for
TYPE_IS_SIZE_TYPE in extract_muldiv_1.

	 If we have an unsigned type that is not a sizetype, we cannot do
	 this since it will change the result if the original computation
	 overflowed.

We don't want to set TYPE_OVERFLOW_UNDEFINED for sizetypes, because we
want to overflow to wrap, and in particular because we want to permit
reassociation.  We need some way to indicate that this type does not
overflow.

Ian

  parent reply	other threads:[~2007-10-14 15:46 UTC|newest]

Thread overview: 140+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-17 14:35 Eric Botcazou
2007-09-17 14:45 ` Richard Guenther
2007-09-17 14:56   ` Eric Botcazou
2007-09-17 15:13     ` Richard Guenther
2007-09-18 11:12       ` Eric Botcazou
2007-09-18 11:22         ` Richard Guenther
2007-09-18 13:17           ` Richard Kenner
2007-09-19 11:33           ` Eric Botcazou
2007-09-19 14:40             ` Richard Guenther
2007-09-19 14:50               ` Richard Kenner
2007-09-19 15:50               ` Eric Botcazou
2007-09-29 10:27               ` Eric Botcazou
2007-09-29 14:59                 ` Richard Guenther
2007-09-29 15:12                   ` Eric Botcazou
2007-09-29 15:38                     ` Richard Guenther
2007-09-29 17:46                       ` Richard Guenther
2007-09-29 18:43                         ` Eric Botcazou
2007-09-29 20:52                           ` Richard Guenther
2007-09-30 14:38                             ` Eric Botcazou
2007-09-30 16:01                               ` Eric Botcazou
2007-09-30 16:03                               ` Richard Guenther
2007-09-30 16:36                                 ` Eric Botcazou
2007-09-30 17:37                                   ` Richard Guenther
2007-09-30 18:53                                     ` Eric Botcazou
2007-09-30 17:59                                   ` Richard Kenner
2007-09-30 18:38                                     ` Richard Guenther
2007-09-30 21:16                                       ` Richard Kenner
2007-09-30 22:10                                       ` Eric Botcazou
     [not found]                                   ` <m3r6kf3gyx.fsf@localhost.localdomain>
     [not found]                                     ` <200710010127.59677.ebotcazou@adacore.com>
2007-10-01  0:10                                       ` Ian Lance Taylor
2007-10-01  0:51                                         ` Richard Kenner
2007-10-01  1:54                                           ` Michael Matz
2007-10-01  2:53                                             ` Richard Kenner
2007-10-01  3:25                                               ` Michael Matz
2007-10-01  3:40                                                 ` Richard Kenner
2007-10-01  9:12                                                   ` Richard Guenther
2007-10-01 12:29                                                     ` Richard Kenner
2007-10-01 12:40                                                       ` Richard Guenther
2007-10-01 13:07                                                         ` Eric Botcazou
2007-10-01 13:15                                                         ` Richard Kenner
2007-10-01 14:15                                                           ` Richard Guenther
2007-10-01 14:23                                                             ` Richard Kenner
2007-10-01 14:29                                                               ` Richard Guenther
2007-10-01 14:35                                                                 ` Richard Kenner
2007-10-01 17:51                                                           ` Ian Lance Taylor
2007-10-01 19:32                                                             ` Richard Kenner
2007-10-01 19:51                                                               ` Ian Lance Taylor
2007-10-01 20:28                                                                 ` Richard Kenner
2007-10-02 13:58                                                                   ` Michael Matz
2007-10-03  6:41                                                             ` Eric Botcazou
2007-10-03  7:00                                                               ` Ian Lance Taylor
2007-10-03  7:10                                                                 ` Eric Botcazou
2007-10-03 14:18                                                                   ` Ian Lance Taylor
2007-10-03 15:53                                                                     ` Eric Botcazou
2007-10-04  5:20                                                                       ` Michael Matz
2007-10-10 17:31                                                   ` Mark Mitchell
2007-10-10 22:43                                                     ` Richard Kenner
2007-10-11  0:40                                                       ` Mark Mitchell
2007-10-11  1:02                                                         ` Richard Kenner
2007-10-11 15:06                                                     ` Michael Matz
2007-10-11 15:10                                                       ` Richard Guenther
2007-10-11 15:55                                                         ` Michael Matz
2007-10-11 15:57                                                           ` Richard Guenther
2007-10-11 16:02                                                             ` Richard Kenner
2007-10-11 15:59                                                           ` Richard Kenner
2007-10-11 16:02                                                             ` Richard Guenther
2007-10-11 16:08                                                               ` Richard Kenner
2007-10-11 16:14                                                                 ` Richard Guenther
2007-10-11 16:37                                                                   ` Richard Kenner
2007-10-11 16:44                                                                     ` Richard Guenther
2007-10-11 16:50                                                                       ` Richard Kenner
2007-10-11 15:32                                                       ` Richard Kenner
2007-10-11 16:03                                                         ` Michael Matz
2007-10-11 16:06                                                           ` Richard Guenther
2007-10-11 16:19                                                             ` Richard Kenner
2007-10-11 16:25                                                             ` Michael Matz
2007-10-11 16:12                                                           ` Richard Kenner
2007-10-11 16:38                                                             ` Michael Matz
2007-10-11 16:47                                                               ` Richard Kenner
2007-10-11 17:04                                                                 ` Michael Matz
2007-10-11 17:17                                                                   ` Ian Lance Taylor
2007-10-11 18:41                                                                     ` Michael Matz
     [not found]                                                                       ` <10710111850.AA27 912@vlsi1.ultra.nyu.edu>
     [not found]                                                                       ` <10710111850.AA27       912@vlsi1.ultra.nyu.edu>
     [not found]                                                                       ` <10710111850.AA27        912@vlsi1.ultra.nyu.edu>
     [not found]                                                                       ` <10710111850.AA27      912@vlsi1.ultra.nyu.edu>
     [not found]                                                                       ` <10710111850.AA27    912@vlsi1.ultra.nyu.edu>
     [not found]                                                                       ` <10710111850.AA27           912@vlsi1.ultra.nyu.edu>
2007-10-11 18:45                                                                       ` Richard Kenner
2007-10-11 19:10                                                                         ` Michael Matz
2007-10-11 19:17                                                                           ` Richard Kenner
2007-10-11 19:30                                                                             ` Michael Matz
2007-10-11 20:06                                                                               ` Richard Kenner
2007-10-11 21:24                                                                             ` Ian Lance Taylor
2007-10-12  2:36                                                                               ` Richard Kenner
2007-10-12  4:40                                                                                 ` Ian Lance Taylor
2007-10-12  4:56                                                                                   ` Mark Mitchell
2007-10-12 12:30                                                                                     ` Richard Kenner
2007-10-12 17:48                                                                                       ` Mark Mitchell
2007-10-12 18:08                                                                                         ` Richard Kenner
2007-10-12 18:37                                                                                           ` Mark Mitchell
2007-10-12 18:51                                                                                             ` Richard Kenner
2007-10-12 20:13                                                                                             ` Richard Guenther
2007-10-14 11:09                                                                                         ` Eric Botcazou
2007-10-12 11:42                                                                                   ` Richard Kenner
2007-10-14 10:31                                                                                   ` Eric Botcazou
2007-10-14 11:24                                                                                     ` Richard Guenther
2007-10-14 11:58                                                                                       ` Eric Botcazou
2007-10-14 12:16                                                                                       ` Richard Kenner
2007-10-14 13:29                                                                                         ` Richard Guenther
2007-10-15  2:12                                                                                           ` Richard Kenner
2007-10-15  7:33                                                                                             ` Michael Matz
2007-10-15 11:36                                                                                               ` Richard Kenner
2007-10-15 13:27                                                                                                 ` Richard Guenther
2007-10-15 13:28                                                                                                   ` Richard Kenner
2007-10-14 16:07                                                                                       ` Ian Lance Taylor [this message]
2007-10-14 16:27                                                                                         ` Richard Guenther
2007-10-15  3:26                                                                                           ` Richard Kenner
2007-10-15  9:12                                                                                             ` Richard Guenther
2007-10-15 11:41                                                                                               ` Richard Kenner
2007-10-15 13:15                                                                                                 ` Richard Guenther
2007-10-15 13:17                                                                                                   ` Richard Kenner
2007-10-15  3:29                                                                                           ` Richard Kenner
2007-10-15  2:17                                                                                         ` Richard Kenner
2007-10-15  5:21                                                                                           ` Ian Lance Taylor
2007-10-15 11:01                                                                                             ` Richard Kenner
2007-10-11 17:21                                                                   ` Richard Kenner
2007-10-11 16:16                                                           ` Richard Kenner
2007-10-11 16:51                                                             ` Michael Matz
2007-10-11 16:57                                                               ` Richard Kenner
2007-10-11 17:06                                                                 ` Richard Guenther
2007-10-11 17:24                                                                   ` Richard Kenner
2007-10-11 17:31                                                                 ` Michael Matz
2007-10-11 17:54                                                                   ` Richard Kenner
2007-10-12  8:20                                                                     ` Richard Guenther
2007-10-12 11:47                                                                       ` Paolo Bonzini
2007-10-12 12:44                                                                       ` Richard Kenner
2007-10-12 12:49                                                                         ` Richard Guenther
2007-10-11 15:57                                                       ` Mark Mitchell
2007-10-11 16:01                                                         ` Richard Kenner
2007-10-11 16:03                                                           ` Richard Guenther
2007-10-11 16:16                                                             ` Richard Kenner
2007-10-11 16:11                                                           ` Mark Mitchell
2007-10-11 16:29                                                             ` Richard Kenner
2007-10-01  6:07                                                 ` Eric Botcazou
2007-10-01  6:07                                         ` Eric Botcazou
2007-10-01  8:58                                     ` 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=m3bqb1r972.fsf@localhost.localdomain \
    --to=iant@google.com \
    --cc=ebotcazou@adacore.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=kenner@vlsi1.ultra.nyu.edu \
    --cc=mark@codesourcery.com \
    --cc=matz@suse.de \
    --cc=richard.guenther@gmail.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).