This is the mail archive of the
mailing list for the GCC project.
Re: Ping: [PATCH] Limit precision of *bitsizetypes types
- From: Roger Sayle <roger at eyesopen dot com>
- To: John David Anglin <dave at hiauly1 dot hia dot nrc dot ca>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sat, 18 Nov 2006 13:26:53 -0700 (MST)
- Subject: Re: Ping: [PATCH] Limit precision of *bitsizetypes types
On Sat, 18 Nov 2006, John David Anglin wrote:
> Small patch to stor-layout.c:
Sorry for the delay. This is OK for mainline.
Thanks for fixing this.
Do you have any opinions on the use of nested MIN/MAX macros? Whilst
as long as the arguments are side-effect free, we'll produce valid code,
it may result in significant (temporary) code duplication caused by
precision = MIN (precision, MAX_FIXED_MODE_SIZE);
if (precision > MAX_FIXED_MODE_SIZE)
precision = MAX_FIXED_MODE_SIZE;
which I think might be easier to read for some people, and may be easier
for the compiler to recognize as a pair on MIN_EXPRs. Or perhaps
reassociate to use "MIN (MAX_FIXED_MODE_SIZE, 2 * HOST_BITS_PER_WIDE_INT)"
which should be a compile-time constant?
Oh, I don't know. The code is perfectly fine as it is. I suspect I'm
beginning to view things far too much from fold's perspective, and such
micro-optimizations are meaningless to the GCC big picture.
Ok for mainline.