This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix optimization regression in constant folder
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: iant at google dot com
- Cc: ebotcazou at adacore dot com, gcc-patches at gcc dot gnu dot org, richard dot guenther at gmail dot com
- Date: Sun, 30 Sep 2007 20:56:13 EDT
- Subject: Re: [PATCH] Fix optimization regression in constant folder
- References: <firstname.lastname@example.org> <email@example.com> <firstname.lastname@example.org> <email@example.com> <firstname.lastname@example.org>
> Right. A type can be neither. But you were asking for sizetypes to
> be both, and that does not make sense.
No, the claim is that a sizetype can *act like* both and that's different.
In other words, when we say a type has undefined overflow, we need to be
careful to not do operations that could create an overflow when one
couldn't previously have occurred. But those sorts of pathalogical cases
can't occur for sizetypes because all operations on them are generated
by the compiler, not explicitly by the programmer, and we know we're not
generating the pathalogical cases.
So we want to allow *all* optimizations on such types.
You can't capture that concept with flags that talk about language-defined
concepts such as undefined overflows or wrapping because sizetypes are
*not* language-defined but internal.