public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/marxin/heads/loop-unswitch-improvement)] Add debug counter and fix a typo.
@ 2021-11-19 14:34 Martin Liska
  0 siblings, 0 replies; 4+ messages in thread
From: Martin Liska @ 2021-11-19 14:34 UTC (permalink / raw)
  To: gcc-cvs

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

commit e13548c00a6118cd4f0b2041539a7e607fb1c99f
Author: Martin Liska <mliska@suse.cz>
Date:   Tue Nov 16 14:41:42 2021 +0100

    Add debug counter and fix a typo.

Diff:
---
 gcc/dbgcnt.def               | 1 +
 gcc/tree-ssa-loop-unswitch.c | 6 +++++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/gcc/dbgcnt.def b/gcc/dbgcnt.def
index f8a15f3d1d1..278fb1112b3 100644
--- a/gcc/dbgcnt.def
+++ b/gcc/dbgcnt.def
@@ -187,6 +187,7 @@ DEBUG_COUNTER (ira_move)
 DEBUG_COUNTER (ivopts_loop)
 DEBUG_COUNTER (lim)
 DEBUG_COUNTER (local_alloc_for_sched)
+DEBUG_COUNTER (loop_unswitch)
 DEBUG_COUNTER (match)
 DEBUG_COUNTER (merged_ipa_icf)
 DEBUG_COUNTER (phiopt_edge_range)
diff --git a/gcc/tree-ssa-loop-unswitch.c b/gcc/tree-ssa-loop-unswitch.c
index fb5bcf5a13d..74619ed8b24 100644
--- a/gcc/tree-ssa-loop-unswitch.c
+++ b/gcc/tree-ssa-loop-unswitch.c
@@ -39,6 +39,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-ssa-loop-manip.h"
 #include "tree-pretty-print.h"
 #include "gimple-range.h"
+#include "dbgcnt.h"
 
 /* This file implements the loop unswitching, i.e. transformation of loops like
 
@@ -255,7 +256,7 @@ tree_may_unswitch_on (basic_block bb, class loop *loop, gimple_ranger *ranger)
   if (irange::supports_type_p (TREE_TYPE (lhs)))
     {
       ranger->range_on_edge (predicate->true_range, edge_true, lhs);
-      ranger->range_on_edge (predicate->false_range, edge_false, rhs);
+      ranger->range_on_edge (predicate->false_range, edge_false, lhs);
     }
 
   return predicate;
@@ -479,6 +480,9 @@ tree_unswitch_single_loop (class loop *loop, int num, gimple_ranger *ranger,
 	goto exit;
     }
 
+  if (!dbg_cnt (loop_unswitch))
+    goto exit;
+
   if (dump_file && (dump_flags & TDF_DETAILS))
     {
       fprintf (dump_file, ";; Unswitching loop with condition: ");


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

* [gcc(refs/users/marxin/heads/loop-unswitch-improvement)] Add debug counter and fix a typo.
@ 2021-11-22 12:44 Martin Liska
  0 siblings, 0 replies; 4+ messages in thread
From: Martin Liska @ 2021-11-22 12:44 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:258161990f5c37f9824c9ff26ca662aea15afcd9

commit 258161990f5c37f9824c9ff26ca662aea15afcd9
Author: Martin Liska <mliska@suse.cz>
Date:   Tue Nov 16 14:41:42 2021 +0100

    Add debug counter and fix a typo.

Diff:
---
 gcc/dbgcnt.def               | 1 +
 gcc/tree-ssa-loop-unswitch.c | 6 +++++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/gcc/dbgcnt.def b/gcc/dbgcnt.def
index f8a15f3d1d1..278fb1112b3 100644
--- a/gcc/dbgcnt.def
+++ b/gcc/dbgcnt.def
@@ -187,6 +187,7 @@ DEBUG_COUNTER (ira_move)
 DEBUG_COUNTER (ivopts_loop)
 DEBUG_COUNTER (lim)
 DEBUG_COUNTER (local_alloc_for_sched)
+DEBUG_COUNTER (loop_unswitch)
 DEBUG_COUNTER (match)
 DEBUG_COUNTER (merged_ipa_icf)
 DEBUG_COUNTER (phiopt_edge_range)
diff --git a/gcc/tree-ssa-loop-unswitch.c b/gcc/tree-ssa-loop-unswitch.c
index fb5bcf5a13d..74619ed8b24 100644
--- a/gcc/tree-ssa-loop-unswitch.c
+++ b/gcc/tree-ssa-loop-unswitch.c
@@ -39,6 +39,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-ssa-loop-manip.h"
 #include "tree-pretty-print.h"
 #include "gimple-range.h"
+#include "dbgcnt.h"
 
 /* This file implements the loop unswitching, i.e. transformation of loops like
 
@@ -255,7 +256,7 @@ tree_may_unswitch_on (basic_block bb, class loop *loop, gimple_ranger *ranger)
   if (irange::supports_type_p (TREE_TYPE (lhs)))
     {
       ranger->range_on_edge (predicate->true_range, edge_true, lhs);
-      ranger->range_on_edge (predicate->false_range, edge_false, rhs);
+      ranger->range_on_edge (predicate->false_range, edge_false, lhs);
     }
 
   return predicate;
@@ -479,6 +480,9 @@ tree_unswitch_single_loop (class loop *loop, int num, gimple_ranger *ranger,
 	goto exit;
     }
 
+  if (!dbg_cnt (loop_unswitch))
+    goto exit;
+
   if (dump_file && (dump_flags & TDF_DETAILS))
     {
       fprintf (dump_file, ";; Unswitching loop with condition: ");


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

* [gcc(refs/users/marxin/heads/loop-unswitch-improvement)] Add debug counter and fix a typo.
@ 2021-11-19 13:53 Martin Liska
  0 siblings, 0 replies; 4+ messages in thread
From: Martin Liska @ 2021-11-19 13:53 UTC (permalink / raw)
  To: gcc-cvs

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

commit c53b12665f0373ac849f02df9ae2c219ca8a868a
Author: Martin Liska <mliska@suse.cz>
Date:   Tue Nov 16 14:41:42 2021 +0100

    Add debug counter and fix a typo.

Diff:
---
 gcc/dbgcnt.def               | 1 +
 gcc/tree-ssa-loop-unswitch.c | 6 +++++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/gcc/dbgcnt.def b/gcc/dbgcnt.def
index f8a15f3d1d1..278fb1112b3 100644
--- a/gcc/dbgcnt.def
+++ b/gcc/dbgcnt.def
@@ -187,6 +187,7 @@ DEBUG_COUNTER (ira_move)
 DEBUG_COUNTER (ivopts_loop)
 DEBUG_COUNTER (lim)
 DEBUG_COUNTER (local_alloc_for_sched)
+DEBUG_COUNTER (loop_unswitch)
 DEBUG_COUNTER (match)
 DEBUG_COUNTER (merged_ipa_icf)
 DEBUG_COUNTER (phiopt_edge_range)
diff --git a/gcc/tree-ssa-loop-unswitch.c b/gcc/tree-ssa-loop-unswitch.c
index fb5bcf5a13d..74619ed8b24 100644
--- a/gcc/tree-ssa-loop-unswitch.c
+++ b/gcc/tree-ssa-loop-unswitch.c
@@ -39,6 +39,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-ssa-loop-manip.h"
 #include "tree-pretty-print.h"
 #include "gimple-range.h"
+#include "dbgcnt.h"
 
 /* This file implements the loop unswitching, i.e. transformation of loops like
 
@@ -255,7 +256,7 @@ tree_may_unswitch_on (basic_block bb, class loop *loop, gimple_ranger *ranger)
   if (irange::supports_type_p (TREE_TYPE (lhs)))
     {
       ranger->range_on_edge (predicate->true_range, edge_true, lhs);
-      ranger->range_on_edge (predicate->false_range, edge_false, rhs);
+      ranger->range_on_edge (predicate->false_range, edge_false, lhs);
     }
 
   return predicate;
@@ -479,6 +480,9 @@ tree_unswitch_single_loop (class loop *loop, int num, gimple_ranger *ranger,
 	goto exit;
     }
 
+  if (!dbg_cnt (loop_unswitch))
+    goto exit;
+
   if (dump_file && (dump_flags & TDF_DETAILS))
     {
       fprintf (dump_file, ";; Unswitching loop with condition: ");


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

* [gcc(refs/users/marxin/heads/loop-unswitch-improvement)] Add debug counter and fix a typo.
@ 2021-11-16 13:41 Martin Liska
  0 siblings, 0 replies; 4+ messages in thread
From: Martin Liska @ 2021-11-16 13:41 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:04edc54cd400f925e612c996dfd4b1bce3c533e0

commit 04edc54cd400f925e612c996dfd4b1bce3c533e0
Author: Martin Liska <mliska@suse.cz>
Date:   Tue Nov 16 14:41:42 2021 +0100

    Add debug counter and fix a typo.

Diff:
---
 gcc/dbgcnt.def               | 1 +
 gcc/tree-ssa-loop-unswitch.c | 6 +++++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/gcc/dbgcnt.def b/gcc/dbgcnt.def
index f8a15f3d1d1..278fb1112b3 100644
--- a/gcc/dbgcnt.def
+++ b/gcc/dbgcnt.def
@@ -187,6 +187,7 @@ DEBUG_COUNTER (ira_move)
 DEBUG_COUNTER (ivopts_loop)
 DEBUG_COUNTER (lim)
 DEBUG_COUNTER (local_alloc_for_sched)
+DEBUG_COUNTER (loop_unswitch)
 DEBUG_COUNTER (match)
 DEBUG_COUNTER (merged_ipa_icf)
 DEBUG_COUNTER (phiopt_edge_range)
diff --git a/gcc/tree-ssa-loop-unswitch.c b/gcc/tree-ssa-loop-unswitch.c
index fb5bcf5a13d..74619ed8b24 100644
--- a/gcc/tree-ssa-loop-unswitch.c
+++ b/gcc/tree-ssa-loop-unswitch.c
@@ -39,6 +39,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-ssa-loop-manip.h"
 #include "tree-pretty-print.h"
 #include "gimple-range.h"
+#include "dbgcnt.h"
 
 /* This file implements the loop unswitching, i.e. transformation of loops like
 
@@ -255,7 +256,7 @@ tree_may_unswitch_on (basic_block bb, class loop *loop, gimple_ranger *ranger)
   if (irange::supports_type_p (TREE_TYPE (lhs)))
     {
       ranger->range_on_edge (predicate->true_range, edge_true, lhs);
-      ranger->range_on_edge (predicate->false_range, edge_false, rhs);
+      ranger->range_on_edge (predicate->false_range, edge_false, lhs);
     }
 
   return predicate;
@@ -479,6 +480,9 @@ tree_unswitch_single_loop (class loop *loop, int num, gimple_ranger *ranger,
 	goto exit;
     }
 
+  if (!dbg_cnt (loop_unswitch))
+    goto exit;
+
   if (dump_file && (dump_flags & TDF_DETAILS))
     {
       fprintf (dump_file, ";; Unswitching loop with condition: ");


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

end of thread, other threads:[~2021-11-22 12:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-19 14:34 [gcc(refs/users/marxin/heads/loop-unswitch-improvement)] Add debug counter and fix a typo Martin Liska
  -- strict thread matches above, loose matches on Subject: below --
2021-11-22 12:44 Martin Liska
2021-11-19 13:53 Martin Liska
2021-11-16 13:41 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).