summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2014-04-10 10:56:48 +1200
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2014-05-19 02:35:23 +0100
commitdbe5c3176bba7e6b9aebcd414bf1582e311fd12e (patch)
treea053e7f2d62173a500f0e200e6282c6c7c6b8f02
parent1fbaae4946a14757a01907bed43db68e7bdbaea2 (diff)
downloadgcc-linaro-dev/sched-model-prefetch.tar.gz
Use rank_for_schedule in model_order_plinaro-dev/sched-model-prefetch
-rw-r--r--gcc/haifa-sched.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c
index 01c11043a79..e00b52ab87d 100644
--- a/gcc/haifa-sched.c
+++ b/gcc/haifa-sched.c
@@ -3197,7 +3197,6 @@ static int
model_order_p (struct model_insn_info *insn1, struct model_insn_info *insn2)
{
unsigned int height1, height2;
- unsigned int priority1, priority2;
/* Prefer instructions with a higher model priority. */
if (insn1->model_priority != insn2->model_priority)
@@ -3226,13 +3225,11 @@ model_order_p (struct model_insn_info *insn1, struct model_insn_info *insn2)
/* We have no real preference between INSN1 an INSN2 as far as attempts
to reduce pressure go. Prefer instructions with higher priorities. */
- priority1 = INSN_PRIORITY (insn1->insn);
- priority2 = INSN_PRIORITY (insn2->insn);
- if (priority1 != priority2)
- return priority1 > priority2;
-
- /* Use the original rtl sequence as a tie-breaker. */
- return insn1 < insn2;
+ gcc_assert (sched_pressure == SCHED_PRESSURE_MODEL);
+ sched_pressure = SCHED_PRESSURE_NONE;
+ int res = rank_for_schedule (&insn2->insn, &insn1->insn) < 0;
+ sched_pressure = SCHED_PRESSURE_MODEL;
+ return res;
}
/* Add INSN to the model worklist immediately after PREV. Add it to the