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: Ping: [PATCH] Limit precision of *bitsizetypes types


On Sat, 18 Nov 2006, John David Anglin wrote:
> Small patch to stor-layout.c:
> <http://gcc.gnu.org/ml/gcc-patches/2006-10/msg01522.html>.

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

Perhaps:

	precision = MIN (precision, MAX_FIXED_MODE_SIZE);

or

	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.

Roger
--


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