Commit e76d9acb by John Wehle Committed by John Wehle

loop.c (scan_loop): Use CONST_CALL_P instead of checking for REG_LIBCALL / REG_RETVAL.

	* loop.c (scan_loop): Use CONST_CALL_P instead of
	checking for REG_LIBCALL / REG_RETVAL.

From-SVN: r35808
parent 850aac53
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) Sat Aug 19 09:18:47 2000 Jeffrey A Law (law@cygnus.com)
* reload1.c (reload_as_needed): Accept dumpfile argument, * reload1.c (reload_as_needed): Accept dumpfile argument,
......
...@@ -599,7 +599,6 @@ scan_loop (loop, flags) ...@@ -599,7 +599,6 @@ scan_loop (loop, flags)
rtx loop_entry_jump = 0; rtx loop_entry_jump = 0;
/* Number of insns in the loop. */ /* Number of insns in the loop. */
int insn_count; int insn_count;
int in_libcall = 0;
int tem; int tem;
rtx temp, update_start, update_end; rtx temp, update_start, update_end;
/* The SET from an insn, if it is the only SET in the insn. */ /* The SET from an insn, if it is the only SET in the insn. */
...@@ -753,11 +752,6 @@ scan_loop (loop, flags) ...@@ -753,11 +752,6 @@ scan_loop (loop, flags)
p != NULL_RTX; p != NULL_RTX;
p = next_insn_in_loop (loop, p)) 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 if (GET_CODE (p) == INSN
&& (set = single_set (p)) && (set = single_set (p))
&& GET_CODE (SET_DEST (set)) == REG && GET_CODE (SET_DEST (set)) == REG
...@@ -1046,9 +1040,8 @@ scan_loop (loop, flags) ...@@ -1046,9 +1040,8 @@ scan_loop (loop, flags)
} }
/* Past a call insn, we get to insns which might not be executed /* Past a call insn, we get to insns which might not be executed
because the call might exit. This matters for insns that trap. because the call might exit. This matters for insns that trap.
Call insns inside a REG_LIBCALL/REG_RETVAL block always return, Constant and pure call insns always return, so they don't count. */
so they don't count. */ else if (GET_CODE (p) == CALL_INSN && ! CONST_CALL_P (p))
else if (GET_CODE (p) == CALL_INSN && ! in_libcall)
call_passed = 1; call_passed = 1;
/* Past a label or a jump, we get to insns for which we /* 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 can't count on whether or how many times they will be
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment