public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-2224] Add newline when checking path profitability.
@ 2022-08-26 16:14 Aldy Hernandez
  0 siblings, 0 replies; only message in thread
From: Aldy Hernandez @ 2022-08-26 16:14 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:79db991ece4bf9a63d13c3bce0ed974f3ef859c7

commit r13-2224-g79db991ece4bf9a63d13c3bce0ed974f3ef859c7
Author: Aldy Hernandez <aldyh@redhat.com>
Date:   Tue Aug 23 08:02:33 2022 +0200

    Add newline when checking path profitability.
    
    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.

Diff:
---
 gcc/tree-ssa-threadbackward.cc | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/gcc/tree-ssa-threadbackward.cc b/gcc/tree-ssa-threadbackward.cc
index 3218ad931ef..9725f50e639 100644
--- a/gcc/tree-ssa-threadbackward.cc
+++ b/gcc/tree-ssa-threadbackward.cc
@@ -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;
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-08-26 16:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-26 16:14 [gcc r13-2224] Add newline when checking path profitability Aldy Hernandez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).