Commit 88366b18 by Maxim Kuvyrkov Committed by Maxim Kuvyrkov

Fix INSN_TICK heuristic for SCHED_PRESSURE

	* haifa-sched.c (rank_for_schedule): Fix INSN_TICK-based heuristics.

From-SVN: r213708
parent 81051ff6
2014-08-07 Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>
* haifa-sched.c (rank_for_schedule): Fix INSN_TICK-based heuristics.
2014-08-07 Ilya Tocar <ilya.tocar@intel.com> 2014-08-07 Ilya Tocar <ilya.tocar@intel.com>
* config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Fix * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Fix
......
...@@ -2584,14 +2584,11 @@ rank_for_schedule (const void *x, const void *y) ...@@ -2584,14 +2584,11 @@ rank_for_schedule (const void *x, const void *y)
} }
if (sched_pressure != SCHED_PRESSURE_NONE if (sched_pressure != SCHED_PRESSURE_NONE
&& (INSN_TICK (tmp2) > clock_var || INSN_TICK (tmp) > clock_var)) && (INSN_TICK (tmp2) > clock_var || INSN_TICK (tmp) > clock_var)
&& INSN_TICK (tmp2) != INSN_TICK (tmp))
{ {
if (INSN_TICK (tmp) <= clock_var) diff = INSN_TICK (tmp) - INSN_TICK (tmp2);
return -1; return diff;
else if (INSN_TICK (tmp2) <= clock_var)
return 1;
else
return INSN_TICK (tmp) - INSN_TICK (tmp2);
} }
/* If we are doing backtracking in this schedule, prefer insns that /* If we are doing backtracking in this schedule, prefer insns that
...@@ -2676,10 +2673,9 @@ rank_for_schedule (const void *x, const void *y) ...@@ -2676,10 +2673,9 @@ rank_for_schedule (const void *x, const void *y)
} }
/* Prefer instructions that occur earlier in the model schedule. */ /* Prefer instructions that occur earlier in the model schedule. */
if (sched_pressure == SCHED_PRESSURE_MODEL) if (sched_pressure == SCHED_PRESSURE_MODEL
&& INSN_BB (tmp) == target_bb && INSN_BB (tmp2) == target_bb)
{ {
int diff;
diff = model_index (tmp) - model_index (tmp2); diff = model_index (tmp) - model_index (tmp2);
if (diff != 0) if (diff != 0)
return diff; return diff;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment