Commit 2e02044a by Herman A.J. ten Brugge Committed by Jeff Law

* reorg.c (dbr_schedule) Print more statistics. Corrected

        problem when printing info when 3 delay slots are filled.

From-SVN: r30687
parent 866aed9e
1999-11-28 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
* reorg.c (dbr_schedule) Print more statistics. Corrected
problem when printing info when 3 delay slots are filled.
1999-11-28 Jakub Jelinek <jakub@redhat.com>
* combine.c (setup_incoming_promotions): Pass an outgoing
......
......@@ -3623,6 +3623,8 @@ dbr_schedule (first, file)
if (file)
{
register int i, j, need_comma;
int total_delay_slots[MAX_DELAY_HISTOGRAM + 1];
int total_annul_slots[MAX_DELAY_HISTOGRAM + 1];
for (reorg_pass_number = 0;
reorg_pass_number < MAX_REORG_PASSES;
......@@ -3637,7 +3639,7 @@ dbr_schedule (first, file)
fprintf (file, ";; %d insns needing delay slots\n;; ",
num_insns_needing_delays[i][reorg_pass_number]);
for (j = 0; j < MAX_DELAY_HISTOGRAM; j++)
for (j = 0; j < MAX_DELAY_HISTOGRAM + 1; j++)
if (num_filled_delays[i][j][reorg_pass_number])
{
if (need_comma)
......@@ -3649,6 +3651,58 @@ dbr_schedule (first, file)
fprintf (file, "\n");
}
}
bzero ((char *) total_delay_slots, sizeof total_delay_slots);
bzero ((char *) total_annul_slots, sizeof total_annul_slots);
for (insn = first; insn; insn = NEXT_INSN (insn))
{
if (! INSN_DELETED_P (insn)
&& GET_CODE (insn) == INSN
&& GET_CODE (PATTERN (insn)) != USE
&& GET_CODE (PATTERN (insn)) != CLOBBER)
{
if (GET_CODE (PATTERN (insn)) == SEQUENCE)
{
j = XVECLEN (PATTERN (insn), 0) - 1;
if (j > MAX_DELAY_HISTOGRAM)
j = MAX_DELAY_HISTOGRAM;
if (INSN_ANNULLED_BRANCH_P (XVECEXP (PATTERN (insn), 0, 0)))
total_annul_slots[j]++;
else
total_delay_slots[j]++;
}
else if (num_delay_slots (insn) > 0)
total_delay_slots[0]++;
}
}
fprintf (file, ";; Reorg totals: ");
need_comma = 0;
for (j = 0; j < MAX_DELAY_HISTOGRAM + 1; j++)
{
if (total_delay_slots[j])
{
if (need_comma)
fprintf (file, ", ");
need_comma = 1;
fprintf (file, "%d got %d delays", total_delay_slots[j], j);
}
}
fprintf (file, "\n");
#if defined (ANNUL_IFTRUE_SLOTS) || defined (ANNUL_IFFALSE_SLOTS)
fprintf (file, ";; Reorg annuls: ");
need_comma = 0;
for (j = 0; j < MAX_DELAY_HISTOGRAM + 1; j++)
{
if (total_annul_slots[j])
{
if (need_comma)
fprintf (file, ", ");
need_comma = 1;
fprintf (file, "%d got %d delays", total_annul_slots[j], j);
}
}
fprintf (file, "\n");
#endif
fprintf (file, "\n");
}
/* For all JUMP insns, fill in branch prediction notes, so that during
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment