aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorclyon <clyon@138bc75d-0d04-0410-961f-82ee72b054a4>2016-04-01 17:35:12 +0000
committerclyon <clyon@138bc75d-0d04-0410-961f-82ee72b054a4>2016-04-01 17:35:12 +0000
commit8c3c5516a0998fbac6560b928dbcf29657f22183 (patch)
tree8234188157d6854f52cc2cef0fd1e0b147673c1b
parentefeb18ee8105abda9b117fed45f1c0636d0270e0 (diff)
Backport from mainline r230088
2015-11-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com> PR rtl-optimization/68236 * haifa-sched.c (autopref_multipass_dfa_lookahead_guard): Return 0 if insn_queue doesn't exist. (haifa_sched_finish): Reset insn_queue to NULL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-5-branch@234680 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/haifa-sched.c6
2 files changed, 15 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b2f8dd2b64e..14c6c56c178 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,13 @@
+2016-01-04 Christophe Lyon <christophe.lyon@linaro.org>
+
+ Backport from mainline
+ 2015-11-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ PR rtl-optimization/68236
+ * haifa-sched.c (autopref_multipass_dfa_lookahead_guard): Return 0
+ if insn_queue doesn't exist.
+ (haifa_sched_finish): Reset insn_queue to NULL.
+
2016-04-01 James Greenhalgh <james.greenhalgh@arm.com>
Backport from mainline
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c
index ad2450b7da1..61bfe941a38 100644
--- a/gcc/haifa-sched.c
+++ b/gcc/haifa-sched.c
@@ -5691,7 +5691,10 @@ autopref_multipass_dfa_lookahead_guard (rtx_insn *insn1, int ready_index)
{
int r = 0;
- if (PARAM_VALUE (PARAM_SCHED_AUTOPREF_QUEUE_DEPTH) <= 0)
+ /* Exit early if the param forbids this or if we're not entering here through
+ normal haifa scheduling. This can happen if selective scheduling is
+ explicitly enabled. */
+ if (!insn_queue || PARAM_VALUE (PARAM_SCHED_AUTOPREF_QUEUE_DEPTH) <= 0)
return 0;
if (sched_verbose >= 2 && ready_index == 0)
@@ -7369,6 +7372,7 @@ haifa_sched_finish (void)
sched_deps_finish ();
sched_finish_luids ();
current_sched_info = NULL;
+ insn_queue = NULL;
sched_finish ();
}