On Sat, Jun 01, 2013 at 10:11:24AM +0200, Jakub Jelinek wrote: > On Sat, Jun 01, 2013 at 08:39:58AM +0400, Dinar Temirbulatov wrote: > > I am investigating the problem. > > I'd guess you don't want to flush on DEBUG_INSN_Ps, because then you'd flush > differently between -g and -g0. So perhaps something like:
Now bootstrapped/regtested on x86_64-linux and i686-linux. I see you've already reverted in the mean time, so ok for trunk this way? 2013-06-01 Jakub Jelinek <ja...@redhat.com> PR rtl-optimization/57268 * sched-deps.c (sched_analyze_2): Don't flush_pedning_lists if DEBUG_INSN_P (insn). Reapply 2013-05-31 Dinar Temirbulatov <di...@kugelworks.com> PR rtl-optimization/57268 * sched-deps.c (sched_analyze_2): Flush dependence lists if the sum of the read and write lists exceeds MAX_PENDING_LIST_LENGTH. --- gcc/sched-deps.c (revision 199576) +++ gcc/sched-deps.c (revision 199575) @@ -2690,8 +2690,15 @@ /* Always add these dependencies to pending_reads, since this insn may be followed by a write. */ - if (!deps->readonly) - add_insn_mem_dependence (deps, true, insn, x); + if (!deps->readonly) + { + if ((deps->pending_read_list_length + + deps->pending_write_list_length) + > MAX_PENDING_LIST_LENGTH + && !DEBUG_INSN_P (insn)) + flush_pending_lists (deps, insn, true, true); + add_insn_mem_dependence (deps, true, insn, x); + } sched_analyze_2 (deps, XEXP (x, 0), insn); Jakub