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] Remove BITS_PER_UNIT_LOG


On 07/27/2016 01:38 PM, Bernd Edlinger wrote:
Hi!

I've noticed that there are two defines for log2 of BITS_PER_UNIT:
BITS_PER_UNIT_LOG and LOG2_BITS_PER_UNIT.
At least this wheel was apparently invented more than once :)

Thus I'd say the most simple wheel will do for us as well.

This patch removes BITS_PER_UNIT_LOG as this is
less often used, and moves LOG2_BITS_PER_UNIT
to tree.h because default.h is obviously not always included
before tree.h.


Bootstrap and reg-test on x86_64-pc-linux-gnu.
Is it OK for trunk?


Thanks
Bernd.


patch-unit-size.diff


gcc:
2016-07-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>

	* defaults.h (LOG2_BITS_PER_UNIT): Move from here...
	* tree.h (LOG2_BITS_PER_UNIT): ...to here.
	(BITS_PER_UNIT_LOG): Remove.
	(int_bit_position): Use LOG2_BITS_PER_UNIT instead of BITS_PER_UNIT_LOG.
	* expr.c (expand_assignment): Likewise.
	* stor-layout.c (initialize_sizetypes): Likewise.

c-family:
2016-07-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>

	* c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
	BITS_PER_UNIT_LOG.
OK.
jeff


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