public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Aldy Hernandez <aldyh@redhat.com>
To: GCC patches <gcc-patches@gcc.gnu.org>
Cc: Andrew MacLeod <amacleod@redhat.com>, Aldy Hernandez <aldyh@redhat.com>
Subject: [COMMITTED] Convert get_legacy_range in bounds_of_var_in_loop to irange API.
Date: Mon,  1 May 2023 08:28:59 +0200	[thread overview]
Message-ID: <20230501062906.564803-5-aldyh@redhat.com> (raw)
In-Reply-To: <20230501062906.564803-1-aldyh@redhat.com>

gcc/ChangeLog:

	* vr-values.cc (bounds_of_var_in_loop): Convert to irange API.
---
 gcc/vr-values.cc | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/gcc/vr-values.cc b/gcc/vr-values.cc
index 7f623102ac6..3d28198f9f5 100644
--- a/gcc/vr-values.cc
+++ b/gcc/vr-values.cc
@@ -331,13 +331,16 @@ bounds_of_var_in_loop (tree *min, tree *max, range_query *query,
 		      || initvr.undefined_p ())
 		    return false;
 
-		  tree initvr_min, initvr_max;
+		  tree initvr_type = initvr.type ();
+		  tree initvr_min = wide_int_to_tree (initvr_type,
+						      initvr.lower_bound ());
+		  tree initvr_max = wide_int_to_tree (initvr_type,
+						      initvr.upper_bound ());
 		  tree maxvr_type = maxvr.type ();
 		  tree maxvr_min = wide_int_to_tree (maxvr_type,
 						     maxvr.lower_bound ());
 		  tree maxvr_max = wide_int_to_tree (maxvr_type,
 						     maxvr.upper_bound ());
-		  get_legacy_range (initvr, initvr_min, initvr_max);
 
 		  /* Check if init + nit * step overflows.  Though we checked
 		     scev {init, step}_loop doesn't wrap, it is not enough
-- 
2.40.0


  parent reply	other threads:[~2023-05-01  6:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-01  6:28 [COMMITTED] vrange_storage overhaul Aldy Hernandez
2023-05-01  6:28 ` [COMMITTED] Remove irange::{min,max,kind} Aldy Hernandez
2023-05-01  6:28 ` [COMMITTED] Remove irange::tree_{lower,upper}_bound Aldy Hernandez
2023-05-01  6:28 ` [COMMITTED] Various cleanups in vr-values.cc towards ranger API Aldy Hernandez
2023-05-01  6:28 ` Aldy Hernandez [this message]
2023-05-01  6:29 ` [COMMITTED] Merge irange::union/intersect into irange_union/intersect Aldy Hernandez
2023-05-01  6:29 ` [COMMITTED] Conversion to irange wide_int API Aldy Hernandez
2023-05-01  6:29 ` [COMMITTED] Replace vrp_val* with wide_ints Aldy Hernandez
2023-05-01  6:29 ` [COMMITTED] Rewrite bounds_of_var_in_loop() to use ranges Aldy Hernandez
2023-05-01  6:29 ` [COMMITTED] Convert internal representation of irange to wide_ints Aldy Hernandez
2023-05-01  6:29 ` [COMMITTED] Cleanup irange::set Aldy Hernandez
2023-05-01  6:29 ` [COMMITTED] Inline irange::set_nonzero Aldy Hernandez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230501062906.564803-5-aldyh@redhat.com \
    --to=aldyh@redhat.com \
    --cc=amacleod@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).