summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authordinar <dinar@138bc75d-0d04-0410-961f-82ee72b054a4>2013-05-31 23:20:17 +0000
committerdinar <dinar@138bc75d-0d04-0410-961f-82ee72b054a4>2013-05-31 23:20:17 +0000
commit62c26259f5b0a7b9ea5a6bd3f1c926c27354f262 (patch)
treeedd8376734de32bbfe9406a6aae957335d439222 /gcc
parent895df15c1029465a5aa638bd1ee86ab52016dc40 (diff)
downloadgcc-62c26259f5b0a7b9ea5a6bd3f1c926c27354f262.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@199564 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/sched-deps.c10
2 files changed, 14 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 0dbe13ae2bb..39f24a65819 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c
index c7ef1d8e67e..190fd4eb4bf 100644
--- a/gcc/sched-deps.c
+++ b/gcc/sched-deps.c
@@ -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);