public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/marxin/heads/loop-unswitch-improvement-v7)] Use dump_printf_loc.
@ 2021-12-07 16:50 Martin Liska
  0 siblings, 0 replies; 4+ messages in thread
From: Martin Liska @ 2021-12-07 16:50 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:d34ba1093d05473b3dcb9fa26fb8263d42713e98

commit d34ba1093d05473b3dcb9fa26fb8263d42713e98
Author: Martin Liska <mliska@suse.cz>
Date:   Tue Dec 7 16:19:47 2021 +0100

    Use dump_printf_loc.

Diff:
---
 gcc/tree-ssa-loop-unswitch.c | 27 +++++++++++----------------
 1 file changed, 11 insertions(+), 16 deletions(-)

diff --git a/gcc/tree-ssa-loop-unswitch.c b/gcc/tree-ssa-loop-unswitch.c
index 3de93925a10..f39f0e3311e 100644
--- a/gcc/tree-ssa-loop-unswitch.c
+++ b/gcc/tree-ssa-loop-unswitch.c
@@ -819,9 +819,9 @@ tree_unswitch_single_loop (class loop *loop, int num,
   basic_block bb = NULL;
   if (num > param_max_unswitch_level)
     {
-      if (dump_file
-	  && (dump_flags & TDF_DETAILS))
-	fprintf (dump_file, ";; Not unswitching anymore, hit max level\n");
+      if (dump_enabled_p ())
+	dump_printf_loc (MSG_MISSED_OPTIMIZATION, loc,
+			 "Not unswitching anymore, hit max level\n");
       goto exit;
     }
 
@@ -848,13 +848,10 @@ tree_unswitch_single_loop (class loop *loop, int num,
 	      budget -= cost;
 	      break;
 	    }
-	  else if (dump_file && (dump_flags & TDF_DETAILS))
-	    {
-	      fprintf (dump_file, ";; Not unswitching condition, cost too big "
-		       "(%d insns): ", cost);
-	      print_generic_expr (dump_file, pred->condition);
-	      fprintf (dump_file, "\n");
-	    }
+	  else if (dump_enabled_p ())
+	    dump_printf_loc (MSG_MISSED_OPTIMIZATION, loc,
+			     "Not unswitching condition, cost too big "
+			     "(%d insns)\n", cost);
 	}
     }
 
@@ -863,12 +860,10 @@ tree_unswitch_single_loop (class loop *loop, int num,
       if (!dbg_cnt (loop_unswitch))
 	goto exit;
 
-      if (dump_file && (dump_flags & TDF_DETAILS))
-	{
-	  fprintf (dump_file, ";; Unswitching loop on condition: ");
-	  print_generic_expr (dump_file, predicate->condition);
-	  fprintf (dump_file, "\n");
-	}
+      if (dump_enabled_p ())
+	dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, loc,
+			 "Unswitching loop on condition: %T\n",
+			 predicate->condition);
 
       predicate->handled = true;
       initialize_original_copy_tables ();


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [gcc(refs/users/marxin/heads/loop-unswitch-improvement-v7)] Use dump_printf_loc.
@ 2021-12-09 12:48 Martin Liska
  0 siblings, 0 replies; 4+ messages in thread
From: Martin Liska @ 2021-12-09 12:48 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:890edf89dd940b3081b34f9bfee163402d27c875

commit 890edf89dd940b3081b34f9bfee163402d27c875
Author: Martin Liska <mliska@suse.cz>
Date:   Tue Dec 7 16:19:47 2021 +0100

    Use dump_printf_loc.

Diff:
---
 gcc/tree-ssa-loop-unswitch.c | 27 +++++++++++----------------
 1 file changed, 11 insertions(+), 16 deletions(-)

diff --git a/gcc/tree-ssa-loop-unswitch.c b/gcc/tree-ssa-loop-unswitch.c
index 33fd7bad6d9..6e25eb703fe 100644
--- a/gcc/tree-ssa-loop-unswitch.c
+++ b/gcc/tree-ssa-loop-unswitch.c
@@ -820,9 +820,9 @@ tree_unswitch_single_loop (class loop *loop, int num,
   basic_block bb = NULL;
   if (num > param_max_unswitch_level)
     {
-      if (dump_file
-	  && (dump_flags & TDF_DETAILS))
-	fprintf (dump_file, ";; Not unswitching anymore, hit max level\n");
+      if (dump_enabled_p ())
+	dump_printf_loc (MSG_MISSED_OPTIMIZATION, loc,
+			 "Not unswitching anymore, hit max level\n");
       goto exit;
     }
 
@@ -849,13 +849,10 @@ tree_unswitch_single_loop (class loop *loop, int num,
 	      budget -= cost;
 	      break;
 	    }
-	  else if (dump_file && (dump_flags & TDF_DETAILS))
-	    {
-	      fprintf (dump_file, ";; Not unswitching condition, cost too big "
-		       "(%d insns): ", cost);
-	      print_generic_expr (dump_file, pred->condition);
-	      fprintf (dump_file, "\n");
-	    }
+	  else if (dump_enabled_p ())
+	    dump_printf_loc (MSG_MISSED_OPTIMIZATION, loc,
+			     "Not unswitching condition, cost too big "
+			     "(%d insns)\n", cost);
 	}
     }
 
@@ -864,12 +861,10 @@ tree_unswitch_single_loop (class loop *loop, int num,
       if (!dbg_cnt (loop_unswitch))
 	goto exit;
 
-      if (dump_file && (dump_flags & TDF_DETAILS))
-	{
-	  fprintf (dump_file, ";; Unswitching loop on condition: ");
-	  print_generic_expr (dump_file, predicate->condition);
-	  fprintf (dump_file, "\n");
-	}
+      if (dump_enabled_p ())
+	dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, loc,
+			 "Unswitching loop on condition: %T\n",
+			 predicate->condition);
 
       predicate->handled = true;
       initialize_original_copy_tables ();


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [gcc(refs/users/marxin/heads/loop-unswitch-improvement-v7)] Use dump_printf_loc.
@ 2021-12-08 18:26 Martin Liska
  0 siblings, 0 replies; 4+ messages in thread
From: Martin Liska @ 2021-12-08 18:26 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:0b06ff23f89fb9c1f0af6ca868ffed6982a21e16

commit 0b06ff23f89fb9c1f0af6ca868ffed6982a21e16
Author: Martin Liska <mliska@suse.cz>
Date:   Tue Dec 7 16:19:47 2021 +0100

    Use dump_printf_loc.

Diff:
---
 gcc/tree-ssa-loop-unswitch.c | 27 +++++++++++----------------
 1 file changed, 11 insertions(+), 16 deletions(-)

diff --git a/gcc/tree-ssa-loop-unswitch.c b/gcc/tree-ssa-loop-unswitch.c
index 33fd7bad6d9..6e25eb703fe 100644
--- a/gcc/tree-ssa-loop-unswitch.c
+++ b/gcc/tree-ssa-loop-unswitch.c
@@ -820,9 +820,9 @@ tree_unswitch_single_loop (class loop *loop, int num,
   basic_block bb = NULL;
   if (num > param_max_unswitch_level)
     {
-      if (dump_file
-	  && (dump_flags & TDF_DETAILS))
-	fprintf (dump_file, ";; Not unswitching anymore, hit max level\n");
+      if (dump_enabled_p ())
+	dump_printf_loc (MSG_MISSED_OPTIMIZATION, loc,
+			 "Not unswitching anymore, hit max level\n");
       goto exit;
     }
 
@@ -849,13 +849,10 @@ tree_unswitch_single_loop (class loop *loop, int num,
 	      budget -= cost;
 	      break;
 	    }
-	  else if (dump_file && (dump_flags & TDF_DETAILS))
-	    {
-	      fprintf (dump_file, ";; Not unswitching condition, cost too big "
-		       "(%d insns): ", cost);
-	      print_generic_expr (dump_file, pred->condition);
-	      fprintf (dump_file, "\n");
-	    }
+	  else if (dump_enabled_p ())
+	    dump_printf_loc (MSG_MISSED_OPTIMIZATION, loc,
+			     "Not unswitching condition, cost too big "
+			     "(%d insns)\n", cost);
 	}
     }
 
@@ -864,12 +861,10 @@ tree_unswitch_single_loop (class loop *loop, int num,
       if (!dbg_cnt (loop_unswitch))
 	goto exit;
 
-      if (dump_file && (dump_flags & TDF_DETAILS))
-	{
-	  fprintf (dump_file, ";; Unswitching loop on condition: ");
-	  print_generic_expr (dump_file, predicate->condition);
-	  fprintf (dump_file, "\n");
-	}
+      if (dump_enabled_p ())
+	dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, loc,
+			 "Unswitching loop on condition: %T\n",
+			 predicate->condition);
 
       predicate->handled = true;
       initialize_original_copy_tables ();


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [gcc(refs/users/marxin/heads/loop-unswitch-improvement-v7)] Use dump_printf_loc.
@ 2021-12-08 10:17 Martin Liska
  0 siblings, 0 replies; 4+ messages in thread
From: Martin Liska @ 2021-12-08 10:17 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:02a75f59389ec71de387a7584bcb000433c8addf

commit 02a75f59389ec71de387a7584bcb000433c8addf
Author: Martin Liska <mliska@suse.cz>
Date:   Tue Dec 7 16:19:47 2021 +0100

    Use dump_printf_loc.

Diff:
---
 gcc/tree-ssa-loop-unswitch.c | 27 +++++++++++----------------
 1 file changed, 11 insertions(+), 16 deletions(-)

diff --git a/gcc/tree-ssa-loop-unswitch.c b/gcc/tree-ssa-loop-unswitch.c
index 3de93925a10..f39f0e3311e 100644
--- a/gcc/tree-ssa-loop-unswitch.c
+++ b/gcc/tree-ssa-loop-unswitch.c
@@ -819,9 +819,9 @@ tree_unswitch_single_loop (class loop *loop, int num,
   basic_block bb = NULL;
   if (num > param_max_unswitch_level)
     {
-      if (dump_file
-	  && (dump_flags & TDF_DETAILS))
-	fprintf (dump_file, ";; Not unswitching anymore, hit max level\n");
+      if (dump_enabled_p ())
+	dump_printf_loc (MSG_MISSED_OPTIMIZATION, loc,
+			 "Not unswitching anymore, hit max level\n");
       goto exit;
     }
 
@@ -848,13 +848,10 @@ tree_unswitch_single_loop (class loop *loop, int num,
 	      budget -= cost;
 	      break;
 	    }
-	  else if (dump_file && (dump_flags & TDF_DETAILS))
-	    {
-	      fprintf (dump_file, ";; Not unswitching condition, cost too big "
-		       "(%d insns): ", cost);
-	      print_generic_expr (dump_file, pred->condition);
-	      fprintf (dump_file, "\n");
-	    }
+	  else if (dump_enabled_p ())
+	    dump_printf_loc (MSG_MISSED_OPTIMIZATION, loc,
+			     "Not unswitching condition, cost too big "
+			     "(%d insns)\n", cost);
 	}
     }
 
@@ -863,12 +860,10 @@ tree_unswitch_single_loop (class loop *loop, int num,
       if (!dbg_cnt (loop_unswitch))
 	goto exit;
 
-      if (dump_file && (dump_flags & TDF_DETAILS))
-	{
-	  fprintf (dump_file, ";; Unswitching loop on condition: ");
-	  print_generic_expr (dump_file, predicate->condition);
-	  fprintf (dump_file, "\n");
-	}
+      if (dump_enabled_p ())
+	dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, loc,
+			 "Unswitching loop on condition: %T\n",
+			 predicate->condition);
 
       predicate->handled = true;
       initialize_original_copy_tables ();


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-12-09 12:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-07 16:50 [gcc(refs/users/marxin/heads/loop-unswitch-improvement-v7)] Use dump_printf_loc Martin Liska
2021-12-08 10:17 Martin Liska
2021-12-08 18:26 Martin Liska
2021-12-09 12:48 Martin Liska

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).