GCC Middle and Back End API Reference
frange Class Referencefinalabstract

#include <value-range.h>

Inheritance diagram for frange:
Collaboration diagram for frange:

Public Member Functions

 frange ()
 
 frange (const frange &)
 
 frange (tree, tree, value_range_kind=VR_RANGE)
 
 frange (tree type)
 
 frange (tree type, const REAL_VALUE_TYPE &min, const REAL_VALUE_TYPE &max, value_range_kind=VR_RANGE)
 
virtual tree type () const override
 
void set (tree type, const REAL_VALUE_TYPE &, const REAL_VALUE_TYPE &, value_range_kind=VR_RANGE)
 
void set (tree type, const REAL_VALUE_TYPE &, const REAL_VALUE_TYPE &, const nan_state &, value_range_kind=VR_RANGE)
 
void set_nan (tree type)
 
void set_nan (tree type, bool sign)
 
void set_nan (tree type, const nan_state &)
 
virtual void set_varying (tree type) override
 
virtual void set_undefined () override
 
virtual bool union_ (const vrange &) override
 
virtual bool intersect (const vrange &) override
 
bool contains_p (const REAL_VALUE_TYPE &) const
 
virtual bool singleton_p (tree *result=NULL) const override
 
bool singleton_p (REAL_VALUE_TYPE &r) const
 
virtual bool supports_type_p (const_tree type) const override
 
virtual void accept (const vrange_visitor &v) const override
 
virtual bool zero_p () const override
 
virtual bool nonzero_p () const override
 
virtual void set_nonzero (tree type) override
 
virtual void set_zero (tree type) override
 
virtual void set_nonnegative (tree type) override
 
virtual bool fits_p (const vrange &) const override
 
frangeoperator= (const frange &)
 
bool operator== (const frange &) const
 
bool operator!= (const frange &r) const
 
const REAL_VALUE_TYPElower_bound () const
 
const REAL_VALUE_TYPEupper_bound () const
 
virtual tree lbound () const override
 
virtual tree ubound () const override
 
nan_state get_nan_state () const
 
void update_nan ()
 
void update_nan (bool sign)
 
void update_nan (tree)=delete
 
void update_nan (const nan_state &)
 
void clear_nan ()
 
void flush_denormals_to_zero ()
 
bool known_isfinite () const
 
bool known_isnan () const
 
bool known_isinf () const
 
bool maybe_isnan () const
 
bool maybe_isnan (bool sign) const
 
bool maybe_isinf () const
 
bool signbit_p (bool &signbit) const
 
bool nan_signbit_p (bool &signbit) const
 
bool known_isnormal () const
 
bool known_isdenormal_or_zero () const
 
virtual void accept (const class vrange_visitor &v) const =0
 
virtual void update_bitmask (const class irange_bitmask &)
 
virtual irange_bitmask get_bitmask () const
 
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

virtual bool contains_p (tree cst) const override
 
virtual void set (tree, tree, value_range_kind=VR_RANGE) override
 

Protected Attributes

enum value_range_kind m_kind: 8
 
enum value_range_discriminator m_discriminator: 4
 

Private Member Functions

bool internal_singleton_p (REAL_VALUE_TYPE *=NULL) const
 
void verify_range ()
 
bool normalize_kind ()
 
bool union_nans (const frange &)
 
bool intersect_nans (const frange &)
 
bool combine_zeros (const frange &, bool union_p)
 

Private Attributes

tree m_type
 
REAL_VALUE_TYPE m_min
 
REAL_VALUE_TYPE m_max
 
bool m_pos_nan
 
bool m_neg_nan
 

Friends

class frange_storage
 
class vrange_printer
 

Constructor & Destructor Documentation

◆ frange() [1/5]

frange::frange ( )
inline

References set_undefined().

◆ frange() [2/5]

frange::frange ( const frange & src)
inline

◆ frange() [3/5]

frange::frange ( tree min,
tree max,
value_range_kind kind = VR_RANGE )
inline

References set().

◆ frange() [4/5]

frange::frange ( tree type)
inline

References set_varying().

◆ frange() [5/5]

frange::frange ( tree type,
const REAL_VALUE_TYPE & min,
const REAL_VALUE_TYPE & max,
value_range_kind kind = VR_RANGE )
inline

References set().

Member Function Documentation

◆ accept() [1/2]

void frange::accept ( const vrange_visitor & v) const
overridevirtual

◆ accept() [2/2]

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

◆ clear_nan()

◆ combine_zeros()

bool frange::combine_zeros ( const frange & r,
bool union_p )
private

◆ contains_p() [1/2]

◆ contains_p() [2/2]

bool frange::contains_p ( tree cst) const
inlineoverrideprotectedvirtual

Implements vrange.

References contains_p(), and TREE_REAL_CST_PTR.

◆ dump()

◆ fits_p()

bool frange::fits_p ( const vrange & ) const
overridevirtual

Implements vrange.

◆ flush_denormals_to_zero()

◆ get_bitmask()

irange_bitmask vrange::get_bitmask ( ) const
virtualinherited

◆ get_nan_state()

nan_state frange::get_nan_state ( ) const
inline

◆ get_nonzero_bits()

◆ internal_singleton_p()

◆ intersect()

◆ intersect_nans()

bool frange::intersect_nans ( const frange & r)
private

◆ known_isdenormal_or_zero()

bool frange::known_isdenormal_or_zero ( ) const
inline

◆ known_isfinite()

◆ known_isinf()

◆ known_isnan()

bool frange::known_isnan ( ) const
inline

References vrange::m_kind, and VR_NAN.

Referenced by build_ge(), build_gt(), build_le(), build_lt(), combine_zeros(), contains_p(), flush_denormals_to_zero(), cfn_isfinite::fold_range(), cfn_isinf::fold_range(), cfn_isnormal::fold_range(), foperator_ltgt::fold_range(), foperator_ordered::fold_range(), foperator_unordered::fold_range(), foperator_unordered_equal::fold_range(), foperator_unordered_ge::fold_range(), foperator_unordered_gt::fold_range(), foperator_unordered_le::fold_range(), foperator_unordered_lt::fold_range(), operator_abs::fold_range(), operator_equal::fold_range(), operator_ge::fold_range(), operator_gt::fold_range(), operator_le::fold_range(), operator_lt::fold_range(), operator_negate::fold_range(), operator_not_equal::fold_range(), range_operator::fold_range(), intersect(), intersect_nans(), foperator_div::op1_range(), foperator_ltgt::op1_range(), foperator_ordered::op1_range(), foperator_unordered::op1_range(), foperator_unordered_equal::op1_range(), foperator_unordered_ge::op1_range(), foperator_unordered_gt::op1_range(), foperator_unordered_le::op1_range(), foperator_unordered_lt::op1_range(), operator_equal::op1_range(), operator_ge::op1_range(), operator_gt::op1_range(), operator_le::op1_range(), operator_lt::op1_range(), operator_mult::op1_range(), operator_not_equal::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_gt::op2_range(), operator_le::op2_range(), operator_lt::op2_range(), operator==(), signbit_p(), union_(), and union_nans().

◆ known_isnormal()

bool frange::known_isnormal ( ) const
inline

◆ lbound()

tree frange::lbound ( ) const
overridevirtual

Implements vrange.

References build_real(), and lower_bound().

◆ lower_bound()

◆ maybe_isinf()

bool frange::maybe_isinf ( ) const
inline

◆ maybe_isnan() [1/2]

◆ maybe_isnan() [2/2]

bool frange::maybe_isnan ( bool sign) const
inline

◆ nan_signbit_p()

bool frange::nan_signbit_p ( bool & signbit) const
inline

◆ nonzero_p()

bool frange::nonzero_p ( ) const
overridevirtual

Implements vrange.

◆ normalize_kind()

◆ operator!=() [1/2]

bool frange::operator!= ( const frange & r) const
inline

References r.

◆ operator!=() [2/2]

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

References r.

◆ operator=()

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

◆ operator==() [1/2]

◆ operator==() [2/2]

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

◆ set() [1/3]

◆ set() [2/3]

◆ set() [3/3]

void frange::set ( tree min,
tree max,
value_range_kind kind = VR_RANGE )
overrideprotectedvirtual

Implements vrange.

References set(), TREE_REAL_CST_PTR, and TREE_TYPE.

◆ set_nan() [1/3]

void frange::set_nan ( tree type)
inline

◆ set_nan() [2/3]

void frange::set_nan ( tree type,
bool sign )
inline

References set_nan().

◆ set_nan() [3/3]

◆ set_nonnegative()

void frange::set_nonnegative ( tree type)
overridevirtual

Implements vrange.

References dconst0, frange_val_max(), and set().

◆ set_nonzero()

void frange::set_nonzero ( tree type)
overridevirtual

Implements vrange.

References set_varying().

◆ set_nonzero_bits()

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

◆ set_undefined()

void frange::set_undefined ( )
inlineoverridevirtual

◆ set_varying()

void frange::set_varying ( tree type)
inlineoverridevirtual

◆ set_zero()

void frange::set_zero ( tree type)
overridevirtual

Implements vrange.

References clear_nan(), dconst0, dconstm0, HONOR_SIGNED_ZEROS(), and set().

◆ signbit_p()

bool frange::signbit_p ( bool & signbit) const
inline

◆ singleton_p() [1/2]

bool frange::singleton_p ( REAL_VALUE_TYPE & r) const

References internal_singleton_p(), and r.

◆ singleton_p() [2/2]

◆ supports_p()

◆ supports_type_p()

bool frange::supports_type_p ( const_tree type) const
overridevirtual

Implements vrange.

References supports_p().

◆ type()

tree frange::type ( ) const
inlineoverridevirtual

◆ ubound()

tree frange::ubound ( ) const
overridevirtual

Implements vrange.

References build_real(), and upper_bound().

◆ 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(), clear_nan(), combine_zeros(), compare_nonzero_chars(), compute_distributive_range(), contains_p(), irange::contains_p(), prange::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(), flush_denormals_to_zero(), cfn_clrsb::fold_range(), cfn_clz::fold_range(), cfn_ctz::fold_range(), cfn_ffs::fold_range(), cfn_isfinite::fold_range(), cfn_isinf::fold_range(), cfn_isnormal::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(), get_known_nonzero_bits_1(), vrange::get_nonzero_bits(), get_range_strlen_dynamic(), get_ref_base_and_extent(), get_shift_range(), get_size_range(), handle_printf_call(), intersect(), irange::intersect(), irange::intersect(), prange::intersect(), unsupported_range::intersect(), irange::intersect_bitmask(), irange::invert(), prange::invert(), ipa_vr_operation_and_type_effects(), irange::irange_contains_p(), irange::irange_single_pair_union(), 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(), lower_bound(), prange::lower_bound(), maybe_isinf(), maybe_isnan(), maybe_isnan(), 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(), 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(), operator==(), prange::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(), 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(), type(), prange::type(), value_range::undefined_p(), union_(), irange::union_(), prange::union_(), unsupported_range::union_(), irange::union_bitmask(), unswitch_predicate::unswitch_predicate(), irange::update_bitmask(), pointer_plus_operator::update_bitmask(), prange::update_bitmask(), update_known_bitmask(), update_nan(), update_nan(), update_nan(), upper_bound(), prange::upper_bound(), prange::varying_compatible_p(), vect_get_range_info(), verify_range(), and vr_set_zero_nonzero_bits().

◆ union_()

◆ union_nans()

bool frange::union_nans ( const frange & r)
private

◆ update_bitmask()

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

Reimplemented in irange.

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

◆ update_nan() [1/4]

void frange::update_nan ( )
inline

◆ update_nan() [2/4]

void frange::update_nan ( bool sign)
inline

◆ update_nan() [3/4]

◆ update_nan() [4/4]

void frange::update_nan ( tree )
delete

◆ upper_bound()

◆ varying_p()

bool vrange::varying_p ( ) const
inlineinherited

References vrange::m_kind, and VR_VARYING.

Referenced by gimple_infer_range::add_range(), gimple_outgoing_range::calc_switch_ranges(), phi_group::calculate_using_modifier(), array_bounds_checker::check_array_ref(), compare_nonzero_chars(), compute_distributive_range(), contains_p(), prange::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(), intersect(), irange::intersect(), prange::intersect(), unsupported_range::intersect(), irange::invert(), prange::invert(), ipa_vr_operation_and_type_effects(), irange::irange_contains_p(), irange::irange_single_pair_union(), known_isfinite(), gori_compute::logical_combine(), maybe_isinf(), ipcp_vr_lattice::meet_with_1(), operator_bitwise_xor::op1_range(), operator==(), prange::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(), union_(), irange::union_(), prange::union_(), unsupported_range::union_(), unswitch_predicate::unswitch_predicate(), value_range::varying_p(), and vr_set_zero_nonzero_bits().

◆ verify_range()

◆ zero_p()

bool frange::zero_p ( ) const
overridevirtual

Implements vrange.

References vrange::m_kind, m_max, m_min, real_iszero(), and VR_RANGE.

Referenced by operator_equal::op1_range().

Friends And Related Symbol Documentation

◆ frange_storage

friend class frange_storage
friend

◆ vrange_printer

friend class vrange_printer
friend

Field Documentation

◆ m_discriminator

◆ m_kind

◆ m_max

◆ m_min

◆ m_neg_nan

◆ m_pos_nan

◆ m_type


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