Use range_query object in array bounds class.
authorAldy Hernandez <aldyh@redhat.com>
Fri, 23 Jul 2021 14:19:59 +0000 (16:19 +0200)
committerAldy Hernandez <aldyh@redhat.com>
Fri, 23 Jul 2021 15:39:15 +0000 (17:39 +0200)
Now that all dependencies of array_bounds_checker take a range_query, we
can sever the relationship with vr_values.  Changing this will allow us
to use the array_bounds_checker with VRP, evrp, or the ranger.

Tested on x86-64 Linux.

gcc/ChangeLog:

* gimple-array-bounds.h (class array_bounds_checker): Change
ranges type to range_query.

gcc/gimple-array-bounds.h

index 1bfa2d4..fa64262 100644 (file)
@@ -25,7 +25,7 @@ class array_bounds_checker
   friend class check_array_bounds_dom_walker;
 
 public:
-  array_bounds_checker (struct function *fun, class vr_values *v)
+  array_bounds_checker (struct function *fun, range_query *v)
     : fun (fun), ranges (v) { }
   void check ();
 
@@ -37,7 +37,7 @@ private:
   const value_range *get_value_range (const_tree op);
 
   struct function *fun;
-  class vr_values *ranges;
+  range_query *ranges;
 };
 
 #endif // GCC_GIMPLE_ARRAY_BOUNDS_H