GCC Middle and Back End API Reference
prange Class Referencefinalabstract

#include <value-range.h>

Inheritance diagram for prange:
Collaboration diagram for prange:

Public Member Functions

 prange ()
 
 prange (const prange &)
 
 prange (tree type)
 
 prange (tree type, const wide_int &, const wide_int &, value_range_kind=VR_RANGE)
 
virtual bool supports_type_p (const_tree type) const final override
 
virtual void accept (const vrange_visitor &v) const final override
 
virtual void set_undefined () final override
 
virtual void set_varying (tree type) final override
 
virtual void set_nonzero (tree type) final override
 
virtual void set_zero (tree type) final override
 
virtual void set_nonnegative (tree type) final override
 
virtual bool contains_p (tree cst) const final override
 
virtual bool fits_p (const vrange &v) const final override
 
virtual bool singleton_p (tree *result=NULL) const final override
 
virtual bool zero_p () const final override
 
virtual bool nonzero_p () const final override
 
virtual void set (tree, tree, value_range_kind=VR_RANGE) final override
 
virtual tree type () const final override
 
virtual bool union_ (const vrange &v) final override
 
virtual bool intersect (const vrange &v) final override
 
virtual tree lbound () const final override
 
virtual tree ubound () const final override
 
prangeoperator= (const prange &)
 
bool operator== (const prange &) const
 
void set (tree type, const wide_int &, const wide_int &, value_range_kind=VR_RANGE)
 
void invert ()
 
bool contains_p (const wide_int &) const
 
wide_int lower_bound () const
 
wide_int upper_bound () const
 
void verify_range () const
 
irange_bitmask get_bitmask () const final override
 
void update_bitmask (const irange_bitmask &) final override
 
virtual void accept (const class vrange_visitor &v) const =0
 
virtual void update_bitmask (const class irange_bitmask &)
 
wide_int get_nonzero_bits () const
 
void set_nonzero_bits (const wide_int &bits)
 
bool varying_p () const
 
bool undefined_p () const
 
bool operator== (const vrange &) const
 
bool operator!= (const vrange &r) const
 
void dump (FILE *) const
 

Static Public Member Functions

static bool supports_p (const_tree type)
 

Protected Member Functions

bool varying_compatible_p () const
 

Protected Attributes

tree m_type
 
wide_int m_min
 
wide_int m_max
 
irange_bitmask m_bitmask
 
enum value_range_kind m_kind: 8
 
enum value_range_discriminator m_discriminator: 4
 

Friends

class prange_storage
 
class vrange_printer
 

Constructor & Destructor Documentation

◆ prange() [1/4]

prange::prange ( )
inline

References set_undefined().

◆ prange() [2/4]

prange::prange ( const prange & r)
inline

References r.

◆ prange() [3/4]

prange::prange ( tree type)
inline

References set_varying().

◆ prange() [4/4]

prange::prange ( tree type,
const wide_int & lb,
const wide_int & ub,
value_range_kind kind = VR_RANGE )
inline

References set().

Member Function Documentation

◆ accept() [1/2]

void prange::accept ( const vrange_visitor & v) const
finaloverridevirtual

◆ accept() [2/2]

virtual void vrange::accept ( const class vrange_visitor & v) const
pure virtualinherited

◆ contains_p() [1/2]

◆ contains_p() [2/2]

bool prange::contains_p ( tree cst) const
inlinefinaloverridevirtual

Implements vrange.

References contains_p(), and wi::to_wide().

Referenced by contains_p().

◆ dump()

◆ fits_p()

bool prange::fits_p ( const vrange & v) const
inlinefinaloverridevirtual

Implements vrange.

◆ get_bitmask()

irange_bitmask prange::get_bitmask ( ) const
inlinefinaloverridevirtual

◆ get_nonzero_bits()

◆ intersect()

◆ invert()

◆ lbound()

tree prange::lbound ( ) const
finaloverridevirtual

Implements vrange.

References m_min, and wide_int_to_tree().

◆ lower_bound()

◆ nonzero_p()

bool prange::nonzero_p ( ) const
inlinefinaloverridevirtual

Implements vrange.

References vrange::m_kind, m_max, m_min, and VR_RANGE.

Referenced by find_what_p_points_to().

◆ operator!=()

bool vrange::operator!= ( const vrange & r) const
inlineinherited

References r.

◆ operator=()

prange & prange::operator= ( const prange & src)

◆ operator==() [1/2]

bool prange::operator== ( const prange & src) const

◆ operator==() [2/2]

bool vrange::operator== ( const vrange & src) const
inherited

◆ set() [1/2]

◆ set() [2/2]

void prange::set ( tree min,
tree max,
value_range_kind kind = VR_RANGE )
finaloverridevirtual

◆ set_nonnegative()

void prange::set_nonnegative ( tree type)
finaloverridevirtual

Implements vrange.

References wi::max_value(), set(), TYPE_PRECISION, UNSIGNED, and wi::zero().

◆ set_nonzero()

◆ set_nonzero_bits()

void vrange::set_nonzero_bits ( const wide_int & bits)
inherited

◆ set_undefined()

void prange::set_undefined ( )
inlinefinaloverridevirtual

Implements vrange.

References vrange::m_kind, and VR_UNDEFINED.

Referenced by intersect(), prange(), and set().

◆ set_varying()

void prange::set_varying ( tree type)
inlinefinaloverridevirtual

◆ set_zero()

void prange::set_zero ( tree type)
inlinefinaloverridevirtual

◆ singleton_p()

bool prange::singleton_p ( tree * result = NULL) const
finaloverridevirtual

◆ supports_p()

◆ supports_type_p()

bool prange::supports_type_p ( const_tree type) const
inlinefinaloverridevirtual

Implements vrange.

References POINTER_TYPE_P.

◆ type()

◆ ubound()

tree prange::ubound ( ) const
finaloverridevirtual

Implements vrange.

References m_max, and wide_int_to_tree().

◆ undefined_p()

bool vrange::undefined_p ( ) const
inlineinherited

References vrange::m_kind, and VR_UNDEFINED.

Referenced by inchash::add_vrange(), adjust_equivalence_range(), gimple_range_op_handler::calc_op1(), gimple_range_op_handler::calc_op2(), array_bounds_checker::check_array_ref(), check_for_binary_op_overflow(), frange::clear_nan(), frange::combine_zeros(), compare_nonzero_chars(), compute_distributive_range(), frange::contains_p(), irange::contains_p(), contains_p(), strlen_pass::count_nonzero_bytes_addr(), determine_value_range(), dr_step_indicator(), empty_range_varying(), expr_not_equal_to(), expr_to_aff_combination(), find_case_label_range(), find_case_label_ranges(), find_range_for_lhs(), frange::flush_denormals_to_zero(), cfn_clrsb::fold_range(), cfn_clz::fold_range(), cfn_ctz::fold_range(), cfn_ffs::fold_range(), cfn_popcount::fold_range(), operator_addr_expr::fold_range(), operator_equal::fold_range(), operator_equal::fold_range(), operator_equal::fold_range(), operator_logical_not::fold_range(), operator_lshift::fold_range(), operator_not_equal::fold_range(), operator_not_equal::fold_range(), operator_not_equal::fold_range(), operator_rshift::fold_range(), range_op_handler::fold_range(), irange::get_bitmask(), vrange::get_nonzero_bits(), get_range_strlen_dynamic(), get_ref_base_and_extent(), get_shift_range(), get_size_range(), handle_printf_call(), frange::intersect(), irange::intersect(), irange::intersect(), intersect(), unsupported_range::intersect(), irange::intersect_bitmask(), irange::invert(), invert(), ipa_vr_operation_and_type_effects(), irange::irange_contains_p(), irange::irange_single_pair_union(), frange::known_isfinite(), simplify_using_ranges::legacy_fold_cond_overflow(), operator_bitwise_and::lhs_op1_relation(), operator_cast::lhs_op1_relation(), operator_cast::lhs_op1_relation(), operator_cast::lhs_op1_relation(), operator_cast::lhs_op1_relation(), operator_minus::lhs_op1_relation(), operator_plus::lhs_op1_relation(), operator_rshift::lhs_op1_relation(), frange::lower_bound(), lower_bound(), frange::maybe_isinf(), frange::maybe_isnan(), frange::maybe_isnan(), frange::nan_signbit_p(), irange::nonzero_p(), foperator_div::op1_range(), foperator_unordered_ge::op1_range(), foperator_unordered_gt::op1_range(), foperator_unordered_le::op1_range(), foperator_unordered_lt::op1_range(), operator_bitwise_xor::op1_range(), operator_equal::op1_range(), operator_equal::op1_range(), operator_ge::op1_range(), operator_ge::op1_range(), operator_ge::op1_range(), operator_gt::op1_range(), operator_gt::op1_range(), operator_gt::op1_range(), operator_le::op1_range(), operator_le::op1_range(), operator_le::op1_range(), operator_lt::op1_range(), operator_lt::op1_range(), operator_lt::op1_range(), operator_mult::op1_range(), operator_not_equal::op1_range(), operator_not_equal::op1_range(), operator_rshift::op1_range(), range_op_handler::op1_range(), foperator_div::op2_range(), foperator_unordered_ge::op2_range(), foperator_unordered_gt::op2_range(), foperator_unordered_le::op2_range(), foperator_unordered_lt::op2_range(), operator_ge::op2_range(), operator_ge::op2_range(), operator_ge::op2_range(), operator_gt::op2_range(), operator_gt::op2_range(), operator_gt::op2_range(), operator_le::op2_range(), operator_le::op2_range(), operator_le::op2_range(), operator_lt::op2_range(), operator_lt::op2_range(), operator_lt::op2_range(), range_op_handler::op2_range(), frange::operator==(), operator==(), operator_minus::overflow_free_p(), operator_mult::overflow_free_p(), operator_plus::overflow_free_p(), phi_group::phi_group(), phi_analyzer::process_phi(), range_fits_type_p(), range_includes_zero_p(), fur_source::register_outgoing_edges(), vrange::set_nonzero_bits(), irange::set_range_from_bitmask(), set_switch_stmt_execution_predicate(), frange::signbit_p(), simplify_using_ranges::simplify(), simplify_using_ranges::simplify_bit_ops_using_ranges(), simplify_using_ranges::simplify_casted_compare(), simplify_using_ranges::simplify_compare_using_ranges_1(), simplify_conversion_using_ranges(), simplify_using_ranges::simplify_div_or_mod_using_ranges(), simplify_using_ranges::simplify_float_conversion_using_ranges(), simplify_using_ranges::simplify_switch_using_ranges(), size_must_be_zero_p(), split_constant_offset(), simplify_using_ranges::two_valued_val_range_p(), frange::type(), type(), value_range::undefined_p(), frange::union_(), irange::union_(), union_(), unsupported_range::union_(), irange::union_bitmask(), unswitch_predicate::unswitch_predicate(), irange::update_bitmask(), update_bitmask(), update_known_bitmask(), frange::update_nan(), frange::update_nan(), frange::update_nan(), frange::upper_bound(), upper_bound(), varying_compatible_p(), vect_get_range_info(), frange::verify_range(), and vr_set_zero_nonzero_bits().

◆ union_()

◆ update_bitmask() [1/2]

◆ update_bitmask() [2/2]

void vrange::update_bitmask ( const class irange_bitmask & )
virtualinherited

Reimplemented in irange.

Referenced by vrange::set_nonzero_bits(), and value_range::update_bitmask().

◆ upper_bound()

◆ varying_compatible_p()

bool prange::varying_compatible_p ( ) const
inlineprotected

◆ varying_p()

bool vrange::varying_p ( ) const
inlineinherited

References vrange::m_kind, and VR_VARYING.

Referenced by gimple_infer_range::add_range(), phi_group::calculate_using_modifier(), array_bounds_checker::check_array_ref(), compare_nonzero_chars(), compute_distributive_range(), frange::contains_p(), contains_p(), unsupported_range::contains_p(), strlen_pass::count_nonzero_bytes_addr(), determine_value_range(), expr_to_aff_combination(), find_case_label_range(), find_case_label_ranges(), operator_cast::fold_range(), operator_logical_not::fold_range(), get_range_strlen_dynamic(), get_ref_base_and_extent(), frange::intersect(), irange::intersect(), intersect(), unsupported_range::intersect(), irange::invert(), invert(), ipa_vr_operation_and_type_effects(), irange::irange_contains_p(), irange::irange_single_pair_union(), frange::known_isfinite(), gori_compute::logical_combine(), frange::maybe_isinf(), ipcp_vr_lattice::meet_with_1(), operator_bitwise_xor::op1_range(), frange::operator==(), operator==(), phi_group::phi_group(), phi_analyzer::process_phi(), range_fits_type_p(), range_includes_zero_p(), simplify_using_ranges::simplify_casted_compare(), simplify_using_ranges::simplify_compare_using_ranges_1(), simplify_conversion_using_ranges(), simplify_using_ranges::simplify_div_or_mod_using_ranges(), simplify_using_ranges::simplify_float_conversion_using_ranges(), simplify_using_ranges::simplify_switch_using_ranges(), simplify_using_ranges::two_valued_val_range_p(), frange::union_(), irange::union_(), union_(), unsupported_range::union_(), unswitch_predicate::unswitch_predicate(), value_range::varying_p(), and vr_set_zero_nonzero_bits().

◆ verify_range()

◆ zero_p()

bool prange::zero_p ( ) const
inlinefinaloverridevirtual

Friends And Related Symbol Documentation

◆ prange_storage

friend class prange_storage
friend

◆ vrange_printer

friend class vrange_printer
friend

Field Documentation

◆ m_bitmask

◆ m_discriminator

◆ m_kind

◆ m_max

◆ m_min

◆ m_type

tree prange::m_type
protected

The documentation for this class was generated from the following files: