]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Implement some miscellaneous zero accessors for Value_Range.
authorAldy Hernandez <aldyh@redhat.com>
Mon, 22 May 2023 18:15:19 +0000 (20:15 +0200)
committerAldy Hernandez <aldyh@redhat.com>
Mon, 22 May 2023 18:37:53 +0000 (20:37 +0200)
This adds some missing accessors to the type agnostic Value_Range
class.  They'll be used in the upcoming IPA work.

gcc/ChangeLog:

* value-range.h (class Value_Range): Implement set_zero,
set_nonzero, and nonzero_p.

gcc/value-range.h

index af81d6080da731b3ac1fb0be6856ef7f19c939d5..171e6426c6e9ae6c5d9a3addc39f3293e99ddf08 100644 (file)
@@ -542,6 +542,9 @@ public:
   bool contains_p (tree cst) const { return m_vrange->contains_p (cst); }
   bool singleton_p (tree *result = NULL) const
     { return m_vrange->singleton_p (result); }
+  void set_zero (tree type) { return m_vrange->set_zero (type); }
+  void set_nonzero (tree type) { return m_vrange->set_nonzero (type); }
+  bool nonzero_p () const { return m_vrange->nonzero_p (); }
   bool zero_p () const { return m_vrange->zero_p (); }
   wide_int lower_bound () const; // For irange/prange comparability.
   wide_int upper_bound () const; // For irange/prange comparability.