diff options
author | Ghassan Shobaki <ghassan.shobaki@amd.com> | 2009-07-13 22:42:41 +0000 |
---|---|---|
committer | Ghassan Shobaki <gshobaki@gcc.gnu.org> | 2009-07-13 22:42:41 +0000 |
commit | ee4764a88be649f2d18685a229531a595b2e025d (patch) | |
tree | c7a87beae76242d4de327015672f1d1de55e0afe /gcc/haifa-sched.c | |
parent | 05682af89f0ed47428f1c9e81357c87b22d04271 (diff) | |
download | gcc-ee4764a88be649f2d18685a229531a595b2e025d.zip gcc-ee4764a88be649f2d18685a229531a595b2e025d.tar.gz gcc-ee4764a88be649f2d18685a229531a595b2e025d.tar.bz2 |
2009-07-13 Ghassan Shobaki <ghassan.shobaki@amd.com>
* haifa-sched.c
(rank_for_schedule): Introduced flags to enable/disable
individual scheduling heuristics.
* common.opt: Introduced flags to enable/disable
individual heuristics in the scheduler.
* doc/invoke.texi: Introduced flags to enable/disable
individual heuristics in the scheduler.
From-SVN: r149603
Diffstat (limited to 'gcc/haifa-sched.c')
-rw-r--r-- | gcc/haifa-sched.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c index 66be7e5..95cbfc1 100644 --- a/gcc/haifa-sched.c +++ b/gcc/haifa-sched.c @@ -890,7 +890,8 @@ rank_for_schedule (const void *x, const void *y) int val, priority_val, weight_val, info_val; /* The insn in a schedule group should be issued the first. */ - if (SCHED_GROUP_P (tmp) != SCHED_GROUP_P (tmp2)) + if (flag_sched_group_heuristic && + SCHED_GROUP_P (tmp) != SCHED_GROUP_P (tmp2)) return SCHED_GROUP_P (tmp2) ? 1 : -1; /* Make sure that priority of TMP and TMP2 are initialized. */ @@ -899,11 +900,11 @@ rank_for_schedule (const void *x, const void *y) /* Prefer insn with higher priority. */ priority_val = INSN_PRIORITY (tmp2) - INSN_PRIORITY (tmp); - if (priority_val) + if (flag_sched_critical_path_heuristic && priority_val) return priority_val; /* Prefer speculative insn with greater dependencies weakness. */ - if (spec_info) + if (flag_sched_spec_insn_heuristic && spec_info) { ds_t ds1, ds2; dw_t dw1, dw2; @@ -927,16 +928,16 @@ rank_for_schedule (const void *x, const void *y) } /* Prefer an insn with smaller contribution to registers-pressure. */ - if (!reload_completed && + if (flag_sched_reg_pressure_heuristic && !reload_completed && (weight_val = INSN_REG_WEIGHT (tmp) - INSN_REG_WEIGHT (tmp2))) return weight_val; info_val = (*current_sched_info->rank) (tmp, tmp2); - if (info_val) + if(flag_sched_rank_heuristic && info_val) return info_val; /* Compare insns based on their relation to the last-scheduled-insn. */ - if (INSN_P (last_scheduled_insn)) + if (flag_sched_last_insn_heuristic && INSN_P (last_scheduled_insn)) { dep_t dep1; dep_t dep2; @@ -977,7 +978,7 @@ rank_for_schedule (const void *x, const void *y) val = (sd_lists_size (tmp2, SD_LIST_FORW) - sd_lists_size (tmp, SD_LIST_FORW)); - if (val != 0) + if (flag_sched_dep_count_heuristic && val != 0) return val; /* If insns are equally good, sort by INSN_LUID (original insn order), |