This is the mail archive of the
mailing list for the GCC project.
Re: Move local_set and cond_local_set out of struct basic_block_def
- From: Jeffrey A Law <law at redhat dot com>
- To: Steven Bosscher <stevenb at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org, Kazu Hirata <kazu at cs dot umass dot edu>
- Date: Tue, 09 Nov 2004 09:55:29 -0700
- Subject: Re: Move local_set and cond_local_set out of struct basic_block_def
- Organization: Red Hat, Inc
- References: <email@example.com>
- Reply-to: law at redhat dot com
On Sun, 2004-11-07 at 02:22 +0100, Steven Bosscher wrote:
> 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.
> * 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.