aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2004-11-25 09:30:04 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2004-11-25 09:30:04 +0000
commit04389919a6dbcb904c04ad910b4da49ff52d5d00 (patch)
tree19da8d45d735bf932467e92c989a251abed7bb43
parenteb9744a7a65b4de6444f152a7e3475ae0b665c75 (diff)
downloadgcc-04389919a6dbcb904c04ad910b4da49ff52d5d00.zip
gcc-04389919a6dbcb904c04ad910b4da49ff52d5d00.tar.gz
gcc-04389919a6dbcb904c04ad910b4da49ff52d5d00.tar.bz2
basic-block.h (OBSTACK_ALLOC_REG_SET): Rename to ...
* 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. From-SVN: r91279
-rw-r--r--gcc/ChangeLog18
-rw-r--r--gcc/basic-block.h18
-rw-r--r--gcc/bb-reorder.c6
-rw-r--r--gcc/cfglayout.c4
-rw-r--r--gcc/cfgrtl.c20
-rw-r--r--gcc/flow.c30
-rw-r--r--gcc/global.c2
-rw-r--r--gcc/ifcvt.c8
-rw-r--r--gcc/loop-iv.c2
-rw-r--r--gcc/recog.c4
-rw-r--r--gcc/sched-deps.c6
11 files changed, 64 insertions, 54 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f43eb1f..fae4a9d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,21 @@
+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.
diff --git a/gcc/basic-block.h b/gcc/basic-block.h
index 614dc88..277888b 100644
--- a/gcc/basic-block.h
+++ b/gcc/basic-block.h
@@ -37,6 +37,12 @@ typedef bitmap_head regset_head;
/* 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, &reg_obstack)
@@ -101,18 +107,6 @@ typedef bitmap_iterator reg_set_iterator;
#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
diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c
index 7572e52..603f921 100644
--- a/gcc/bb-reorder.c
+++ b/gcc/bb-reorder.c
@@ -1690,10 +1690,8 @@ fix_crossing_conditional_branches (void)
/* Update register liveness information. */
- new_bb->global_live_at_start =
- OBSTACK_ALLOC_REG_SET (&reg_obstack);
- new_bb->global_live_at_end =
- OBSTACK_ALLOC_REG_SET (&reg_obstack);
+ new_bb->global_live_at_start = ALLOC_REG_SET (&reg_obstack);
+ new_bb->global_live_at_end = ALLOC_REG_SET (&reg_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,
diff --git a/gcc/cfglayout.c b/gcc/cfglayout.c
index 287a139..f680eee 100644
--- a/gcc/cfglayout.c
+++ b/gcc/cfglayout.c
@@ -1116,8 +1116,8 @@ cfg_layout_duplicate_bb (basic_block bb)
if (bb->global_live_at_start)
{
- new_bb->global_live_at_start = OBSTACK_ALLOC_REG_SET (&reg_obstack);
- new_bb->global_live_at_end = OBSTACK_ALLOC_REG_SET (&reg_obstack);
+ new_bb->global_live_at_start = ALLOC_REG_SET (&reg_obstack);
+ new_bb->global_live_at_end = ALLOC_REG_SET (&reg_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);
}
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c
index 3c2dc96..4e0fc4c 100644
--- a/gcc/cfgrtl.c
+++ b/gcc/cfgrtl.c
@@ -484,8 +484,8 @@ rtl_split_block (basic_block bb, void *insnp)
if (bb->global_live_at_start)
{
- new_bb->global_live_at_start = OBSTACK_ALLOC_REG_SET (&reg_obstack);
- new_bb->global_live_at_end = OBSTACK_ALLOC_REG_SET (&reg_obstack);
+ new_bb->global_live_at_start = ALLOC_REG_SET (&reg_obstack);
+ new_bb->global_live_at_end = ALLOC_REG_SET (&reg_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
@@ -1089,10 +1089,8 @@ force_nonfallthru_and_redirect (edge e, basic_block target)
if (target->global_live_at_start)
{
- jump_block->global_live_at_start
- = OBSTACK_ALLOC_REG_SET (&reg_obstack);
- jump_block->global_live_at_end
- = OBSTACK_ALLOC_REG_SET (&reg_obstack);
+ jump_block->global_live_at_start = ALLOC_REG_SET (&reg_obstack);
+ jump_block->global_live_at_end = ALLOC_REG_SET (&reg_obstack);
COPY_REG_SET (jump_block->global_live_at_start,
target->global_live_at_start);
COPY_REG_SET (jump_block->global_live_at_end,
@@ -1378,8 +1376,8 @@ rtl_split_edge (edge edge_in)
/* ??? 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 (&reg_obstack);
- bb->global_live_at_end = OBSTACK_ALLOC_REG_SET (&reg_obstack);
+ bb->global_live_at_start = ALLOC_REG_SET (&reg_obstack);
+ bb->global_live_at_end = ALLOC_REG_SET (&reg_obstack);
COPY_REG_SET (bb->global_live_at_start,
edge_in->dest->global_live_at_start);
COPY_REG_SET (bb->global_live_at_end,
@@ -1467,7 +1465,7 @@ safe_insert_insn_on_edge (rtx insn, edge e)
noccmode = false;
#endif
- killed = OBSTACK_ALLOC_REG_SET (&reg_obstack);
+ killed = ALLOC_REG_SET (&reg_obstack);
for (x = insn; x; x = NEXT_INSN (x))
if (INSN_P (x))
@@ -2850,8 +2848,8 @@ cfg_layout_split_edge (edge e)
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 (&reg_obstack);
- new_bb->global_live_at_end = OBSTACK_ALLOC_REG_SET (&reg_obstack);
+ new_bb->global_live_at_start = ALLOC_REG_SET (&reg_obstack);
+ new_bb->global_live_at_end = ALLOC_REG_SET (&reg_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,
diff --git a/gcc/flow.c b/gcc/flow.c
index e79773a..cc2c198 100644
--- a/gcc/flow.c
+++ b/gcc/flow.c
@@ -575,7 +575,7 @@ update_life_info (sbitmap blocks, enum update_life_extent extent,
int stabilized_prop_flags = prop_flags;
basic_block bb;
- tmp = OBSTACK_ALLOC_REG_SET (&reg_obstack);
+ tmp = ALLOC_REG_SET (&reg_obstack);
ndead = 0;
if ((prop_flags & PROP_REG_INFO) && !reg_deaths)
@@ -1033,9 +1033,9 @@ calculate_global_regs_live (sbitmap blocks_in, sbitmap blocks_out, int flags)
gcc_assert (!bb->aux);
#endif
- tmp = OBSTACK_ALLOC_REG_SET (&reg_obstack);
- new_live_at_end = OBSTACK_ALLOC_REG_SET (&reg_obstack);
- invalidated_by_call = OBSTACK_ALLOC_REG_SET (&reg_obstack);
+ tmp = ALLOC_REG_SET (&reg_obstack);
+ new_live_at_end = ALLOC_REG_SET (&reg_obstack);
+ invalidated_by_call = ALLOC_REG_SET (&reg_obstack);
/* Inconveniently, this is only readily available in hard reg set form. */
for (i = 0; i < FIRST_PSEUDO_REGISTER; ++i)
@@ -1189,8 +1189,10 @@ calculate_global_regs_live (sbitmap blocks_in, sbitmap blocks_out, int flags)
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 (&reg_obstack);
+ cond_local_sets[bb->index - (INVALID_BLOCK + 1)]
+ = ALLOC_REG_SET (&reg_obstack);
rescan = 1;
}
else
@@ -1294,16 +1296,16 @@ calculate_global_regs_live (sbitmap blocks_in, sbitmap blocks_out, int flags)
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)]);
}
}
@@ -1436,11 +1438,11 @@ allocate_bb_life_data (void)
FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb)
{
- bb->global_live_at_start = OBSTACK_ALLOC_REG_SET (&reg_obstack);
- bb->global_live_at_end = OBSTACK_ALLOC_REG_SET (&reg_obstack);
+ bb->global_live_at_start = ALLOC_REG_SET (&reg_obstack);
+ bb->global_live_at_end = ALLOC_REG_SET (&reg_obstack);
}
- regs_live_at_setjmp = OBSTACK_ALLOC_REG_SET (&reg_obstack);
+ regs_live_at_setjmp = ALLOC_REG_SET (&reg_obstack);
}
void
@@ -1843,7 +1845,7 @@ init_propagate_block_info (basic_block bb, regset live, regset local_set,
if (JUMP_P (BB_END (bb))
&& any_condjump_p (BB_END (bb)))
{
- regset diff = OBSTACK_ALLOC_REG_SET (&reg_obstack);
+ regset diff = ALLOC_REG_SET (&reg_obstack);
basic_block bb_true, bb_false;
unsigned i;
diff --git a/gcc/global.c b/gcc/global.c
index e1b6f60..5e1ca72 100644
--- a/gcc/global.c
+++ b/gcc/global.c
@@ -1805,7 +1805,7 @@ build_insn_chain (rtx first)
struct insn_chain *prev = 0;
basic_block b = ENTRY_BLOCK_PTR->next_bb;
- live_relevant_regs = OBSTACK_ALLOC_REG_SET (&reg_obstack);
+ live_relevant_regs = ALLOC_REG_SET (&reg_obstack);
for (; first; first = NEXT_INSN (first))
{
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c
index 6cc6e6c..7f67a9a 100644
--- a/gcc/ifcvt.c
+++ b/gcc/ifcvt.c
@@ -3165,10 +3165,10 @@ dead_or_predicable (basic_block test_bb, basic_block merge_bb,
TEST_SET = set of registers set between EARLIEST and the
end of the block. */
- tmp = OBSTACK_ALLOC_REG_SET (&reg_obstack);
- merge_set = OBSTACK_ALLOC_REG_SET (&reg_obstack);
- test_live = OBSTACK_ALLOC_REG_SET (&reg_obstack);
- test_set = OBSTACK_ALLOC_REG_SET (&reg_obstack);
+ tmp = ALLOC_REG_SET (&reg_obstack);
+ merge_set = ALLOC_REG_SET (&reg_obstack);
+ test_live = ALLOC_REG_SET (&reg_obstack);
+ test_set = ALLOC_REG_SET (&reg_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,
diff --git a/gcc/loop-iv.c b/gcc/loop-iv.c
index 9eb0f2e..0759f2a 100644
--- a/gcc/loop-iv.c
+++ b/gcc/loop-iv.c
@@ -1778,7 +1778,7 @@ simplify_using_initial_values (struct loop *loop, enum rtx_code op, rtx *expr)
if (e->src == ENTRY_BLOCK_PTR)
return;
- altered = OBSTACK_ALLOC_REG_SET (&reg_obstack);
+ altered = ALLOC_REG_SET (&reg_obstack);
while (1)
{
diff --git a/gcc/recog.c b/gcc/recog.c
index 056e656..09a98f2 100644
--- a/gcc/recog.c
+++ b/gcc/recog.c
@@ -2972,8 +2972,8 @@ peephole2_optimize (FILE *dump_file ATTRIBUTE_UNUSED)
/* 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 (&reg_obstack);
- live = OBSTACK_ALLOC_REG_SET (&reg_obstack);
+ peep2_insn_data[i].live_before = ALLOC_REG_SET (&reg_obstack);
+ live = ALLOC_REG_SET (&reg_obstack);
#ifdef HAVE_conditional_execution
blocks = sbitmap_alloc (last_basic_block);
diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c
index 32d0fdb..539d027 100644
--- a/gcc/sched-deps.c
+++ b/gcc/sched-deps.c
@@ -1580,9 +1580,9 @@ free_dependency_caches (void)
void
init_deps_global (void)
{
- reg_pending_sets = OBSTACK_ALLOC_REG_SET (&reg_obstack);
- reg_pending_clobbers = OBSTACK_ALLOC_REG_SET (&reg_obstack);
- reg_pending_uses = OBSTACK_ALLOC_REG_SET (&reg_obstack);
+ reg_pending_sets = ALLOC_REG_SET (&reg_obstack);
+ reg_pending_clobbers = ALLOC_REG_SET (&reg_obstack);
+ reg_pending_uses = ALLOC_REG_SET (&reg_obstack);
reg_pending_barrier = NOT_A_BARRIER;
}