Now that the dust has settled, dump the per-block insn account.

Tested on ppc64le Linux.

gcc/ChangeLog:

        * tree-ssa-threadbackward.cc
        (back_threader_profitability::possibly_profitable_path_p): Dump
        each block's insn count.
---
 gcc/tree-ssa-threadbackward.cc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gcc/tree-ssa-threadbackward.cc b/gcc/tree-ssa-threadbackward.cc
index dd53c99db96..1acf6a6d343 100644
--- a/gcc/tree-ssa-threadbackward.cc
+++ b/gcc/tree-ssa-threadbackward.cc
@@ -754,6 +754,10 @@ back_threader_profitability::possibly_profitable_path_p
       for (unsigned j = 0; j < m_path.length (); j++)
        {
          fprintf (dump_file, " bb:%i", m_path[j]->index);
+         /* The last block on the path is not copied, so it has no
+            count of its own.  */
+         if (j + 1 < m_path.length ())
+           fprintf (dump_file, " (%i insns)", m_unwind[j + 1].bb_insns);
          if (loop->latch == m_path[j])
            fprintf (dump_file, " (latch)");
        }
-- 
2.53.0

Reply via email to