From 3162fdf4d2340687b647e86fa949925fd02d8ff4 Mon Sep 17 00:00:00 2001 From: Maxim Kuvyrkov Date: Fri, 15 Apr 2011 10:03:46 +0000 Subject: [PATCH] m68k.c (m68k_sched_variable_issue): Handle -fsched-pressure. * config/m68k/m68k.c (m68k_sched_variable_issue): Handle -fsched-pressure. From-SVN: r172481 --- gcc/ChangeLog | 5 +++++ gcc/config/m68k/m68k.c | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3eb95e437d6..b30b8176d28 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-04-15 Maxim Kuvyrkov + + * config/m68k/m68k.c (m68k_sched_variable_issue): Handle + -fsched-pressure. + 2011-04-15 Georg-Johann Lay * config/avr/avr.md ("rotl3",mode=HIDI): Use match_dup diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c index 3953d01578c..654c0e5cfbc 100644 --- a/gcc/config/m68k/m68k.c +++ b/gcc/config/m68k/m68k.c @@ -6128,7 +6128,14 @@ m68k_sched_variable_issue (FILE *sched_dump ATTRIBUTE_UNUSED, gcc_unreachable (); } - gcc_assert (insn_size <= sched_ib.filled); + if (insn_size > sched_ib.filled) + /* Scheduling for register pressure does not always take DFA into + account. Workaround instruction buffer not being filled enough. */ + { + gcc_assert (sched_pressure_p); + insn_size = sched_ib.filled; + } + --can_issue_more; } else if (GET_CODE (PATTERN (insn)) == ASM_INPUT -- 2.30.2