re PR rtl-optimization/57268 (c nested loops hang compiler in sched-deps.c)
authorJakub Jelinek <jakub@redhat.com>
Mon, 3 Jun 2013 17:38:39 +0000 (19:38 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 3 Jun 2013 17:38:39 +0000 (19:38 +0200)
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  <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: r199615

gcc/ChangeLog
gcc/sched-deps.c

index d39bddc03b0bd6e8f8016d64d0471f069705a5ce..a638f796c309f150f9c16b28a0ca3c29142cc502 100644 (file)
@@ -1,3 +1,16 @@
+2013-06-03  Jakub Jelinek  <jakub@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  <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-06-03  Yuri Rumyantsev  <yuri.s.rumyantsev@intel.com>
 
        * config/i386/i386.c (ix86_lea_outperforms): Fix formatting.
index c7ef1d8e67e977729d402a1b22844cedb1fb17f4..8270d5880cf9f3d5b55137bbef097c1f10973d80 100644 (file)
@@ -2690,8 +2690,15 @@ 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
+               && !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);