As mentioned in an earlier commit, the dump messages in
adjust_one_path are a bit off.  Clean them up as follows:

"adjusting first edge after MINLENGTH." prints where the candidate turned
out to be wholly a prefix of the threaded path: nothing is adjusted, the
candidate is just cancelled, and cancel_thread says so on the next line.
Drop it.

"Adjusted candidate is EMPTY" is also the reason given when
rewire_first_differing_edge fails; there the candidate isn't empty, it
just can't be rewired.  Say so.  Its other use, where the candidate
really is wholly a prefix, stays as it is.

"Dropping illformed candidate." prints on the arm where the shared
prefix is NOT chopped, because chopping would leave a one-edge
candidate.  Fix the wording.

gcc/ChangeLog:

        * tree-ssa-threadupdate.cc (back_jt_path_registry::adjust_one_path):
        Fix the dump messages.
---
 gcc/tree-ssa-threadupdate.cc | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/gcc/tree-ssa-threadupdate.cc b/gcc/tree-ssa-threadupdate.cc
index b82d5e19ac7..d5c0d2eea5d 100644
--- a/gcc/tree-ssa-threadupdate.cc
+++ b/gcc/tree-ssa-threadupdate.cc
@@ -2305,8 +2305,6 @@ back_jt_path_registry::adjust_one_path 
(vec<jump_thread_edge *> *curr_path,
      there's nothing left to do.  */
   if (j == cand_path->length ())
     {
-      if (dump_file && (dump_flags & TDF_DETAILS))
-       fprintf (dump_file, "adjusting first edge after MINLENGTH.\n");
       cancel_thread (cand_path, "Adjusted candidate is EMPTY");
       m_paths.unordered_remove (cand_path_num);
       return false;
@@ -2316,7 +2314,7 @@ back_jt_path_registry::adjust_one_path 
(vec<jump_thread_edge *> *curr_path,
      of the copy.  */
   if (!rewire_first_differing_edge (cand_path_num, j))
     {
-      cancel_thread (cand_path, "Adjusted candidate is EMPTY");
+      cancel_thread (cand_path, "Candidate could not be rewired");
       m_paths.unordered_remove (cand_path_num);
       return false;
     }
@@ -2326,7 +2324,7 @@ back_jt_path_registry::adjust_one_path 
(vec<jump_thread_edge *> *curr_path,
   if (cand_path->length () - j > 1)
     cand_path->block_remove (0, j);
   else if (dump_file && (dump_flags & TDF_DETAILS))
-    fprintf (dump_file, "Dropping illformed candidate.\n");
+    fprintf (dump_file, "Not chopping prefix: candidate would be too 
short.\n");
 
   if (dump_file && (dump_flags & TDF_DETAILS))
     {
-- 
2.53.0

Reply via email to