OSDN Git Service

2008-02-04 Daniel Franke <franke.daniel@gmail.com>
[pf3gnuchains/gcc-fork.git] / gcc / resource.c
index 8b25c04..d7e3339 100644 (file)
@@ -222,6 +222,7 @@ mark_referenced_resources (rtx x, struct resources *res,
     case CONST:
     case CONST_INT:
     case CONST_DOUBLE:
+    case CONST_FIXED:
     case CONST_VECTOR:
     case PC:
     case SYMBOL_REF:
@@ -638,6 +639,7 @@ mark_set_resources (rtx x, struct resources *res, int in_dest,
     case USE:
     case CONST_INT:
     case CONST_DOUBLE:
+    case CONST_FIXED:
     case CONST_VECTOR:
     case LABEL_REF:
     case SYMBOL_REF:
@@ -661,9 +663,8 @@ mark_set_resources (rtx x, struct resources *res, int in_dest,
          rtx link;
 
          res->cc = res->memory = 1;
-         for (r = 0; r < FIRST_PSEUDO_REGISTER; r++)
-           if (call_used_regs[r] || global_regs[r])
-             SET_HARD_REG_BIT (res->regs, r);
+
+         IOR_HARD_REG_SET (res->regs, regs_invalidated_by_call);
 
          for (link = CALL_INSN_FUNCTION_USAGE (x);
               link; link = XEXP (link, 1))
@@ -823,7 +824,7 @@ mark_set_resources (rtx x, struct resources *res, int in_dest,
 /* Return TRUE if INSN is a return, possibly with a filled delay slot.  */
 
 static bool
-return_insn_p (rtx insn)
+return_insn_p (const_rtx insn)
 {
   if (JUMP_P (insn) && GET_CODE (PATTERN (insn)) == RETURN)
     return true;
@@ -956,9 +957,8 @@ mark_target_live_regs (rtx insns, rtx target, struct resources *res)
      TARGET.  Otherwise, we must assume everything is live.  */
   if (b != -1)
     {
-      regset regs_live = df_get_live_in (BASIC_BLOCK (b));
+      regset regs_live = DF_LR_IN (BASIC_BLOCK (b));
       rtx start_insn, stop_insn;
-      reg_set_iterator rsi;
 
       /* Compute hard regs live at start of block -- this is the real hard regs
         marked live, plus live pseudo regs that have been renumbered to
@@ -966,13 +966,6 @@ mark_target_live_regs (rtx insns, rtx target, struct resources *res)
 
       REG_SET_TO_HARD_REG_SET (current_live_regs, regs_live);
 
-      EXECUTE_IF_SET_IN_REG_SET (regs_live, FIRST_PSEUDO_REGISTER, i, rsi)
-       {
-         if (reg_renumber[i] >= 0)
-           add_to_hard_reg_set (&current_live_regs, PSEUDO_REGNO_MODE (i),
-                               reg_renumber[i]);
-       }
-
       /* Get starting and ending insn, handling the case where each might
         be a SEQUENCE.  */
       start_insn = (b == ENTRY_BLOCK_PTR->next_bb->index ?