]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
rs6000.c (get_next_active_insn): Rewrite using CALL_P...
authorAlan Modra <amodra@bigpond.net.au>
Mon, 12 Sep 2005 03:51:13 +0000 (03:51 +0000)
committerAlan Modra <amodra@gcc.gnu.org>
Mon, 12 Sep 2005 03:51:13 +0000 (13:21 +0930)
* config/rs6000/rs6000.c (get_next_active_insn): Rewrite using
CALL_P, JUMP_P and NONJUMP_INSN_P, so that barriers and labels
are omitted.  Exclude stack_tie insn too.

From-SVN: r104159

gcc/ChangeLog
gcc/config/rs6000/rs6000.c

index 2501c1a7aeccc2582f230fd475037b670ff46045..41d85c2edd3e3eb768898772523afc7ae9cd3682 100644 (file)
@@ -1,3 +1,9 @@
+2005-09-12  Alan Modra  <amodra@bigpond.net.au>
+
+       * config/rs6000/rs6000.c (get_next_active_insn): Rewrite using
+       CALL_P, JUMP_P and NONJUMP_INSN_P, so that barriers and labels
+       are omitted.  Exclude stack_tie insn too.
+
 2005-09-11  David Edelsohn  <edelsohn@gnu.org>
 
        PR rtl-optimization/23098
index 44548133e91ff88c8410df74005b02c0c5d2a7bb..d1be9b26fccd21fa2e978ebb187d8a66d5010742 100644 (file)
@@ -16632,26 +16632,26 @@ rs6000_is_costly_dependence (rtx insn, rtx next, rtx link, int cost,
 static rtx
 get_next_active_insn (rtx insn, rtx tail)
 {
-  rtx next_insn;
-
-  if (!insn || insn == tail)
+  if (insn == NULL_RTX || insn == tail)
     return NULL_RTX;
 
-  next_insn = NEXT_INSN (insn);
-
-  while (next_insn
-        && next_insn != tail
-        && (GET_CODE (next_insn) == NOTE
-            || GET_CODE (PATTERN (next_insn)) == USE
-            || GET_CODE (PATTERN (next_insn)) == CLOBBER))
+  while (1)
     {
-      next_insn = NEXT_INSN (next_insn);
-    }
-
-  if (!next_insn || next_insn == tail)
-    return NULL_RTX;
+      insn = NEXT_INSN (insn);
+      if (insn == NULL_RTX || insn == tail)
+       return NULL_RTX;
 
-  return next_insn;
+      if (CALL_P (insn)
+         || JUMP_P (insn)
+         || (NONJUMP_INSN_P (insn)
+             && GET_CODE (PATTERN (insn)) != USE
+             && GET_CODE (PATTERN (insn)) != CLOBBER
+             && !(GET_CODE (PATTERN (insn)) == SET
+                  && GET_CODE (XEXP (PATTERN (insn), 1)) == UNSPEC
+                  && XINT (XEXP (PATTERN (insn), 1), 1) == UNSPEC_TIE)))
+       break;
+    }
+  return insn;
 }
 
 /* Return whether the presence of INSN causes a dispatch group termination