diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f43eb1f66e20a9f40a23960240faacbc1bdf8fcc..fae4a9ddddcfef4f926ddb286df95fa7b6ef6744 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 614dc88ffdd80b93bd490d6b835fcac7100d2f76..277888b13e231e4c0182ed65e53257cc9a9cd166 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 7572e526fd28ab6397c673497f54cdf67fa66420..603f921c5e829d9983a435b54f5b6934b18c6f0c 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 287a139fda9d2e832ad4adaf3dffefb4b4de4737..f680eee8794a6c33f133be7230656c52599202fa 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 3c2dc96aacb1b1a5ead15f96bb8af3e058c7753d..4e0fc4cb8fc54f0b1a62f3f038f6522992a642df 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 e79773a6eb9c7d335134cb05862acdb3861c001b..cc2c19887677586e7fbf920fc70d1e264477f99e 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 e1b6f60de8f8b57fcc0d673ca49fd6d89f1197e5..5e1ca72a62feedc87b9b628b4faab6a64221a14d 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 6cc6e6cfbae80e093ee3817c5d98f28243b90dfd..7f67a9a61a5409cd11652464c4021f55652a7d38 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 9eb0f2e8cd179d8c6c55895ace9728576f24dd0a..0759f2aa80c2b2dbded0e0ca5cd297972a15887c 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 056e656901ae0d9bb398d7a1bd1bafbce868b5fd..09a98f2e33f1e769a7743c41a233b61ad6fa3212 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 32d0fdba813393e7c14702d60efffcb39f0d7d4a..539d02734108adbffeec5d8cda85dd023b055174 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;
 }