+2004-11-25 Nathan Sidwell <nathan@codesourcery.com>
+
+ * basic-block.h (OBSTACK_ALLOC_REG_SET): Rename to ...
+ (ALLOC_REG_SET): ... here.
+ (FREE_REG_SET): Adjust.
+ (XMALLOC_REG_SET, XFREE_REG_SET): Remove.
+ * bb-reorder.c (fix_crossing_conditional_branches): Adjust.
+ * cfglayout.c (cfg_layout_duplicate_bb): Adjust.
+ * cfgrtl.c (rtl_split_block, rtl_split_edge,
+ safe_insert_insn_on_edge, cfg_layout_split_edge): Adjust.
+ * flow.c (update_life_info, calculate_global_regs_live,
+ allocate_bb_life_data, init_propagate_block_info): Adjust.
+ * global.c (build_insn_chain): Adjust.
+ * ifcvt.c (dead_or_predicable): Adjust.
+ * loop-iv.c (simplify_using_initial_values): Adjust.
+ * recog.c (peephole2_optimize): Adjust.
+ * sched-deps.c (init_deps_global): Adjust.
+
2004-11-25 Ralf Corsepius <ralf.corsepius@rtems.org>
* config.gcc (avr-*-rtems*): Fix typo.
/* A pointer to a regset_head. */
typedef bitmap regset;
+/* Allocate a register set with oballoc. */
+#define ALLOC_REG_SET(OBSTACK) BITMAP_OBSTACK_ALLOC (OBSTACK)
+
+/* Do any cleanup needed on a regset when it is no longer used. */
+#define FREE_REG_SET(REGSET) BITMAP_OBSTACK_FREE (REGSET)
+
/* Initialize a new regset. */
#define INIT_REG_SET(HEAD) bitmap_initialize (HEAD, ®_obstack)
#define EXECUTE_IF_AND_IN_REG_SET(REGSET1, REGSET2, MIN, REGNUM, RSI) \
EXECUTE_IF_AND_IN_BITMAP (REGSET1, REGSET2, MIN, REGNUM, RSI) \
-/* Allocate a register set with oballoc. */
-#define OBSTACK_ALLOC_REG_SET(OBSTACK) BITMAP_OBSTACK_ALLOC (OBSTACK)
-
-/* Do any cleanup needed on a regset when it is no longer used. */
-#define FREE_REG_SET(REGSET) BITMAP_OBSTACK_FREE(REGSET)
-
-/* Allocate a register set with xmalloc. */
-#define XMALLOC_REG_SET() BITMAP_XMALLOC ()
-
-/* Free a register set. */
-#define XFREE_REG_SET(REGSET) BITMAP_XFREE (REGSET)
-
/* Type we use to hold basic block counters. Should be at least
64bit. Although a counter cannot be negative, we use a signed
type, because erroneous negative counts can be generated when the
/* Update register liveness information. */
- new_bb->global_live_at_start =
- OBSTACK_ALLOC_REG_SET (®_obstack);
- new_bb->global_live_at_end =
- OBSTACK_ALLOC_REG_SET (®_obstack);
+ new_bb->global_live_at_start = ALLOC_REG_SET (®_obstack);
+ new_bb->global_live_at_end = ALLOC_REG_SET (®_obstack);
COPY_REG_SET (new_bb->global_live_at_end,
prev_bb->global_live_at_end);
COPY_REG_SET (new_bb->global_live_at_start,
if (bb->global_live_at_start)
{
- new_bb->global_live_at_start = OBSTACK_ALLOC_REG_SET (®_obstack);
- new_bb->global_live_at_end = OBSTACK_ALLOC_REG_SET (®_obstack);
+ new_bb->global_live_at_start = ALLOC_REG_SET (®_obstack);
+ new_bb->global_live_at_end = ALLOC_REG_SET (®_obstack);
COPY_REG_SET (new_bb->global_live_at_start, bb->global_live_at_start);
COPY_REG_SET (new_bb->global_live_at_end, bb->global_live_at_end);
}
if (bb->global_live_at_start)
{
- new_bb->global_live_at_start = OBSTACK_ALLOC_REG_SET (®_obstack);
- new_bb->global_live_at_end = OBSTACK_ALLOC_REG_SET (®_obstack);
+ new_bb->global_live_at_start = ALLOC_REG_SET (®_obstack);
+ new_bb->global_live_at_end = ALLOC_REG_SET (®_obstack);
COPY_REG_SET (new_bb->global_live_at_end, bb->global_live_at_end);
/* We now have to calculate which registers are live at the end
if (target->global_live_at_start)
{
- jump_block->global_live_at_start
- = OBSTACK_ALLOC_REG_SET (®_obstack);
- jump_block->global_live_at_end
- = OBSTACK_ALLOC_REG_SET (®_obstack);
+ jump_block->global_live_at_start = ALLOC_REG_SET (®_obstack);
+ jump_block->global_live_at_end = ALLOC_REG_SET (®_obstack);
COPY_REG_SET (jump_block->global_live_at_start,
target->global_live_at_start);
COPY_REG_SET (jump_block->global_live_at_end,
/* ??? This info is likely going to be out of date very soon. */
if (edge_in->dest->global_live_at_start)
{
- bb->global_live_at_start = OBSTACK_ALLOC_REG_SET (®_obstack);
- bb->global_live_at_end = OBSTACK_ALLOC_REG_SET (®_obstack);
+ bb->global_live_at_start = ALLOC_REG_SET (®_obstack);
+ bb->global_live_at_end = ALLOC_REG_SET (®_obstack);
COPY_REG_SET (bb->global_live_at_start,
edge_in->dest->global_live_at_start);
COPY_REG_SET (bb->global_live_at_end,
noccmode = false;
#endif
- killed = OBSTACK_ALLOC_REG_SET (®_obstack);
+ killed = ALLOC_REG_SET (®_obstack);
for (x = insn; x; x = NEXT_INSN (x))
if (INSN_P (x))
create it to avoid getting an ICE later. */
if (e->dest->global_live_at_start)
{
- new_bb->global_live_at_start = OBSTACK_ALLOC_REG_SET (®_obstack);
- new_bb->global_live_at_end = OBSTACK_ALLOC_REG_SET (®_obstack);
+ new_bb->global_live_at_start = ALLOC_REG_SET (®_obstack);
+ new_bb->global_live_at_end = ALLOC_REG_SET (®_obstack);
COPY_REG_SET (new_bb->global_live_at_start,
e->dest->global_live_at_start);
COPY_REG_SET (new_bb->global_live_at_end,
int stabilized_prop_flags = prop_flags;
basic_block bb;
- tmp = OBSTACK_ALLOC_REG_SET (®_obstack);
+ tmp = ALLOC_REG_SET (®_obstack);
ndead = 0;
if ((prop_flags & PROP_REG_INFO) && !reg_deaths)
gcc_assert (!bb->aux);
#endif
- tmp = OBSTACK_ALLOC_REG_SET (®_obstack);
- new_live_at_end = OBSTACK_ALLOC_REG_SET (®_obstack);
- invalidated_by_call = OBSTACK_ALLOC_REG_SET (®_obstack);
+ tmp = ALLOC_REG_SET (®_obstack);
+ new_live_at_end = ALLOC_REG_SET (®_obstack);
+ invalidated_by_call = ALLOC_REG_SET (®_obstack);
/* Inconveniently, this is only readily available in hard reg set form. */
for (i = 0; i < FIRST_PSEUDO_REGISTER; ++i)
if (local_sets[bb->index - (INVALID_BLOCK + 1)] == NULL)
{
- local_sets[bb->index - (INVALID_BLOCK + 1)] = XMALLOC_REG_SET ();
- cond_local_sets[bb->index - (INVALID_BLOCK + 1)] = XMALLOC_REG_SET ();
+ local_sets[bb->index - (INVALID_BLOCK + 1)]
+ = ALLOC_REG_SET (®_obstack);
+ cond_local_sets[bb->index - (INVALID_BLOCK + 1)]
+ = ALLOC_REG_SET (®_obstack);
rescan = 1;
}
else
EXECUTE_IF_SET_IN_SBITMAP (blocks_out, 0, i,
{
basic_block bb = BASIC_BLOCK (i);
- XFREE_REG_SET (local_sets[bb->index - (INVALID_BLOCK + 1)]);
- XFREE_REG_SET (cond_local_sets[bb->index - (INVALID_BLOCK + 1)]);
+ FREE_REG_SET (local_sets[bb->index - (INVALID_BLOCK + 1)]);
+ FREE_REG_SET (cond_local_sets[bb->index - (INVALID_BLOCK + 1)]);
});
}
else
{
FOR_EACH_BB (bb)
{
- XFREE_REG_SET (local_sets[bb->index - (INVALID_BLOCK + 1)]);
- XFREE_REG_SET (cond_local_sets[bb->index - (INVALID_BLOCK + 1)]);
+ FREE_REG_SET (local_sets[bb->index - (INVALID_BLOCK + 1)]);
+ FREE_REG_SET (cond_local_sets[bb->index - (INVALID_BLOCK + 1)]);
}
}
FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb)
{
- bb->global_live_at_start = OBSTACK_ALLOC_REG_SET (®_obstack);
- bb->global_live_at_end = OBSTACK_ALLOC_REG_SET (®_obstack);
+ bb->global_live_at_start = ALLOC_REG_SET (®_obstack);
+ bb->global_live_at_end = ALLOC_REG_SET (®_obstack);
}
- regs_live_at_setjmp = OBSTACK_ALLOC_REG_SET (®_obstack);
+ regs_live_at_setjmp = ALLOC_REG_SET (®_obstack);
}
void
if (JUMP_P (BB_END (bb))
&& any_condjump_p (BB_END (bb)))
{
- regset diff = OBSTACK_ALLOC_REG_SET (®_obstack);
+ regset diff = ALLOC_REG_SET (®_obstack);
basic_block bb_true, bb_false;
unsigned i;
struct insn_chain *prev = 0;
basic_block b = ENTRY_BLOCK_PTR->next_bb;
- live_relevant_regs = OBSTACK_ALLOC_REG_SET (®_obstack);
+ live_relevant_regs = ALLOC_REG_SET (®_obstack);
for (; first; first = NEXT_INSN (first))
{
TEST_SET = set of registers set between EARLIEST and the
end of the block. */
- tmp = OBSTACK_ALLOC_REG_SET (®_obstack);
- merge_set = OBSTACK_ALLOC_REG_SET (®_obstack);
- test_live = OBSTACK_ALLOC_REG_SET (®_obstack);
- test_set = OBSTACK_ALLOC_REG_SET (®_obstack);
+ tmp = ALLOC_REG_SET (®_obstack);
+ merge_set = ALLOC_REG_SET (®_obstack);
+ test_live = ALLOC_REG_SET (®_obstack);
+ test_set = ALLOC_REG_SET (®_obstack);
/* ??? bb->local_set is only valid during calculate_global_regs_live,
so we must recompute usage for MERGE_BB. Not so bad, I suppose,
if (e->src == ENTRY_BLOCK_PTR)
return;
- altered = OBSTACK_ALLOC_REG_SET (®_obstack);
+ altered = ALLOC_REG_SET (®_obstack);
while (1)
{
/* Initialize the regsets we're going to use. */
for (i = 0; i < MAX_INSNS_PER_PEEP2 + 1; ++i)
- peep2_insn_data[i].live_before = OBSTACK_ALLOC_REG_SET (®_obstack);
- live = OBSTACK_ALLOC_REG_SET (®_obstack);
+ peep2_insn_data[i].live_before = ALLOC_REG_SET (®_obstack);
+ live = ALLOC_REG_SET (®_obstack);
#ifdef HAVE_conditional_execution
blocks = sbitmap_alloc (last_basic_block);
void
init_deps_global (void)
{
- reg_pending_sets = OBSTACK_ALLOC_REG_SET (®_obstack);
- reg_pending_clobbers = OBSTACK_ALLOC_REG_SET (®_obstack);
- reg_pending_uses = OBSTACK_ALLOC_REG_SET (®_obstack);
+ reg_pending_sets = ALLOC_REG_SET (®_obstack);
+ reg_pending_clobbers = ALLOC_REG_SET (®_obstack);
+ reg_pending_uses = ALLOC_REG_SET (®_obstack);
reg_pending_barrier = NOT_A_BARRIER;
}