Fix INSN_TICK heuristic for SCHED_PRESSURE
* haifa-sched.c (rank_for_schedule): Fix INSN_TICK-based heuristics. From-SVN: r213708
This commit is contained in:
parent
81051ff669
commit
88366b18d6
|
@ -1,3 +1,7 @@
|
|||
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>
|
||||
|
||||
* config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Fix
|
||||
|
|
|
@ -2584,14 +2584,11 @@ rank_for_schedule (const void *x, const void *y)
|
|||
}
|
||||
|
||||
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)
|
||||
return -1;
|
||||
else if (INSN_TICK (tmp2) <= clock_var)
|
||||
return 1;
|
||||
else
|
||||
return INSN_TICK (tmp) - INSN_TICK (tmp2);
|
||||
diff = INSN_TICK (tmp) - INSN_TICK (tmp2);
|
||||
return diff;
|
||||
}
|
||||
|
||||
/* If we are doing backtracking in this schedule, prefer insns that
|
||||
|
@ -2676,10 +2673,9 @@ rank_for_schedule (const void *x, const void *y)
|
|||
}
|
||||
|
||||
/* 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);
|
||||
if (diff != 0)
|
||||
return diff;
|
||||
|
|
Loading…
Reference in New Issue