summaryrefslogtreecommitdiff
path: root/gcc/modulo-sched.c
diff options
context:
space:
mode:
authorVladimir Yanovsky <yanov@il.ibm.com>2007-07-28 21:51:53 +0000
committerRevital Eres <revitale@gcc.gnu.org>2007-07-28 21:51:53 +0000
commit9b6dd300181991dc03186c3534062afbf9058824 (patch)
treefbc2601e3989219775a9593d107a28e213728ed3 /gcc/modulo-sched.c
parent6d023ec55bfca23f4fa692b1650e3ddeecf73cc1 (diff)
downloadgcc-9b6dd300181991dc03186c3534062afbf9058824.tar.gz
Avoid SMS when the candidate loop contains INC instruction
Co-Authored-By: Revital Eres <eres@il.ibm.com> From-SVN: r127027
Diffstat (limited to 'gcc/modulo-sched.c')
-rw-r--r--gcc/modulo-sched.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/modulo-sched.c b/gcc/modulo-sched.c
index d543e6bdaf0..16cd5d88e24 100644
--- a/gcc/modulo-sched.c
+++ b/gcc/modulo-sched.c
@@ -987,12 +987,16 @@ sms_schedule (void)
if ( !(count_reg = doloop_register_get (tail)))
continue;
- /* Don't handle BBs with calls or barriers, or !single_set insns. */
+ /* Don't handle BBs with calls or barriers, or !single_set insns,
+ or auto-increment insns (to avoid creating invalid reg-moves
+ for the auto-increment insns).
+ ??? Should handle auto-increment insns. */
for (insn = head; insn != NEXT_INSN (tail); insn = NEXT_INSN (insn))
if (CALL_P (insn)
|| BARRIER_P (insn)
|| (INSN_P (insn) && !JUMP_P (insn)
- && !single_set (insn) && GET_CODE (PATTERN (insn)) != USE))
+ && !single_set (insn) && GET_CODE (PATTERN (insn)) != USE)
+ || (FIND_REG_INC_NOTE (insn, NULL_RTX) != 0))
break;
if (insn != NEXT_INSN (tail))
@@ -1003,6 +1007,8 @@ sms_schedule (void)
fprintf (dump_file, "SMS loop-with-call\n");
else if (BARRIER_P (insn))
fprintf (dump_file, "SMS loop-with-barrier\n");
+ else if (FIND_REG_INC_NOTE (insn, NULL_RTX) != 0)
+ fprintf (dump_file, "SMS reg inc\n");
else
fprintf (dump_file, "SMS loop-with-not-single-set\n");
print_rtl_single (dump_file, insn);