re PR rtl-optimization/57268 (c nested loops hang compiler in sched-deps.c)

2013-05-31  Dinar Temirbulatov  <dinar@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.

From-SVN: r199564
This commit is contained in:
Dinar Temirbulatov 2013-05-31 23:20:17 +00:00 committed by Dinar Temirbulatov
parent dc801ca2de
commit c359d8d046
2 changed files with 14 additions and 2 deletions

View file

@ -1,3 +1,9 @@
2013-05-31 Dinar Temirbulatov <dinar@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.
2013-05-31 Eric Botcazou <ebotcazou@adacore.com>
* config/rs6000/predicates.md (rs6000_cbranch_operator): Accept some

View file

@ -2690,8 +2690,14 @@ sched_analyze_2 (struct deps_desc *deps, rtx x, rtx insn)
/* 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)
flush_pending_lists (deps, insn, true, true);
add_insn_mem_dependence (deps, true, insn, x);
}
sched_analyze_2 (deps, XEXP (x, 0), insn);