This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix optimization regression in constant folder

"Richard Guenther" <> writes:

> On 10/14/07, Eric Botcazou <> 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
> > > (  Nobody has
> > > yet explained why my proposal wouldn't work.
> >
> > From my point of view, your proposal (TYPE_IGNORE_OVERFLOWS +
> 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

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]