Skip to content

Commit

Permalink
Implement some miscellaneous zero accessors for Value_Range.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
aldyh authored and ouuleilei-bot committed May 22, 2023
1 parent c2d62cd commit 894d374
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gcc/value-range.h
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,9 @@ class Value_Range
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.
Expand Down

0 comments on commit 894d374

Please sign in to comment.