diff options
author | Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl> | 1999-11-28 21:05:50 +0100 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1999-11-28 13:05:50 -0700 |
commit | 2e02044af4bc83dd1bfcaf0c8f881eb6d9f73ded (patch) | |
tree | 7053d868ecffceb6bdd234d3e1f14b51d6d40439 /gcc | |
parent | 866aed9e46a1011944c3a8c2f8f5390f7b06d10f (diff) | |
download | gcc-2e02044af4bc83dd1bfcaf0c8f881eb6d9f73ded.zip gcc-2e02044af4bc83dd1bfcaf0c8f881eb6d9f73ded.tar.gz gcc-2e02044af4bc83dd1bfcaf0c8f881eb6d9f73ded.tar.bz2 |
* reorg.c (dbr_schedule) Print more statistics. Corrected
problem when printing info when 3 delay slots are filled.
From-SVN: r30687
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/reorg.c | 56 |
2 files changed, 60 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1dbf312..4428e5d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +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 diff --git a/gcc/reorg.c b/gcc/reorg.c index 1ba5feb..de4c6ac 100644 --- a/gcc/reorg.c +++ b/gcc/reorg.c @@ -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 |