This is the mail archive of the gcc-patches@gcc.gnu.org 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


> 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.


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