Commit ee25a7a5 by Mark Mitchell Committed by Mark Mitchell

basic-block.h (ALLOCA_REG_SET): Remove.

	* 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.

From-SVN: r32350
parent 008b7307
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> 2000-03-05 Stephane Carrez <stcarrez@worldnet.fr>
* dwarf2out.c (UNALIGNED_WORD_ASM_OP): Support 2 bytes pointer. * dwarf2out.c (UNALIGNED_WORD_ASM_OP): Support 2 bytes pointer.
......
...@@ -98,8 +98,8 @@ do { \ ...@@ -98,8 +98,8 @@ do { \
/* Allocate a register set with oballoc. */ /* Allocate a register set with oballoc. */
#define OBSTACK_ALLOC_REG_SET(OBSTACK) BITMAP_OBSTACK_ALLOC (OBSTACK) #define OBSTACK_ALLOC_REG_SET(OBSTACK) BITMAP_OBSTACK_ALLOC (OBSTACK)
/* Allocate a register set with alloca. */ /* Initialize a register set. Returns the new register set. */
#define ALLOCA_REG_SET() BITMAP_ALLOCA () #define INITIALIZE_REG_SET(HEAD) bitmap_initialize (&HEAD)
/* Do any cleanup needed on a regset when it is no longer used. */ /* Do any cleanup needed on a regset when it is no longer used. */
#define FREE_REG_SET(REGSET) BITMAP_FREE(REGSET) #define FREE_REG_SET(REGSET) BITMAP_FREE(REGSET)
......
...@@ -2643,9 +2643,10 @@ update_life_info (blocks, extent, prop_flags) ...@@ -2643,9 +2643,10 @@ update_life_info (blocks, extent, prop_flags)
int prop_flags; int prop_flags;
{ {
regset tmp; regset tmp;
regset_head tmp_head;
int i; int i;
tmp = ALLOCA_REG_SET (); tmp = INITIALIZE_REG_SET (tmp_head);
/* For a global update, we go through the relaxation process again. */ /* For a global update, we go through the relaxation process again. */
if (extent != UPDATE_LIFE_LOCAL) if (extent != UPDATE_LIFE_LOCAL)
...@@ -2949,10 +2950,12 @@ calculate_global_regs_live (blocks_in, blocks_out, flags) ...@@ -2949,10 +2950,12 @@ calculate_global_regs_live (blocks_in, blocks_out, flags)
{ {
basic_block *queue, *qhead, *qtail, *qend; basic_block *queue, *qhead, *qtail, *qend;
regset tmp, new_live_at_end; regset tmp, new_live_at_end;
regset_head tmp_head;
regset_head new_live_at_end_head;
int i; int i;
tmp = ALLOCA_REG_SET (); tmp = INITIALIZE_REG_SET (tmp_head);
new_live_at_end = ALLOCA_REG_SET (); new_live_at_end = INITIALIZE_REG_SET (new_live_at_end_head);
/* Create a worklist. Allocate an extra slot for ENTRY_BLOCK, and one /* Create a worklist. Allocate an extra slot for ENTRY_BLOCK, and one
because the `head == tail' style test for an empty queue doesn't because the `head == tail' style test for an empty queue doesn't
...@@ -3177,7 +3180,9 @@ propagate_block (bb, old, significant, flags) ...@@ -3177,7 +3180,9 @@ propagate_block (bb, old, significant, flags)
register rtx insn; register rtx insn;
rtx prev; rtx prev;
regset live; regset live;
regset_head live_head;
regset dead; regset dead;
regset_head dead_head;
/* Find the loop depth for this block. Ignore loop level changes in the /* Find the loop depth for this block. Ignore loop level changes in the
middle of the basic block -- for register allocation purposes, the middle of the basic block -- for register allocation purposes, the
...@@ -3185,8 +3190,8 @@ propagate_block (bb, old, significant, flags) ...@@ -3185,8 +3190,8 @@ propagate_block (bb, old, significant, flags)
not in the loop pre-header or post-trailer. */ not in the loop pre-header or post-trailer. */
loop_depth = bb->loop_depth; loop_depth = bb->loop_depth;
dead = ALLOCA_REG_SET (); dead = INITIALIZE_REG_SET (live_head);
live = ALLOCA_REG_SET (); live = INITIALIZE_REG_SET (dead_head);
cc0_live = 0; cc0_live = 0;
......
...@@ -1764,8 +1764,9 @@ build_insn_chain (first) ...@@ -1764,8 +1764,9 @@ build_insn_chain (first)
struct insn_chain **p = &reload_insn_chain; struct insn_chain **p = &reload_insn_chain;
struct insn_chain *prev = 0; struct insn_chain *prev = 0;
int b = 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)) for (; first; first = NEXT_INSN (first))
{ {
......
...@@ -6631,13 +6631,15 @@ schedule_region (rgn) ...@@ -6631,13 +6631,15 @@ schedule_region (rgn)
int bb; int bb;
int rgn_n_insns = 0; int rgn_n_insns = 0;
int sched_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. */ /* Set variables for the current region. */
current_nr_blocks = RGN_NR_BLOCKS (rgn); current_nr_blocks = RGN_NR_BLOCKS (rgn);
current_blocks = RGN_BLOCKS (rgn); current_blocks = RGN_BLOCKS (rgn);
reg_pending_sets = ALLOCA_REG_SET (); reg_pending_sets = INITIALIZE_REG_SET (reg_pending_sets_head);
reg_pending_clobbers = ALLOCA_REG_SET (); reg_pending_clobbers = INITIALIZE_REG_SET (reg_pending_clobbers_head);
reg_pending_sets_all = 0; reg_pending_sets_all = 0;
/* Initializations for region data dependence analyisis. */ /* Initializations for region data dependence analyisis. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment