aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>2015-11-10 09:22:58 +0000
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>2015-11-10 09:22:58 +0000
commitdf554b0e49e59c974e45ab21a3a2b4295ce348b2 (patch)
tree1fa983d36c36834a14ddd00db3fcbb63d9e12990 /gcc
parent0d20a76b28b1ea7935412f2778b250aea5d63f22 (diff)
downloadgcc-df554b0e49e59c974e45ab21a3a2b4295ce348b2.zip
gcc-df554b0e49e59c974e45ab21a3a2b4295ce348b2.tar.gz
gcc-df554b0e49e59c974e45ab21a3a2b4295ce348b2.tar.bz2
[haifa-sched] PR rtl-optimization/68236: Exit early from autoprefetcher lookahead if not in haifa sched
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. From-SVN: r230088
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/haifa-sched.c6
2 files changed, 12 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5abb84b..f9ae060 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+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.
+
2015-11-10 Robert Suchanek <robert.suchanek@imgtec.com>
* regrename.c (create_new_chain): Initialize renamed and tied_chain.
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c
index 835648b..e712110 100644
--- a/gcc/haifa-sched.c
+++ b/gcc/haifa-sched.c
@@ -5803,7 +5803,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)
@@ -7477,6 +7480,7 @@ haifa_sched_finish (void)
sched_deps_finish ();
sched_finish_luids ();
current_sched_info = NULL;
+ insn_queue = NULL;
sched_finish ();
}