]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Use REG_SET macros
authorMichael Meissner <meissner@gcc.gnu.org>
Mon, 16 Jun 1997 18:40:41 +0000 (18:40 +0000)
committerMichael Meissner <meissner@gcc.gnu.org>
Mon, 16 Jun 1997 18:40:41 +0000 (18:40 +0000)
From-SVN: r14250

gcc/caller-save.c
gcc/combine.c
gcc/local-alloc.c
gcc/reload1.c
gcc/sched.c

index 51b9d5a8f62b0c1674ee8fa24ca5abfe674658d6..f563637b413058f29f08e739c100a78cc6ed49ac 100644 (file)
@@ -357,8 +357,7 @@ save_call_clobbered_regs (insn_mode)
     {
       regset regs_live = basic_block_live_at_start[b];
       rtx prev_block_last = PREV_INSN (basic_block_head[b]);
-      REGSET_ELT_TYPE bit;
-      int offset, i, j;
+      int i, j;
       int regno;
 
       /* Compute hard regs live at start of block -- this is the
index 12538fd88297e61b6dd728d604bec3782de4ba1a..5e32b5ce1fa96392b855515c3d415b9f01b62878 100644 (file)
@@ -740,8 +740,7 @@ set_nonzero_bits_and_sign_copies (x, set)
       && REGNO (x) >= FIRST_PSEUDO_REGISTER
       /* If this register is undefined at the start of the file, we can't
         say what its contents were.  */
-      && ! (basic_block_live_at_start[0][REGNO (x) / REGSET_ELT_BITS]
-           & ((REGSET_ELT_TYPE) 1 << (REGNO (x) % REGSET_ELT_BITS)))
+      && ! REGNO_REG_SET_P (basic_block_live_at_start[0], REGNO (x))
       && GET_MODE_BITSIZE (GET_MODE (x)) <= HOST_BITS_PER_WIDE_INT)
     {
       if (set == 0 || GET_CODE (set) == CLOBBER)
@@ -2367,8 +2366,7 @@ try_combine (i3, i2, i1)
            regno = REGNO (i2dest);
            REG_N_SETS (regno)--;
            if (REG_N_SETS (regno) == 0
-               && ! (basic_block_live_at_start[0][regno / REGSET_ELT_BITS]
-                     & ((REGSET_ELT_TYPE) 1 << (regno % REGSET_ELT_BITS))))
+               && ! REGNO_REG_SET_P (basic_block_live_at_start[0], regno))
              REG_N_REFS (regno) = 0;
          }
       }
@@ -2390,8 +2388,7 @@ try_combine (i3, i2, i1)
          {
            REG_N_SETS (regno)--;
            if (REG_N_SETS (regno) == 0
-               && ! (basic_block_live_at_start[0][regno / REGSET_ELT_BITS]
-                     & ((REGSET_ELT_TYPE) 1 << (regno % REGSET_ELT_BITS))))
+               && ! REGNO_REG_SET_P (basic_block_live_at_start[0], regno))
              REG_N_REFS (regno) = 0;
          }
       }
@@ -10626,8 +10623,7 @@ reg_dead_at_p (reg, insn)
     }
 
   for (i = reg_dead_regno; i < reg_dead_endregno; i++)
-    if (basic_block_live_at_start[block][i / REGSET_ELT_BITS]
-       & ((REGSET_ELT_TYPE) 1 << (i % REGSET_ELT_BITS)))
+    if (REGNO_REG_SET_P (basic_block_live_at_start[block], i))
       return 0;
 
   return 1;
index 3603e534d57428951e3b96b87cac361325a6de23..83cb08f4cfb3897ee5ecc6c30e77442d3ac0bc6d 100644 (file)
@@ -1181,8 +1181,7 @@ update_equiv_regs ()
                       && GET_CODE (insn) == INSN
                       && REG_BASIC_BLOCK (regno) < 0)
                {
-                 int l, offset;
-                 REGSET_ELT_TYPE bit;
+                 int l;
 
                  emit_insn_before (copy_rtx (PATTERN (equiv_insn)), insn);
                  REG_NOTES (PREV_INSN (insn)) = REG_NOTES (equiv_insn);
@@ -1202,11 +1201,8 @@ update_equiv_regs ()
                  if (block >= 0 && insn == basic_block_head[block])
                    basic_block_head[block] = PREV_INSN (insn);
 
-                 offset = regno / REGSET_ELT_BITS;
-                 bit = ((REGSET_ELT_TYPE) 1
-                        << (regno % REGSET_ELT_BITS));
                  for (l = 0; l < n_basic_blocks; l++)
-                   basic_block_live_at_start[l][offset] &= ~ bit;
+                   CLEAR_REGNO_REG_SET (basic_block_live_at_start[l], regno);
                }
            }
        }
@@ -1253,11 +1249,7 @@ block_alloc (b)
 
   /* Initialize table of hardware registers currently live.  */
 
-#ifdef HARD_REG_SET
-  regs_live = *basic_block_live_at_start[b];
-#else
-  COPY_HARD_REG_SET (regs_live, basic_block_live_at_start[b]);
-#endif
+  REG_SET_TO_HARD_REG_SET (regs_live, basic_block_live_at_start[b]);
 
   /* This loop scans the instructions of the basic block
      and assigns quantities to registers.
index ed6a07d000bf279d908cbbdedf5212efab2e5edb..ca61d9731f403b440a17baab4120c2360cd48e65 100644 (file)
@@ -2092,9 +2092,8 @@ reload (first, global, dumpfile)
 
   if (! frame_pointer_needed)
     for (i = 0; i < n_basic_blocks; i++)
-      basic_block_live_at_start[i][HARD_FRAME_POINTER_REGNUM / REGSET_ELT_BITS]
-       &= ~ ((REGSET_ELT_TYPE) 1 << (HARD_FRAME_POINTER_REGNUM
-                                     % REGSET_ELT_BITS));
+      CLEAR_REGNO_REG_SET (basic_block_live_at_start[i],
+                          HARD_FRAME_POINTER_REGNUM);
 
   /* Come here (with failure set nonzero) if we can't get enough spill regs
      and we decide not to abort about it.  */
index 132ed540be0069a38813c0c37ed6785e55efec44..8b714688005704d90abc0840680e7aee293f2e15 100644 (file)
@@ -3436,9 +3436,8 @@ schedule_block (b, file)
 
   if (reload_completed == 0)
     {
-      bcopy ((char *) basic_block_live_at_start[b], (char *) bb_live_regs,
-            regset_bytes);
-      bzero ((char *) bb_dead_regs, regset_bytes);
+      COPY_REG_SET (bb_live_regs, basic_block_live_at_start[b]);
+      CLEAR_REG_SET (bb_dead_regs);
 
       if (b == 0)
        {