On 09/20/2012 07:42 PM, H.J. Lu wrote: > On Fri, Aug 3, 2012 at 5:05 AM, Bernd Schmidt <ber...@codesourcery.com> wrote: >> This patch allows us to change >> >> rn++ >> rm=[rn] >> >> into >> >> rm=[rn + 4] >> rn++ >> > This caused: > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54645
The jury is still out on that, but it did cause PR54643. This seems to be some kind of interaction with the new SCHED_PRESSURE_MODEL code. For now it seems best to just disable the new optimization if scheduling for pressure. It will still trigger during sched2. I've bootstrapped the following on x86_64-linux and verified that the arm build gets further (it now fails in libbacktrace). Committed. Bernd
Index: gcc/ChangeLog =================================================================== --- gcc/ChangeLog (revision 191592) +++ gcc/ChangeLog (working copy) @@ -1,3 +1,9 @@ +2012-09-20 Bernd Schmidt <ber...@codesourcery.com> + + PR bootstrap/54643 + * haifa-sched.c (schedule_block): Skip find_modifiable_mems if using + SCHED_PRESSURE_MODEL. + 2012-09-20 Joern Rennecke <joern.renne...@embecosm.com> * rtlanal.c (dead_or_set_regno_p): Fix COND_EXEC handling. Index: gcc/haifa-sched.c =================================================================== --- gcc/haifa-sched.c (revision 191582) +++ gcc/haifa-sched.c (working copy) @@ -5854,7 +5854,8 @@ schedule_block (basic_block *target_bb) rtx head = NEXT_INSN (prev_head); rtx tail = PREV_INSN (next_tail); - if ((current_sched_info->flags & DONT_BREAK_DEPENDENCIES) == 0) + if ((current_sched_info->flags & DONT_BREAK_DEPENDENCIES) == 0 + && sched_pressure != SCHED_PRESSURE_MODEL) find_modifiable_mems (head, tail); /* We used to have code to avoid getting parameters moved from hard