summaryrefslogtreecommitdiff
path: root/gcc/modulo-sched.c
diff options
context:
space:
mode:
authorrevitale <revitale@138bc75d-0d04-0410-961f-82ee72b054a4>2007-09-23 11:58:19 +0000
committerrevitale <revitale@138bc75d-0d04-0410-961f-82ee72b054a4>2007-09-23 11:58:19 +0000
commit11dd7ac19faf5a5526eb53f8b75b98e23b3b2be2 (patch)
tree08f98d68ea009867b325d7e00480daaab248a7db /gcc/modulo-sched.c
parentaf9c8177cca5d72b25534a171baba7b70f4a3617 (diff)
downloadgcc-11dd7ac19faf5a5526eb53f8b75b98e23b3b2be2.tar.gz
Minor cosmetic change
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128689 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/modulo-sched.c')
-rw-r--r--gcc/modulo-sched.c27
1 files changed, 12 insertions, 15 deletions
diff --git a/gcc/modulo-sched.c b/gcc/modulo-sched.c
index 9a806c106e9..a17986ce544 100644
--- a/gcc/modulo-sched.c
+++ b/gcc/modulo-sched.c
@@ -286,8 +286,7 @@ static rtx
doloop_register_get (rtx head ATTRIBUTE_UNUSED, rtx tail ATTRIBUTE_UNUSED)
{
#ifdef HAVE_doloop_end
- rtx reg, condition, insn;
- bool found = false;
+ rtx reg, condition, insn, first_insn_not_to_check;
if (!JUMP_P (tail))
return NULL_RTX;
@@ -309,25 +308,23 @@ doloop_register_get (rtx head ATTRIBUTE_UNUSED, rtx tail ATTRIBUTE_UNUSED)
until the decrement. We assume the control part consists of
either a single (parallel) branch-on-count or a (non-parallel)
branch immediately preceded by a single (decrement) insn. */
- for (insn = head; insn != PREV_INSN (tail); insn = NEXT_INSN (insn))
- if ((found = reg_mentioned_p (reg, insn)) == true)
- break;
- if (found)
- {
- if (dump_file)
- fprintf (dump_file, "SMS count_reg found outside control\n");
+ first_insn_not_to_check = (GET_CODE (PATTERN (tail)) == PARALLEL ? tail
+ : PREV_INSN (tail));
- return NULL_RTX;
- }
- /* One last check in case the do-loop pattern is parallel. */
- if (GET_CODE (PATTERN (tail)) == PARALLEL)
- if (reg_mentioned_p (reg, PREV_INSN (tail)))
+ for (insn = head; insn != first_insn_not_to_check; insn = NEXT_INSN (insn))
+ if (reg_mentioned_p (reg, insn))
{
if (dump_file)
- fprintf (dump_file, "SMS count_reg found outside control\n");
+ {
+ fprintf (dump_file, "SMS count_reg found ");
+ print_rtl_single (dump_file, reg);
+ fprintf (dump_file, " outside control in insn:\n");
+ print_rtl_single (dump_file, insn);
+ }
return NULL_RTX;
}
+
return reg;
#else
return NULL_RTX;