GCC Middle and Back End API Reference
frange Class Referenceabstract

#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
 
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
 
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
 
virtual void accept (const class vrange_visitor &v) const =0
 
virtual bool fits_p (const vrange &r) const
 
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
 
void gt_ggc_mx (frange *)
 
void gt_pch_nx (frange *)
 
void gt_pch_nx (frange *, gt_pointer_operator, void *)
 

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]

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

◆ accept() [2/2]

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

◆ clear_nan()

void frange::clear_nan ( )
inline

◆ combine_zeros()

◆ contains_p() [1/2]

◆ contains_p() [2/2]

bool frange::contains_p ( tree cst) const
inlineoverrideprotectedvirtual

Reimplemented from vrange.

References contains_p(), ggc_alloc(), and TREE_REAL_CST_PTR.

◆ dump()

◆ fits_p()

bool vrange::fits_p ( const vrange & r) const
virtualinherited

Reimplemented in irange.

◆ flush_denormals_to_zero()

◆ get_nan_state()

nan_state frange::get_nan_state ( ) const
inline

References m_neg_nan, and m_pos_nan.

Referenced by float_widen_lhs_range().

◆ internal_singleton_p()

◆ intersect()

◆ intersect_nans()

◆ known_isfinite()

bool frange::known_isfinite ( ) const
inline

◆ known_isinf()

bool frange::known_isinf ( ) const
inline

◆ 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(), float_binary_op_range_finish(), float_widen_lhs_range(), flush_denormals_to_zero(), range_operator::fold_range(), operator_abs::fold_range(), operator_negate::fold_range(), operator_not_equal::fold_range(), operator_le::fold_range(), foperator_unordered_lt::fold_range(), foperator_unordered_le::fold_range(), foperator_unordered_gt::fold_range(), foperator_unordered_ge::fold_range(), foperator_unordered_equal::fold_range(), foperator_ltgt::fold_range(), foperator_unordered::fold_range(), foperator_ordered::fold_range(), operator_equal::fold_range(), operator_lt::fold_range(), operator_gt::fold_range(), operator_ge::fold_range(), intersect(), intersect_nans(), lower_bound(), operator_abs::op1_range(), foperator_div::op1_range(), operator_mult::op1_range(), operator_le::op1_range(), foperator_unordered_lt::op1_range(), foperator_unordered::op1_range(), foperator_ordered::op1_range(), foperator_unordered_le::op1_range(), foperator_unordered_gt::op1_range(), foperator_unordered_ge::op1_range(), foperator_unordered_equal::op1_range(), foperator_ltgt::op1_range(), operator_equal::op1_range(), operator_not_equal::op1_range(), operator_lt::op1_range(), operator_gt::op1_range(), operator_ge::op1_range(), foperator_div::op2_range(), operator_le::op2_range(), foperator_unordered_lt::op2_range(), foperator_unordered_le::op2_range(), foperator_unordered_gt::op2_range(), foperator_unordered_ge::op2_range(), operator_lt::op2_range(), operator_gt::op2_range(), operator_ge::op2_range(), operator==(), signbit_p(), union_(), union_nans(), and upper_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

Reimplemented from 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

Reimplemented from vrange.

◆ 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 ggc_alloc(), and set_nan().

◆ set_nan() [3/3]

◆ set_nonnegative()

void frange::set_nonnegative ( tree type)
overridevirtual

Reimplemented from vrange.

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

◆ set_nonzero()

void frange::set_nonzero ( tree type)
overridevirtual

Reimplemented from vrange.

References set_varying().

◆ 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

Reimplemented from 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]

bool frange::singleton_p ( tree * result = NULL) const
overridevirtual

◆ supports_p()

◆ supports_type_p()

bool frange::supports_type_p ( const_tree type) const
overridevirtual

Reimplemented from vrange.

References supports_p().

◆ type()

tree frange::type ( ) const
inlineoverridevirtual

Reimplemented from vrange.

References gcc_checking_assert, m_type, and vrange::undefined_p().

Referenced by set(), set_nan(), and set_varying().

◆ undefined_p()

bool vrange::undefined_p ( ) const
inlineinherited

References vrange::m_kind, and VR_UNDEFINED.

Referenced by inchash::add_vrange(), adjust_equivalence_range(), array_bounds_checker::check_array_ref(), clear_nan(), combine_zeros(), compare_nonzero_chars(), gori_compute::compute_operand_range(), gori_compute::compute_operand_range_switch(), contains_p(), irange::contains_p(), strlen_pass::count_nonzero_bytes_addr(), dr_step_indicator(), empty_range_varying(), expr_not_equal_to(), expr_to_aff_combination(), find_case_label_ranges(), find_range_for_lhs(), flush_denormals_to_zero(), operator_lshift::fold_range(), operator_rshift::fold_range(), irange::get_bitmask(), get_bool_state(), irange::get_nonzero_bits(), get_range_strlen_dynamic(), get_ref_base_and_extent(), get_shift_range(), get_size_range(), handle_printf_call(), vrange::intersect(), irange::intersect(), intersect(), irange::intersect(), irange::intersect_bitmask(), irange::invert(), irange::irange_contains_p(), irange::irange_single_pair_union(), known_isfinite(), operator_identity::lhs_op1_relation(), operator_plus::lhs_op1_relation(), operator_minus::lhs_op1_relation(), operator_rshift::lhs_op1_relation(), operator_cast::lhs_op1_relation(), operator_bitwise_and::lhs_op1_relation(), lower_bound(), maybe_isinf(), maybe_isnan(), maybe_isnan(), nan_signbit_p(), irange::nonzero_p(), operator_equal::op1_op2_relation(), operator_not_equal::op1_op2_relation(), operator_lt::op1_op2_relation(), operator_le::op1_op2_relation(), operator_gt::op1_op2_relation(), operator_ge::op1_op2_relation(), operator_equal::op1_op2_relation(), operator_not_equal::op1_op2_relation(), operator_lt::op1_op2_relation(), operator_le::op1_op2_relation(), operator_gt::op1_op2_relation(), operator_ge::op1_op2_relation(), foperator_div::op1_range(), operator_plus::op1_range(), operator_minus::op1_range(), operator_mult::op1_range(), operator_le::op1_range(), foperator_unordered_lt::op1_range(), foperator_unordered_le::op1_range(), foperator_unordered_gt::op1_range(), foperator_unordered_ge::op1_range(), operator_lt::op1_range(), operator_gt::op1_range(), operator_ge::op1_range(), operator_rshift::op1_range(), pointer_or_operator::op1_range(), operator_cast::op1_range(), operator_addr_expr::op1_range(), operator_bitwise_not::op1_range(), operator_bitwise_xor::op1_range(), operator_lshift::op1_range(), operator_bitwise_and::op1_range(), operator_bitwise_or::op1_range(), operator_exact_divide::op1_range(), operator_trunc_mod::op1_range(), operator_plus::op1_range(), operator_minus::op1_range(), operator_mult::op1_range(), operator_not_equal::op1_range(), operator_lt::op1_range(), operator_le::op1_range(), operator_gt::op1_range(), operator_ge::op1_range(), operator_equal::op1_range(), range_op_handler::op1_range(), foperator_div::op2_range(), operator_minus::op2_range(), operator_le::op2_range(), foperator_unordered_lt::op2_range(), foperator_unordered_le::op2_range(), foperator_unordered_gt::op2_range(), foperator_unordered_ge::op2_range(), operator_lt::op2_range(), operator_gt::op2_range(), operator_ge::op2_range(), operator_trunc_mod::op2_range(), operator_minus::op2_range(), operator_lt::op2_range(), operator_le::op2_range(), operator_gt::op2_range(), operator_ge::op2_range(), range_op_handler::op2_range(), operator==(), range_fits_type_p(), range_includes_zero_p(), irange::set_nonzero_bits(), set_nonzero_range_from_mask(), irange::set_range_from_bitmask(), set_switch_stmt_execution_predicate(), signbit_p(), simplify_using_ranges::simplify(), 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(), Value_Range::undefined_p(), vrange::union_(), irange::union_(), union_(), irange::union_bitmask(), unswitch_predicate::unswitch_predicate(), irange::update_bitmask(), update_nan(), update_nan(), update_nan(), upper_bound(), relation_oracle::validate_relation(), vect_get_range_info(), verify_range(), and vr_set_zero_nonzero_bits().

◆ union_()

◆ union_nans()

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

◆ 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()

◆ verify_range()

◆ zero_p()

bool frange::zero_p ( ) const
overridevirtual

Reimplemented from 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

◆ gt_ggc_mx

void gt_ggc_mx ( frange * )
friend

◆ gt_pch_nx [1/2]

void gt_pch_nx ( frange * )
friend

◆ gt_pch_nx [2/2]

void gt_pch_nx ( frange * ,
gt_pointer_operator ,
void *  )
friend

◆ vrange_printer

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: