sel-sched.c (calculate_new_fences): New parameter ptime.

* sel-sched.c (calculate_new_fences): New parameter ptime.
        Calculate it as a maximum over all fence cycles.
        (sel_sched_region_2): Adjust the call to calculate_new_fences.
        Print the final schedule timing when sched_verbose.

From-SVN: r208110
This commit is contained in:
Andrey Belevantsev 2014-02-25 10:41:08 +04:00 committed by Andrey Belevantsev
parent c1c99405c1
commit 41b2d514d0
2 changed files with 23 additions and 9 deletions

View File

@ -1,3 +1,10 @@
2014-02-25 Andrey Belevantsev <abel@ispras.ru>
* sel-sched.c (calculate_new_fences): New parameter ptime.
Calculate it as a maximum over all fence cycles.
(sel_sched_region_2): Adjust the call to calculate_new_fences.
Print the final schedule timing when sched_verbose.
2014-02-25 Andrey Belevantsev <abel@ispras.ru>
PR rtl-optimization/60292

View File

@ -7467,12 +7467,13 @@ find_min_max_seqno (flist_t fences, int *min_seqno, int *max_seqno)
}
}
/* Calculate new fences from FENCES. */
/* Calculate new fences from FENCES. Write the current time to PTIME. */
static flist_t
calculate_new_fences (flist_t fences, int orig_max_seqno)
calculate_new_fences (flist_t fences, int orig_max_seqno, int *ptime)
{
flist_t old_fences = fences;
struct flist_tail_def _new_fences, *new_fences = &_new_fences;
int max_time = 0;
flist_tail_init (new_fences);
for (; fences; fences = FLIST_NEXT (fences))
@ -7501,9 +7502,11 @@ calculate_new_fences (flist_t fences, int orig_max_seqno)
}
else
extract_new_fences_from (fences, new_fences, orig_max_seqno);
max_time = MAX (max_time, FENCE_CYCLE (fence));
}
flist_clear (&old_fences);
*ptime = max_time;
return FLIST_TAIL_HEAD (new_fences);
}
@ -7558,6 +7561,7 @@ static void
sel_sched_region_2 (int orig_max_seqno)
{
int highest_seqno_in_use = orig_max_seqno;
int max_time = 0;
stat_bookkeeping_copies = 0;
stat_insns_needed_bookkeeping = 0;
@ -7573,19 +7577,22 @@ sel_sched_region_2 (int orig_max_seqno)
find_min_max_seqno (fences, &min_seqno, &max_seqno);
schedule_on_fences (fences, max_seqno, &scheduled_insns_tailp);
fences = calculate_new_fences (fences, orig_max_seqno);
fences = calculate_new_fences (fences, orig_max_seqno, &max_time);
highest_seqno_in_use = update_seqnos_and_stage (min_seqno, max_seqno,
highest_seqno_in_use,
&scheduled_insns);
}
if (sched_verbose >= 1)
sel_print ("Scheduled %d bookkeeping copies, %d insns needed "
"bookkeeping, %d insns renamed, %d insns substituted\n",
stat_bookkeeping_copies,
stat_insns_needed_bookkeeping,
stat_renamed_scheduled,
stat_substitutions_total);
{
sel_print ("Total scheduling time: %d cycles\n", max_time);
sel_print ("Scheduled %d bookkeeping copies, %d insns needed "
"bookkeeping, %d insns renamed, %d insns substituted\n",
stat_bookkeeping_copies,
stat_insns_needed_bookkeeping,
stat_renamed_scheduled,
stat_substitutions_total);
}
}
/* Schedule a region. When pipelining, search for possibly never scheduled