public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/marxin/heads/loop-unswitch-improvement)] Use proper ranges for unswitching candidates.
@ 2021-11-22 12:44 Martin Liska
0 siblings, 0 replies; 3+ messages in thread
From: Martin Liska @ 2021-11-22 12:44 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:73024919f386f63e8b12d21b7ea0090d973e31cf
commit 73024919f386f63e8b12d21b7ea0090d973e31cf
Author: Martin Liska <mliska@suse.cz>
Date: Fri Nov 19 14:13:27 2021 +0100
Use proper ranges for unswitching candidates.
Diff:
---
gcc/tree-ssa-loop-unswitch.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/gcc/tree-ssa-loop-unswitch.c b/gcc/tree-ssa-loop-unswitch.c
index 74619ed8b24..e1ff06316e6 100644
--- a/gcc/tree-ssa-loop-unswitch.c
+++ b/gcc/tree-ssa-loop-unswitch.c
@@ -256,7 +256,11 @@ 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, lhs);
+ predicate->false_range = predicate->true_range;
+
+ if (!predicate->false_range.varying_p ()
+ && !predicate->false_range.undefined_p ())
+ predicate->false_range.invert ();
}
return predicate;
^ permalink raw reply [flat|nested] 3+ messages in thread
* [gcc(refs/users/marxin/heads/loop-unswitch-improvement)] Use proper ranges for unswitching candidates.
@ 2021-11-19 14:34 Martin Liska
0 siblings, 0 replies; 3+ messages in thread
From: Martin Liska @ 2021-11-19 14:34 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:196450e1da224118d4d695653518953e083fdd18
commit 196450e1da224118d4d695653518953e083fdd18
Author: Martin Liska <mliska@suse.cz>
Date: Fri Nov 19 14:13:27 2021 +0100
Use proper ranges for unswitching candidates.
Diff:
---
gcc/tree-ssa-loop-unswitch.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/gcc/tree-ssa-loop-unswitch.c b/gcc/tree-ssa-loop-unswitch.c
index 74619ed8b24..e1ff06316e6 100644
--- a/gcc/tree-ssa-loop-unswitch.c
+++ b/gcc/tree-ssa-loop-unswitch.c
@@ -256,7 +256,11 @@ 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, lhs);
+ predicate->false_range = predicate->true_range;
+
+ if (!predicate->false_range.varying_p ()
+ && !predicate->false_range.undefined_p ())
+ predicate->false_range.invert ();
}
return predicate;
^ permalink raw reply [flat|nested] 3+ messages in thread
* [gcc(refs/users/marxin/heads/loop-unswitch-improvement)] Use proper ranges for unswitching candidates.
@ 2021-11-19 13:53 Martin Liska
0 siblings, 0 replies; 3+ messages in thread
From: Martin Liska @ 2021-11-19 13:53 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:56df14f38381572da61568ab3bb550cf703455c0
commit 56df14f38381572da61568ab3bb550cf703455c0
Author: Martin Liska <mliska@suse.cz>
Date: Fri Nov 19 14:13:27 2021 +0100
Use proper ranges for unswitching candidates.
Diff:
---
gcc/tree-ssa-loop-unswitch.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/gcc/tree-ssa-loop-unswitch.c b/gcc/tree-ssa-loop-unswitch.c
index 74619ed8b24..e1ff06316e6 100644
--- a/gcc/tree-ssa-loop-unswitch.c
+++ b/gcc/tree-ssa-loop-unswitch.c
@@ -256,7 +256,11 @@ 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, lhs);
+ predicate->false_range = predicate->true_range;
+
+ if (!predicate->false_range.varying_p ()
+ && !predicate->false_range.undefined_p ())
+ predicate->false_range.invert ();
}
return predicate;
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-11-22 12:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-22 12:44 [gcc(refs/users/marxin/heads/loop-unswitch-improvement)] Use proper ranges for unswitching candidates Martin Liska
-- strict thread matches above, loose matches on Subject: below --
2021-11-19 14:34 Martin Liska
2021-11-19 13:53 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).