public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-1910] Make irange dependency explicit for range_of_ssa_name_with_loop_info.
@ 2022-08-01 6:16 Aldy Hernandez
0 siblings, 0 replies; only message in thread
From: Aldy Hernandez @ 2022-08-01 6:16 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:460dcec49f875a83ca9b66d5e45d712f836f681e
commit r13-1910-g460dcec49f875a83ca9b66d5e45d712f836f681e
Author: Aldy Hernandez <aldyh@redhat.com>
Date: Sun Jul 31 23:02:14 2022 +0200
Make irange dependency explicit for range_of_ssa_name_with_loop_info.
Even though ranger is type agnostic, SCEV seems to only work with
integers. This patch removes some FIXME notes making it explicit that
bounds_of_var_in_loop only works with iranges.
Tested on x86-64 Linux.
gcc/ChangeLog:
* gimple-range-fold.cc (fold_using_range::range_of_phi): Only
query SCEV for integers.
(fold_using_range::range_of_ssa_name_with_loop_info): Remove
irange check.
Diff:
---
gcc/gimple-range-fold.cc | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/gcc/gimple-range-fold.cc b/gcc/gimple-range-fold.cc
index 6f907df5bf5..7665c954f2b 100644
--- a/gcc/gimple-range-fold.cc
+++ b/gcc/gimple-range-fold.cc
@@ -853,12 +853,14 @@ fold_using_range::range_of_phi (vrange &r, gphi *phi, fur_source &src)
}
// If SCEV is available, query if this PHI has any knonwn values.
- if (scev_initialized_p () && !POINTER_TYPE_P (TREE_TYPE (phi_def)))
+ if (scev_initialized_p ()
+ && !POINTER_TYPE_P (TREE_TYPE (phi_def))
+ && irange::supports_p (TREE_TYPE (phi_def)))
{
- value_range loop_range;
class loop *l = loop_containing_stmt (phi);
if (l && loop_outer (l))
{
+ int_range_max loop_range;
range_of_ssa_name_with_loop_info (loop_range, phi_def, l, phi, src);
if (!loop_range.varying_p ())
{
@@ -1337,9 +1339,7 @@ fold_using_range::range_of_ssa_name_with_loop_info (irange &r, tree name,
{
gcc_checking_assert (TREE_CODE (name) == SSA_NAME);
tree min, max, type = TREE_TYPE (name);
- // FIXME: Remove the supports_p() once all this can handle floats, etc.
- if (irange::supports_p (type)
- && bounds_of_var_in_loop (&min, &max, src.query (), l, phi, name))
+ if (bounds_of_var_in_loop (&min, &max, src.query (), l, phi, name))
{
if (TREE_CODE (min) != INTEGER_CST)
{
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-08-01 6:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-01 6:16 [gcc r13-1910] Make irange dependency explicit for range_of_ssa_name_with_loop_info 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).