OSDN Git Service

* config/rs6000/rs6000.c (processor_target_table): Add MASK_MFCRF
[pf3gnuchains/gcc-fork.git] / gcc / local-alloc.c
index 61ff7fb..1802d09 100644 (file)
@@ -759,27 +759,6 @@ memref_used_between_p (rtx memref, rtx start, rtx end)
   return 0;
 }
 \f
-/* Return nonzero if the rtx X is invariant over the current function.  */
-/* ??? Actually, the places this is used in reload expect exactly what
-   is tested here, and not everything that is function invariant.  In
-   particular, the frame pointer and arg pointer are special cased;
-   pic_offset_table_rtx is not, and this will cause aborts when we
-   go to spill these things to memory.  */
-
-int
-function_invariant_p (rtx x)
-{
-  if (CONSTANT_P (x))
-    return 1;
-  if (x == frame_pointer_rtx || x == arg_pointer_rtx)
-    return 1;
-  if (GET_CODE (x) == PLUS
-      && (XEXP (x, 0) == frame_pointer_rtx || XEXP (x, 0) == arg_pointer_rtx)
-      && CONSTANT_P (XEXP (x, 1)))
-    return 1;
-  return 0;
-}
-
 /* Find registers that are equivalent to a single value throughout the
    compilation (either because they can be referenced in memory or are set once
    from a single constant).  Lower their priority for a register.
@@ -1392,9 +1371,7 @@ block_alloc (int b)
 
              /* Here we care if the operation to be computed is
                 commutative.  */
-             else if ((GET_CODE (XEXP (note, 0)) == EQ
-                       || GET_CODE (XEXP (note, 0)) == NE
-                       || GET_RTX_CLASS (GET_CODE (XEXP (note, 0))) == 'c')
+             else if (COMMUTATIVE_P (XEXP (note, 0))
                       && (r1 = XEXP (XEXP (note, 0), 1),
                           (GET_CODE (r1) == REG || GET_CODE (r1) == SUBREG))
                       && no_conflict_p (insn, r0, r1))
@@ -1799,7 +1776,7 @@ combine_regs (rtx usedreg, rtx setreg, int may_save_copy, int insn_number,
 
   ureg = REGNO (usedreg);
   if (ureg < FIRST_PSEUDO_REGISTER)
-    usize = HARD_REGNO_NREGS (ureg, GET_MODE (usedreg));
+    usize = hard_regno_nregs[ureg][GET_MODE (usedreg)];
   else
     usize = ((GET_MODE_SIZE (GET_MODE (usedreg))
              + (REGMODE_NATURAL_SIZE (GET_MODE (usedreg)) - 1))
@@ -1832,7 +1809,7 @@ combine_regs (rtx usedreg, rtx setreg, int may_save_copy, int insn_number,
 
   sreg = REGNO (setreg);
   if (sreg < FIRST_PSEUDO_REGISTER)
-    ssize = HARD_REGNO_NREGS (sreg, GET_MODE (setreg));
+    ssize = hard_regno_nregs[sreg][GET_MODE (setreg)];
   else
     ssize = ((GET_MODE_SIZE (GET_MODE (setreg))
              + (REGMODE_NATURAL_SIZE (GET_MODE (setreg)) - 1))
@@ -2217,7 +2194,7 @@ find_free_reg (enum reg_class class, enum machine_mode mode, int qtyno,
              || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)))
        {
          int j;
-         int size1 = HARD_REGNO_NREGS (regno, mode);
+         int size1 = hard_regno_nregs[regno][mode];
          for (j = 1; j < size1 && ! TEST_HARD_REG_BIT (used, regno + j); j++);
          if (j == size1)
            {
@@ -2275,7 +2252,7 @@ find_free_reg (enum reg_class class, enum machine_mode mode, int qtyno,
 static void
 mark_life (int regno, enum machine_mode mode, int life)
 {
-  int j = HARD_REGNO_NREGS (regno, mode);
+  int j = hard_regno_nregs[regno][mode];
   if (life)
     while (--j >= 0)
       SET_HARD_REG_BIT (regs_live, regno + j);
@@ -2292,7 +2269,7 @@ static void
 post_mark_life (int regno, enum machine_mode mode, int life, int birth,
                int death)
 {
-  int j = HARD_REGNO_NREGS (regno, mode);
+  int j = hard_regno_nregs[regno][mode];
   HARD_REG_SET this_reg;
 
   CLEAR_HARD_REG_SET (this_reg);