summaryrefslogtreecommitdiff
path: root/gcc/modulo-sched.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/modulo-sched.c')
-rw-r--r--gcc/modulo-sched.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/modulo-sched.c b/gcc/modulo-sched.c
index 60b39f81d18..193fb07aefd 100644
--- a/gcc/modulo-sched.c
+++ b/gcc/modulo-sched.c
@@ -362,15 +362,17 @@ ps_num_consecutive_stages (partial_schedule_ptr ps, int id)
more than one occurrence in the loop besides the control part or the
do-loop pattern is not of the form we expect. */
static rtx
-doloop_register_get (rtx_insn *head ATTRIBUTE_UNUSED, rtx_insn *tail ATTRIBUTE_UNUSED)
+doloop_register_get (rtx_insn *head, rtx_insn *tail)
{
-#ifdef HAVE_doloop_end
rtx reg, condition;
rtx_insn *insn, *first_insn_not_to_check;
if (!JUMP_P (tail))
return NULL_RTX;
+ if (!targetm.code_for_doloop_end)
+ return NULL_RTX;
+
/* TODO: Free SMS's dependence on doloop_condition_get. */
condition = doloop_condition_get (tail);
if (! condition)
@@ -406,9 +408,6 @@ doloop_register_get (rtx_insn *head ATTRIBUTE_UNUSED, rtx_insn *tail ATTRIBUTE_U
}
return reg;
-#else
- return NULL_RTX;
-#endif
}
/* Check if COUNT_REG is set to a constant in the PRE_HEADER block, so