summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/basic-block.h4
-rw-r--r--gcc/flow.c15
-rw-r--r--gcc/global.c3
-rw-r--r--gcc/haifa-sched.c6
5 files changed, 28 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6329243a864..5e410297e92 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,13 @@
+2000-03-05 Mark Mitchell <mark@codesourcery.com>
+
+ * basic-block.h (ALLOCA_REG_SET): Remove.
+ (INITIALIZE_REG_SET): New macro.
+ * flow.c (update_life_info): Use it.
+ (calculate_global_regs_live): Likewise.
+ (propagate_block): Likewise.
+ * global.c (build_insn_chain): Likewise.
+ * haifa-sched.c (schedule_region): Likewise.
+
2000-03-05 Stephane Carrez <stcarrez@worldnet.fr>
* dwarf2out.c (UNALIGNED_WORD_ASM_OP): Support 2 bytes pointer.
diff --git a/gcc/basic-block.h b/gcc/basic-block.h
index 50cc28e0dc1..0aef32b2353 100644
--- a/gcc/basic-block.h
+++ b/gcc/basic-block.h
@@ -98,8 +98,8 @@ do { \
/* Allocate a register set with oballoc. */
#define OBSTACK_ALLOC_REG_SET(OBSTACK) BITMAP_OBSTACK_ALLOC (OBSTACK)
-/* Allocate a register set with alloca. */
-#define ALLOCA_REG_SET() BITMAP_ALLOCA ()
+/* Initialize a register set. Returns the new register set. */
+#define INITIALIZE_REG_SET(HEAD) bitmap_initialize (&HEAD)
/* Do any cleanup needed on a regset when it is no longer used. */
#define FREE_REG_SET(REGSET) BITMAP_FREE(REGSET)
diff --git a/gcc/flow.c b/gcc/flow.c
index 6cdda708fe1..e134794f38c 100644
--- a/gcc/flow.c
+++ b/gcc/flow.c
@@ -2643,9 +2643,10 @@ update_life_info (blocks, extent, prop_flags)
int prop_flags;
{
regset tmp;
+ regset_head tmp_head;
int i;
- tmp = ALLOCA_REG_SET ();
+ tmp = INITIALIZE_REG_SET (tmp_head);
/* For a global update, we go through the relaxation process again. */
if (extent != UPDATE_LIFE_LOCAL)
@@ -2949,10 +2950,12 @@ calculate_global_regs_live (blocks_in, blocks_out, flags)
{
basic_block *queue, *qhead, *qtail, *qend;
regset tmp, new_live_at_end;
+ regset_head tmp_head;
+ regset_head new_live_at_end_head;
int i;
- tmp = ALLOCA_REG_SET ();
- new_live_at_end = ALLOCA_REG_SET ();
+ tmp = INITIALIZE_REG_SET (tmp_head);
+ new_live_at_end = INITIALIZE_REG_SET (new_live_at_end_head);
/* Create a worklist. Allocate an extra slot for ENTRY_BLOCK, and one
because the `head == tail' style test for an empty queue doesn't
@@ -3177,7 +3180,9 @@ propagate_block (bb, old, significant, flags)
register rtx insn;
rtx prev;
regset live;
+ regset_head live_head;
regset dead;
+ regset_head dead_head;
/* Find the loop depth for this block. Ignore loop level changes in the
middle of the basic block -- for register allocation purposes, the
@@ -3185,8 +3190,8 @@ propagate_block (bb, old, significant, flags)
not in the loop pre-header or post-trailer. */
loop_depth = bb->loop_depth;
- dead = ALLOCA_REG_SET ();
- live = ALLOCA_REG_SET ();
+ dead = INITIALIZE_REG_SET (live_head);
+ live = INITIALIZE_REG_SET (dead_head);
cc0_live = 0;
diff --git a/gcc/global.c b/gcc/global.c
index 571320c3e33..74d9fd2a6b7 100644
--- a/gcc/global.c
+++ b/gcc/global.c
@@ -1764,8 +1764,9 @@ build_insn_chain (first)
struct insn_chain **p = &reload_insn_chain;
struct insn_chain *prev = 0;
int b = 0;
+ regset_head live_relevant_regs_head;
- live_relevant_regs = ALLOCA_REG_SET ();
+ live_relevant_regs = INITIALIZE_REG_SET (live_relevant_regs_head);
for (; first; first = NEXT_INSN (first))
{
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c
index 430abaf429c..eb6f121d0b7 100644
--- a/gcc/haifa-sched.c
+++ b/gcc/haifa-sched.c
@@ -6631,13 +6631,15 @@ schedule_region (rgn)
int bb;
int rgn_n_insns = 0;
int sched_rgn_n_insns = 0;
+ regset_head reg_pending_sets_head;
+ regset_head reg_pending_clobbers_head;
/* Set variables for the current region. */
current_nr_blocks = RGN_NR_BLOCKS (rgn);
current_blocks = RGN_BLOCKS (rgn);
- reg_pending_sets = ALLOCA_REG_SET ();
- reg_pending_clobbers = ALLOCA_REG_SET ();
+ reg_pending_sets = INITIALIZE_REG_SET (reg_pending_sets_head);
+ reg_pending_clobbers = INITIALIZE_REG_SET (reg_pending_clobbers_head);
reg_pending_sets_all = 0;
/* Initializations for region data dependence analyisis. */