aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@gmail.com>2014-10-24 08:22:37 +0000
committerMaxim Kuvyrkov <mkuvyrkov@gcc.gnu.org>2014-10-24 08:22:37 +0000
commit8aec463b10bd41bc184305458abfcc657fac4883 (patch)
tree2dd7c339f64a26b3aa525fa7ef40f0eb2fbe0ffe /gcc
parentb75ae7f422bc0c477422faae20d2195ffdeeb5df (diff)
downloadgcc-8aec463b10bd41bc184305458abfcc657fac4883.zip
gcc-8aec463b10bd41bc184305458abfcc657fac4883.tar.gz
gcc-8aec463b10bd41bc184305458abfcc657fac4883.tar.bz2
Remove cached_first_cycle_multipass_dfa_lookahead and cached_issue_rate
* haifa-sched.c (cached_first_cycle_multipass_dfa_lookahead,) (cached_issue_rate): Remove. Use dfa_lookahead and issue_rate instead. (max_issue, choose_ready, sched_init): Update. From-SVN: r216622
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/haifa-sched.c30
2 files changed, 11 insertions, 25 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 296419b..ac5f97b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,11 @@
2014-10-24 Maxim Kuvyrkov <maxim.kuvyrkov@gmail.com>
+ * haifa-sched.c (cached_first_cycle_multipass_dfa_lookahead,)
+ (cached_issue_rate): Remove. Use dfa_lookahead and issue_rate instead.
+ (max_issue, choose_ready, sched_init): Update.
+
+2014-10-24 Maxim Kuvyrkov <maxim.kuvyrkov@gmail.com>
+
* sched-int.h (struct _haifa_insn_data:last_rfs_win): New field.
* haifa-sched.c (INSN_LAST_RFS_WIN): New access macro.
(rfs_result): Set INSN_LAST_RFS_WIN. Update signature.
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c
index faf2e46..b78d697 100644
--- a/gcc/haifa-sched.c
+++ b/gcc/haifa-sched.c
@@ -5471,15 +5471,6 @@ int dfa_lookahead;
could achieve DFA_LOOKAHEAD ** N , where N is the queue length. */
static int max_lookahead_tries;
-/* The following value is value of hook
- `first_cycle_multipass_dfa_lookahead' at the last call of
- `max_issue'. */
-static int cached_first_cycle_multipass_dfa_lookahead = 0;
-
-/* The following value is value of `issue_rate' at the last call of
- `sched_init'. */
-static int cached_issue_rate = 0;
-
/* The following function returns maximal (or close to maximal) number
of insns which can be issued on the same cycle and one of which
insns is insns with the best rank (the first insn in READY). To
@@ -5508,9 +5499,8 @@ max_issue (struct ready_list *ready, int privileged_n, state_t state,
&& privileged_n <= n_ready);
/* Init MAX_LOOKAHEAD_TRIES. */
- if (cached_first_cycle_multipass_dfa_lookahead != dfa_lookahead)
+ if (max_lookahead_tries == 0)
{
- cached_first_cycle_multipass_dfa_lookahead = dfa_lookahead;
max_lookahead_tries = 100;
for (i = 0; i < issue_rate; i++)
max_lookahead_tries *= dfa_lookahead;
@@ -5673,8 +5663,6 @@ static int
choose_ready (struct ready_list *ready, bool first_cycle_insn_p,
rtx_insn **insn_ptr)
{
- int lookahead;
-
if (dbg_cnt (sched_insn) == false)
{
if (nonscheduled_insns_begin == NULL_RTX)
@@ -5695,11 +5683,7 @@ choose_ready (struct ready_list *ready, bool first_cycle_insn_p,
return -1;
}
- lookahead = 0;
-
- if (targetm.sched.first_cycle_multipass_dfa_lookahead)
- lookahead = targetm.sched.first_cycle_multipass_dfa_lookahead ();
- if (lookahead <= 0 || SCHED_GROUP_P (ready_element (ready, 0))
+ if (dfa_lookahead <= 0 || SCHED_GROUP_P (ready_element (ready, 0))
|| DEBUG_INSN_P (ready_element (ready, 0)))
{
if (targetm.sched.dispatch (NULL, IS_DISPATCH_ON))
@@ -6879,18 +6863,14 @@ sched_init (void)
else
issue_rate = 1;
- if (cached_issue_rate != issue_rate)
- {
- cached_issue_rate = issue_rate;
- /* To invalidate max_lookahead_tries: */
- cached_first_cycle_multipass_dfa_lookahead = 0;
- }
-
if (targetm.sched.first_cycle_multipass_dfa_lookahead)
dfa_lookahead = targetm.sched.first_cycle_multipass_dfa_lookahead ();
else
dfa_lookahead = 0;
+ /* Set to "0" so that we recalculate. */
+ max_lookahead_tries = 0;
+
if (targetm.sched.init_dfa_pre_cycle_insn)
targetm.sched.init_dfa_pre_cycle_insn ();