]> gcc.gnu.org Git - gcc.git/commitdiff
loop.c (scan_loop): Use CONST_CALL_P instead of checking for REG_LIBCALL / REG_RETVAL.
authorJohn Wehle <john@feith.com>
Sat, 19 Aug 2000 16:34:44 +0000 (16:34 +0000)
committerJohn Wehle <wehle@gcc.gnu.org>
Sat, 19 Aug 2000 16:34:44 +0000 (16:34 +0000)
* loop.c (scan_loop): Use CONST_CALL_P instead of
checking for REG_LIBCALL / REG_RETVAL.

From-SVN: r35808

gcc/ChangeLog
gcc/loop.c

index eb714b1190fd8a396682f4854d2268ba42a646ca..dc35df43ceee0da01d2c1c55335d1115a681407c 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 ddaf017588a4341a482b5b4f561b6406d83b120e..fe9e0d4ebabc0812108e34d4c5b7bf90510b82ba 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
This page took 0.086227 seconds and 5 git commands to generate.