irange::set_nonzero is used everywhere and benefits immensely from inlining.
gcc/ChangeLog: * value-range.h (irange::set_nonzero): Inline. --- gcc/value-range.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/gcc/value-range.h b/gcc/value-range.h index 9a834c91b17..5cff50e6d03 100644 --- a/gcc/value-range.h +++ b/gcc/value-range.h @@ -886,8 +886,24 @@ irange::upper_bound () const inline void irange::set_nonzero (tree type) { - wide_int zero = wi::zero (TYPE_PRECISION (type)); - set (type, zero, zero, VR_ANTI_RANGE); + unsigned prec = TYPE_PRECISION (type); + + if (TYPE_UNSIGNED (type)) + { + m_type = type; + m_kind = VR_RANGE; + m_base[0] = wi::one (prec); + m_base[1] = m_nonzero_mask = wi::minus_one (prec); + m_num_ranges = 1; + + if (flag_checking) + verify_range (); + } + else + { + wide_int zero = wi::zero (prec); + set (type, zero, zero, VR_ANTI_RANGE); + } } // Set value range VR to a ZERO range of type TYPE. -- 2.40.0