OSDN Git Service

* loop.c (scan_loop): Use CONST_CALL_P instead of
authorwehle <wehle@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 19 Aug 2000 16:34:44 +0000 (16:34 +0000)
committerwehle <wehle@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 19 Aug 2000 16:34:44 +0000 (16:34 +0000)
checking for REG_LIBCALL / REG_RETVAL.

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

gcc/ChangeLog
gcc/loop.c

index eb714b1..dc35df4 100644 (file)
@@ -1,3 +1,8 @@
+Sat Aug 19 12:37:08 EDT 2000  John Wehle  (john@feith.com)
+
+       * loop.c (scan_loop): Use CONST_CALL_P instead of
+       checking for REG_LIBCALL / REG_RETVAL.
+
 Sat Aug 19 09:18:47 2000  Jeffrey A Law  (law@cygnus.com)
 
        * reload1.c (reload_as_needed): Accept dumpfile argument,
index ddaf017..fe9e0d4 100644 (file)
@@ -599,7 +599,6 @@ scan_loop (loop, flags)
   rtx loop_entry_jump = 0;
   /* Number of insns in the loop.  */
   int insn_count;
-  int in_libcall = 0;
   int tem;
   rtx temp, update_start, update_end;
   /* The SET from an insn, if it is the only SET in the insn.  */
@@ -753,11 +752,6 @@ scan_loop (loop, flags)
        p != NULL_RTX;
        p = next_insn_in_loop (loop, p))
     {
-      if (INSN_P (p) && find_reg_note (p, REG_LIBCALL, NULL_RTX))
-       in_libcall = 1;
-      else if (INSN_P (p) && find_reg_note (p, REG_RETVAL, NULL_RTX))
-       in_libcall = 0;
-
       if (GET_CODE (p) == INSN
          && (set = single_set (p))
          && GET_CODE (SET_DEST (set)) == REG
@@ -1046,9 +1040,8 @@ scan_loop (loop, flags)
        }
       /* Past a call insn, we get to insns which might not be executed
         because the call might exit.  This matters for insns that trap.
-        Call insns inside a REG_LIBCALL/REG_RETVAL block always return,
-        so they don't count.  */
-      else if (GET_CODE (p) == CALL_INSN && ! in_libcall)
+        Constant and pure call insns always return, so they don't count.  */
+      else if (GET_CODE (p) == CALL_INSN && ! CONST_CALL_P (p))
        call_passed = 1;
       /* Past a label or a jump, we get to insns for which we
         can't count on whether or how many times they will be