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: Move local_set and cond_local_set out of struct basic_block_def


On Sun, 2004-11-07 at 02:22 +0100, Steven Bosscher wrote:
> Hi,
> 
> These two regsets are only used in flow.c, so there is no valid reason
> to spoil two pointers on every basic block for them.
> 
> Bootstrapped and tested on i686-pc-linux-gnu.  The patch has no effect
> on compile time.
> 
> OK?
> 
> Gr.
> Steven
> 
> 	* basic-block.h (XMALLOC_REG_SET, XFREE_REG_SET): New.
> 	(struct basic_block_def): Remove local_set and cond_local_set
> 	fields.  Update comment for global_live_at_start.
> 	* flow.c (calculate_global_regs_live): Allocate local_sets and
> 	cond_local_sets here as arrays of bitmaps previously stored in
> 	bb->local_set and bb->cond_local_set.  Use xmalloc instead of
> 	obstack allocated bitmaps.
Rather than the magic "+ 2" to account for EXIT_BLOCK and ENTRY_BLOCK,
I'd rather see us use "(INVALID_BLOCK + 1)".  Hopefully we won't ever
need some other magic block, but if we do, the fewer magic "+2" 
instances we have, the better.

Consider it pre-approved with that trivial change.

jeff



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