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


On 10/15/07, Richard Kenner <kenner@vlsi1.ultra.nyu.edu> wrote:
> > I don't see a reason that sizetype has to match size_t.
>
> I'm not sure I correctly remember what the original reason for that
> is, but the one that I'm aware of is this: it can't be smaller than
> size_t because then you can't represent all sizes that are valid in
> the language (which is what the range of size_t is supposed to mean).
> But if it's larger than size_t, you are doing run-time calculations in
> a wider mode and that's (usually) less efficient.  Since it can't be
> smaller and shouldn't be wider, it has to be the same size.

As we use sizetype for offsets of pointers choosing the size of pointers
as the size of sizetypes would make sense for the middle-end.  If that
happens to be the precision of size_t, fine.  I still don't see the connection
to the signedness of sizetype though.

Richard.


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