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]

Reg sets cleanup



Hi folks,

The purpose of this patch is to decouple regsets from bitmaps.  As
well as improving the encapsulation this will simplify the task of
using other bitmap implementations for these regsets.

With this patch I've moved the macros dealing with regsets into their
own file regset.h and have renamed most of the macro names to be
consistent.  For example, AND_REG_SET has become REG_SET_AND2 since it
has two operands.  I have also added a three operand version REG_SET_AND,
trying to keep the same naming as used in bitmap.h and sbitmap.h.

I did not rename CLEAR_REGNO_REG_SET, SET_REGNO_REG_SET, and
REGNO_REG_SET_P to keep the patch manageable, although they are on my
hit list once I can decide what they should be called.

With regards to the naming, I kept the REG_SET name although I'd
prefer REGSET since it is probably more consistent with bitset,
bitmap, sbitmap used elsewhere in the sources.

In the process, I axed some macros EXECUTE_IF_AND_COMPL_IN_REG_SET and
EXECUTE_IF_AND_IN_REG_SET that weren't used and are harder to
implement for other types of bitmaps.  INIT_ONCE_REG_SET and
MAX_REGNO_REG_SET also did nothing and paid the price as well.


2001-12-25  Michael Hayes  <m.hayes@elec.canterbury.ac.nz>

	* Makefile.in (BASIC_BLOCK_H): Add regset.h dependency.
	* regset.h: New file.
	(REG_SET_IOR, REG_SET_XOR, REG_SET_AND, REG_SET_AND_COMPL): Add macros.
	(REG_SET_XMALLOC, REG_SET_XFREE, REG_SET_RELEASE_MEMORY): Likewise.
	* basic.block.h (INIT_REG_SET): Rename to REG_SET_INIT and move
	to regset.h.
	(CLEAR_REG_SET, COPY_REG_SET, INITIALIZE_REG_SET, FREE_REG_SET): Rename
	to REG_SET_XXX and move to regset.h
	(OBSTACK_ALLOC_REG_SET): Likewise.
	(AND_REG_SET): Rename to REG_SET_AND2 and move to regset.h.
	(IOR_REG_SET, XOR_REG_SET): Likewise.
	(REG_SET_EQUAL_P, REG_SET_TO_HARD_REG_SET): Move to regset.h.
	(EXECUTE_IF_SET_IN_REG_SET): Likewise.
	(CLEAR_REGNO_REG_SET, SET_REGNO_REG_SET, REGNO_REG_SET_P): Likewise.
	(IOR_AND_COMPL_REG_SET): Rename to REG_SET_IOR_AND_COMPL3 and move
	to regset.h.
	(EXECUTE_IF_AND_COMPL_IN_REG_SET): Delete.
	(EXECUTE_IF_AND_IN_REG_SET): Delete.
	(INIT_ONCE_REG_SET, MAX_REGNO_REG_SET) Delete.
	* regclass.c (INIT_ONCE_REG_SET, MAX_REGNO_REG_SET) Remove uses.
	* caller-save.c: Rename REG_SET_XXX macros.
	* cfgcleanup.c, cfgrtl.c, conflict.c, cse.c, flow.c: Likewise.
	* gcse.c, global.c, ifcvt.c, local-alloc.c, loop.c, recog.c: Likewise.
	regclass.c, reload.h, reload1.c, sched-deps.c, sched-ebb.c:  Likewise.
	* sched-rgn.c, ssa-dce.c, ssa.c:  Likewise.
	* cfgcleanup.c (mark_effect): Replace bitmap with regset.
	Replace BITMAP_XMALLOC and BITMAP_XFREE with REG_SET_XMALLOC and
	REG_SET_XFREE.
	* gcse.c, ifcvt.c, ssas-dce.c: Likewise.
	* flow.c: Replace uses of bitmap_operation with REG_SET_XXX.
	* sched-ebb.c: Likewise.
	

Attachment: regset.patch.gz
Description: Binary data


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