OSDN Git Service

(mark_referenced_resources, mark_set_resources): Change from USE and
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 6 May 1994 21:52:34 +0000 (21:52 +0000)
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 6 May 1994 21:52:34 +0000 (21:52 +0000)
CLOBBER insns to using CALL_INSN_FUNCTION_USAGE.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@7247 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/reorg.c

index b44bcfc..d537839 100644 (file)
@@ -403,25 +403,27 @@ mark_referenced_resources (x, res, include_delayed_effects)
            if (global_regs[i])
              SET_HARD_REG_BIT (res->regs, i);
 
-         /* Skip any labels between the CALL_INSN and possible USE insns.  */
-         while (GET_CODE (insn) == CODE_LABEL)
-           insn = PREV_INSN (insn);
-
-         for ( ; (insn && GET_CODE (insn) == INSN
-                  && GET_CODE (PATTERN (insn)) == USE);
-              insn = PREV_INSN (insn))
-           {
-             for (i = 1; i < seq_size; i++)
-               {
-                 rtx slot_pat = PATTERN (XVECEXP (sequence, 0, i));
-                 if (GET_CODE (slot_pat) == SET
-                     && rtx_equal_p (SET_DEST (slot_pat),
-                                     XEXP (PATTERN (insn), 0)))
-                   break;
-               }
-             if (i >= seq_size)
-               mark_referenced_resources (XEXP (PATTERN (insn), 0), res, 0);
-           }
+        {
+          rtx link;
+
+           for (link = CALL_INSN_FUNCTION_USAGE (insn);
+               link;
+               link = XEXP (link, 1))
+            if (GET_CODE (XEXP (link, 0)) == USE)
+              {
+                for (i = 1; i < seq_size; i++)
+                  {
+                    rtx slot_pat = PATTERN (XVECEXP (sequence, 0, i));
+                    if (GET_CODE (slot_pat) == SET
+                        && rtx_equal_p (SET_DEST (slot_pat),
+                                        SET_DEST (XEXP (link, 0)))
+                      break;
+                  }
+                if (i >= seq_size)
+                  mark_referenced_resources (SET_DEST (XEXP (link, 0)),
+                                             res, 0);
+              }
+        }
        }
 
       /* ... fall through to other INSN processing ... */
@@ -525,14 +527,13 @@ mark_set_resources (x, res, in_dest, include_delayed_effects)
          if (NEXT_INSN (prev) != x)
            next = NEXT_INSN (NEXT_INSN (prev));
 
-         /* Skip any possible labels between the CALL_INSN and CLOBBERs.  */
-         while (GET_CODE (next) == CODE_LABEL)
-           next = NEXT_INSN (next);
-
-         for (; (next && GET_CODE (next) == INSN
-                 && GET_CODE (PATTERN (next)) == CLOBBER);
-              next = NEXT_INSN (next))
-           mark_set_resources (XEXP (PATTERN (next), 0), res, 1, 0);
+        { rtx link;
+           for (link = CALL_INSN_FUNCTION_USAGE (insn);
+               link;
+               link = XEXP (link, 1))
+            if (GET_CODE (XEXP (link, 0)) == CLOBBER)
+              mark_set_resources (SET_DEST (XEXP (link, 0)), res, 1, 0);
+         }
 
          /* Check for a NOTE_INSN_SETJMP.  If it exists, then we must
             assume that this call can clobber any register.  */