[gcc r17-2600] middle-end: enable ranger in gimple-isel

Tamar Christina via Gcc-cvs <[email protected]>
Newsgroups gmane.comp.gcc.cvs
Message-ID <[email protected]>
https://gcc.gnu.org/g:888b4d45e854d207d08b979affb9ba06311daf52

commit r17-2600-g888b4d45e854d207d08b979affb9ba06311daf52
Author: Tamar Christina <[email protected]>
Date:   Tue Jul 21 20:48:04 2026 +0100

    middle-end: enable ranger in gimple-isel
    
    This enables ranger for use in isel to do some ranged based foldings.
    
    gcc/ChangeLog:
    
            * gimple-isel.cc (pass_gimple_isel::execute): Enable and disable ranger
            on fun.

Diff:
---
 gcc/gimple-isel.cc | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gcc/gimple-isel.cc b/gcc/gimple-isel.cc
index b193e27b183e..25c11d645405 100644
--- a/gcc/gimple-isel.cc
+++ b/gcc/gimple-isel.cc
@@ -40,6 +40,8 @@ along with GCC; see the file COPYING3.  If not see
 #include "gimple-fold.h"
 #include "internal-fn.h"
 #include "fold-const.h"
+#include "gimple-range.h"
+
 
 /* Expand all ARRAY_REF(VIEW_CONVERT_EXPR) gimple assignments into calls to
    internal function based on vector type of selected expansion.
@@ -1352,6 +1354,8 @@ pass_gimple_isel::execute (struct function *fun)
   gimple_stmt_iterator gsi;
   basic_block bb;
   bool cfg_changed = false;
+  if (optimize)
+    enable_ranger (fun);
 
   FOR_EACH_BB_FN (bb, fun)
     {
@@ -1390,6 +1394,8 @@ pass_gimple_isel::execute (struct function *fun)
 	}
     }
 
+  if (optimize)
+    disable_ranger (fun);
   return cfg_changed ? TODO_cleanup_cfg : 0;
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.