]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Add newline when checking path profitability.
authorAldy Hernandez <aldyh@redhat.com>
Tue, 23 Aug 2022 06:02:33 +0000 (08:02 +0200)
committerAldy Hernandez <aldyh@redhat.com>
Fri, 26 Aug 2022 16:12:37 +0000 (18:12 +0200)
It looks like we're missing a newline for cases where we don't print
anything.

gcc/ChangeLog:

* tree-ssa-threadbackward.cc (possibly_profitable_path_p): Always
add newline.
(profitable_path_p): Same.

gcc/tree-ssa-threadbackward.cc

index 3218ad931eff7992b8c7de7847a7a9646443ed96..9725f50e639bd68e1b51762a32a9ca7fd0984434 100644 (file)
@@ -719,7 +719,11 @@ back_threader_profitability::possibly_profitable_path_p
              gimple *stmt = gsi_stmt (gsi);
              if (gimple_call_internal_p (stmt, IFN_UNIQUE)
                  || gimple_call_builtin_p (stmt, BUILT_IN_CONSTANT_P))
-               return false;
+               {
+                 if (dump_file && (dump_flags & TDF_DETAILS))
+                   fputc ('\n', dump_file);
+                 return false;
+               }
              /* Do not count empty statements and labels.  */
              if (gimple_code (stmt) != GIMPLE_NOP
                  && !is_gimple_debug (stmt))
@@ -821,6 +825,8 @@ back_threader_profitability::possibly_profitable_path_p
                    && (m_n_insns * param_fsm_scale_path_stmts
                        >= param_max_jump_thread_duplication_stmts));
 
+  if (dump_file && (dump_flags & TDF_DETAILS))
+    fputc ('\n', dump_file);
   return true;
 }
 
@@ -947,6 +953,8 @@ back_threader_profitability::profitable_path_p (const vec<basic_block> &m_path,
                 "non-empty latch\n");
       return false;
     }
+  if (dump_file && (dump_flags & TDF_DETAILS))
+    fputc ('\n', dump_file);
   return true;
 }