GCC Middle and Back End API Reference
|
#include <value-range.h>
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 |
prange & | operator= (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 |
|
inline |
References set_undefined().
|
inline |
References set_varying().
|
inline |
References set().
|
finaloverridevirtual |
References vrange_visitor::visit().
|
pure virtualinherited |
Referenced by value_range::accept(), and vrange::dump().
References wi::ge_p(), wi::le_p(), lower_bound(), vrange::undefined_p(), UNSIGNED, upper_bound(), and vrange::varying_p().
|
inherited |
References vrange::accept(), pp_flush(), pp_needs_newline(), and pretty_printer::set_output_stream().
Referenced by assume_query::calculate_phi(), assume_query::calculate_stmt(), phi_group::dump(), value_range::dump(), dump_strlen_info(), dump_value_range(), gori_compute::logical_combine(), phi_analyzer::process_phi(), and fold_using_range::relation_fold_and_or().
|
inlinefinaloverridevirtual |
Reimplemented from vrange.
References m_bitmask.
Referenced by operator_cast::fold_range(), operator_cast::fold_range(), operator_equal::fold_range(), operator_not_equal::fold_range(), and varying_compatible_p().
|
inherited |
Implements vrange.
References as_a(), gcc_checking_assert, get_bitmask_from_range(), wi::gt_p(), irange_bitmask::intersect(), lower_bound(), m_bitmask, m_max, m_min, m_type, wi::max(), wi::min(), r, range_compatible_p(), set_undefined(), set_varying(), vrange::undefined_p(), UNSIGNED, upper_bound(), varying_compatible_p(), vrange::varying_p(), and verify_range().
Referenced by operator_equal::fold_range(), and operator_not_equal::fold_range().
void prange::invert | ( | ) |
References wi::add(), gcc_checking_assert, lower_bound(), wi::max_value(), set(), set_varying(), wi::sub(), TYPE_PRECISION, vrange::undefined_p(), UNSIGNED, upper_bound(), vrange::varying_p(), and wi::zero().
Referenced by operator_equal::op1_range(), and operator_not_equal::op1_range().
|
finaloverridevirtual |
Implements vrange.
References m_min, and wide_int_to_tree().
|
inline |
References gcc_checking_assert, m_min, and vrange::undefined_p().
Referenced by build_ge(), build_gt(), contains_p(), operator_cast::fold_range(), operator_cast::fold_range(), operator_equal::fold_range(), operator_ge::fold_range(), operator_gt::fold_range(), operator_le::fold_range(), operator_lt::fold_range(), operator_not_equal::fold_range(), pointer_plus_operator::fold_range(), intersect(), invert(), operator_equal::op1_range(), operator_not_equal::op1_range(), singleton_p(), and union_().
|
inlinefinaloverridevirtual |
Implements vrange.
References vrange::m_kind, m_max, m_min, and VR_RANGE.
Referenced by find_what_p_points_to().
References m_bitmask, vrange::m_kind, m_max, m_min, m_type, and verify_range().
References m_bitmask, vrange::m_kind, m_max, m_min, type(), types_compatible_p(), vrange::undefined_p(), and vrange::varying_p().
References as_a(), gcc_unreachable, is_a< frange >(), is_a< irange >(), and is_a< prange >().
void prange::set | ( | tree | type, |
const wide_int & | min, | ||
const wide_int & | max, | ||
value_range_kind | kind = VR_RANGE ) |
|
finaloverridevirtual |
Implements vrange.
References set(), wi::to_wide(), and TREE_TYPE.
Referenced by operator_cast::fold_range(), invert(), prange(), set(), set_nonnegative(), and update_bitmask().
|
finaloverridevirtual |
Implements vrange.
References wi::max_value(), set(), TYPE_PRECISION, UNSIGNED, and wi::zero().
|
inlinefinaloverridevirtual |
Implements vrange.
References m_bitmask, vrange::m_kind, m_max, m_min, m_type, wi::max_value(), wi::one(), irange_bitmask::set_unknown(), type(), TYPE_PRECISION, UNSIGNED, verify_range(), and VR_RANGE.
Referenced by gimple_infer_range::add_nonzero(), sbr_sparse_bitmap::sbr_sparse_bitmap(), and set().
|
inherited |
References gcc_checking_assert, TYPE_PRECISION, vrange::undefined_p(), vrange::update_bitmask(), and wi::zero().
Referenced by operator_bitwise_and::op1_range().
|
inlinefinaloverridevirtual |
Implements vrange.
References vrange::m_kind, and VR_UNDEFINED.
Referenced by intersect(), prange(), and set().
|
inlinefinaloverridevirtual |
Implements vrange.
References m_bitmask, vrange::m_kind, m_max, m_min, m_type, wi::max_value(), irange_bitmask::set_unknown(), type(), TYPE_PRECISION, UNSIGNED, verify_range(), VR_VARYING, and wi::zero().
Referenced by intersect(), invert(), operator_equal::op1_range(), prange(), set(), and union_().
|
inlinefinaloverridevirtual |
Implements vrange.
References m_bitmask, vrange::m_kind, m_max, m_min, m_type, type(), TYPE_PRECISION, verify_range(), VR_RANGE, and wi::zero().
Implements vrange.
References lower_bound(), vrange::m_kind, m_min, upper_bound(), VR_RANGE, and wide_int_to_tree().
|
inlinestatic |
|
inlinefinaloverridevirtual |
Implements vrange.
References POINTER_TYPE_P.
|
inlinefinaloverridevirtual |
Implements vrange.
References gcc_checking_assert, m_type, and vrange::undefined_p().
Referenced by prange_storage::equal_p(), operator_cast::fold_range(), operator_ge::fold_range(), operator_gt::fold_range(), operator_le::fold_range(), operator_lt::fold_range(), operator_cast::lhs_op1_relation(), operator_cast::lhs_op1_relation(), operator_cast::op1_range(), operator_cast::op1_range(), operator==(), set(), set_nonzero(), set_varying(), and set_zero().
|
finaloverridevirtual |
Implements vrange.
References m_max, and wide_int_to_tree().
|
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_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(), 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(), 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(), pointer_plus_operator::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().
Implements vrange.
References as_a(), lower_bound(), m_bitmask, wi::max(), wi::min(), r, set_varying(), vrange::undefined_p(), irange_bitmask::union_(), UNSIGNED, upper_bound(), varying_compatible_p(), vrange::varying_p(), and verify_range().
|
finaloverride |
|
virtualinherited |
Reimplemented in irange.
Referenced by vrange::set_nonzero_bits(), and value_range::update_bitmask().
|
inline |
References gcc_checking_assert, m_max, and vrange::undefined_p().
Referenced by build_le(), contains_p(), operator_cast::fold_range(), operator_cast::fold_range(), operator_equal::fold_range(), operator_ge::fold_range(), operator_gt::fold_range(), operator_le::fold_range(), operator_lt::fold_range(), operator_not_equal::fold_range(), pointer_plus_operator::fold_range(), intersect(), invert(), operator_equal::op1_range(), operator_not_equal::op1_range(), singleton_p(), and union_().
|
inlineprotected |
References get_bitmask(), m_max, m_min, and vrange::undefined_p().
Referenced by intersect(), union_(), update_bitmask(), and verify_range().
|
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(), 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().
void prange::verify_range | ( | ) | const |
References gcc_checking_assert, vrange::m_discriminator, vrange::m_kind, supports_p(), varying_compatible_p(), VR_PRANGE, VR_RANGE, VR_UNDEFINED, and VR_VARYING.
Referenced by intersect(), operator=(), set(), set_nonzero(), set_varying(), set_zero(), union_(), and update_bitmask().
|
inlinefinaloverridevirtual |
Implements vrange.
References vrange::m_kind, m_max, m_min, and VR_RANGE.
Referenced by operator_bitwise_and::fold_range(), operator_bitwise_or::fold_range(), operator_lt::fold_range(), operator_max::fold_range(), and operator_min::fold_range().
|
friend |
|
friend |
|
protected |
Referenced by get_bitmask(), intersect(), operator=(), operator==(), set(), set_nonzero(), set_varying(), set_zero(), union_(), and update_bitmask().
|
protectedinherited |
|
protectedinherited |
Referenced by frange::combine_zeros(), frange::contains_p(), frange::internal_singleton_p(), frange::intersect(), irange::intersect(), irange::intersect(), frange::intersect_nans(), irange::invert(), frange::known_isfinite(), frange::known_isinf(), frange::known_isnan(), frange::maybe_isinf(), nonzero_p(), frange::normalize_kind(), irange::normalize_kind(), frange::operator=(), irange::operator=(), operator=(), vrange::operator=(), frange::operator==(), operator==(), frange::set(), irange::set(), set(), frange::set_nan(), irange::set_nonzero(), set_nonzero(), frange::set_undefined(), irange::set_undefined(), set_undefined(), unsupported_range::set_undefined(), frange::set_varying(), irange::set_varying(), set_varying(), unsupported_range::set_varying(), set_zero(), singleton_p(), vrange::undefined_p(), irange::union_(), frange::union_nans(), irange::update_bitmask(), update_bitmask(), irange::varying_compatible_p(), vrange::varying_p(), frange::verify_range(), irange::verify_range(), verify_range(), frange::zero_p(), irange::zero_p(), and zero_p().
|
protected |
Referenced by intersect(), nonzero_p(), operator=(), operator==(), set(), set_nonzero(), set_varying(), set_zero(), ubound(), upper_bound(), varying_compatible_p(), and zero_p().
|
protected |
Referenced by intersect(), lbound(), lower_bound(), nonzero_p(), operator=(), operator==(), set(), set_nonzero(), set_varying(), set_zero(), singleton_p(), varying_compatible_p(), and zero_p().
|
protected |
Referenced by intersect(), operator=(), set(), set_nonzero(), set_varying(), set_zero(), and type().