GCC Middle and Back End API Reference
|
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "insn-codes.h"
#include "rtl.h"
#include "tree.h"
#include "gimple.h"
#include "cfghooks.h"
#include "tree-pass.h"
#include "ssa.h"
#include "optabs-tree.h"
#include "gimple-pretty-print.h"
#include "diagnostic-core.h"
#include "flags.h"
#include "fold-const.h"
#include "stor-layout.h"
#include "calls.h"
#include "cfganal.h"
#include "gimple-iterator.h"
#include "gimple-fold.h"
#include "tree-eh.h"
#include "gimple-walk.h"
#include "tree-cfg.h"
#include "wide-int.h"
#include "value-relation.h"
#include "range-op.h"
#include "tree-ssa-ccp.h"
#include "range-op-mixed.h"
Data Structures | |
class | operator_widen_plus_signed |
class | operator_widen_plus_unsigned |
class | operator_widen_mult_signed |
class | operator_widen_mult_unsigned |
class | operator_div |
class | operator_exact_divide |
class | operator_lshift |
class | operator_rshift |
class | operator_logical_and |
class | operator_logical_or |
class | operator_trunc_mod |
class | operator_logical_not |
class | operator_unknown |
class | operator_absu |
|
static |
References plus_minus_ranges(), r, relation_intersect(), relation_lt_le_gt_ge_p(), SIGNED, TYPE_OVERFLOW_WRAPS, TYPE_SIGN, and VREL_VARYING.
Referenced by operator_minus::op1_range(), and operator_plus::op1_range().
References max_limit(), and r.
References min_limit(), and r.
|
inlinestatic |
References wi::gt_p(), r, TYPE_SIGN, and value_range_from_overflowed_bounds().
Referenced by operator_cast::fold_pair(), operator_cast::op1_range(), operator_bitwise_and::simple_op1_range_solver(), and operator_mult::wi_fold().
|
constexpr |
Referenced by range_op_handler::dispatch_kind().
bool_range_state get_bool_state | ( | vrange & | r, |
const vrange & | lhs, | ||
tree | val_type ) |
References BRS_EMPTY, BRS_FALSE, BRS_FULL, BRS_TRUE, build_zero_cst(), and r.
Referenced by 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_bitwise_xor::op1_range(), operator_equal::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_logical_and::op1_range(), operator_logical_or::op1_range(), operator_lt::op1_range(), operator_lt::op1_range(), operator_lt::op1_range(), operator_not_equal::op1_range(), operator_not_equal::op1_range(), operator_not_equal::op1_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(), and operator_lt::op2_range().
References r, wi::shwi(), irange::type(), TYPE_PRECISION, and vrange::undefined_p().
Referenced by operator_lshift::fold_range(), and operator_rshift::fold_range().
|
inlinestatic |
References is_a< prange >().
wide_int masked_increment | ( | const wide_int & | val_in, |
const wide_int & | mask, | ||
const wide_int & | sgnbit, | ||
unsigned int | prec ) |
Find out smallest RES where RES > VAL && (RES & MASK) == RES, if any (otherwise return VAL). VAL and MASK must be zero-extended for precision PREC. If SGNBIT is non-zero, first xor VAL with SGNBIT (to transform signed values into unsigned) and at the end xor SGNBIT back.
References wi::bit_and_not(), wi::gtu_p(), i, and wi::one().
Referenced by operator_bitwise_and::simple_op1_range_solver().
|
inlinestatic |
References irange_val_max().
Referenced by build_ge(), and build_gt().
|
inlinestatic |
References irange_val_min().
Referenced by build_le(), and build_lt().
bool minus_op1_op2_relation_effect | ( | irange & | lhs_range, |
tree | type, | ||
const irange & | op1_range, | ||
const irange & | op2_range, | ||
relation_kind | rel ) |
References irange::intersect(), wi::max_value(), wi::min_value(), wi::minus_one(), wi::one(), TYPE_OVERFLOW_WRAPS, TYPE_PRECISION, TYPE_SIGN, VR_ANTI_RANGE, VREL_EQ, VREL_GE, VREL_GT, VREL_LE, VREL_LT, VREL_NE, VREL_VARYING, and wi::zero().
Referenced by operator_minus::op1_op2_relation_effect(), and operator_pointer_diff::op1_op2_relation_effect().
|
static |
References irange_val_max(), wi::neg(), wi::neg_p(), offset, SIGNED, wi::sub(), TYPE_PRECISION, UNSIGNED, VR_ANTI_RANGE, VREL_GT, VREL_LT, VREL_VARYING, and wi::zero().
Referenced by adjust_op1_for_overflow().
References contains_zero_p(), and r.
Referenced by operator_bitwise_and::op1_range(), and operator_bitwise_and::simple_op1_range_solver().
Header file for mixed range operator class. Copyright (C) 2017-2024 Free Software Foundation, Inc. Contributed by Andrew MacLeod <amacleod@redhat.com> and Aldy Hernandez <aldyh@redhat.com>. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>.
References bit_value_binop(), bit_value_unop(), wide_int_storage::from(), gcc_unreachable, vrange::get_bitmask(), get_gimple_rhs_class(), GIMPLE_BINARY_RHS, GIMPLE_UNARY_RHS, irange_bitmask::mask(), r, vrange::type(), TYPE_PRECISION, TYPE_SIGN, vrange::undefined_p(), and irange_bitmask::value().
Referenced by operator_bitwise_and::fold_range(), operator_bitwise_or::fold_range(), operator_max::fold_range(), operator_min::fold_range(), pointer_plus_operator::fold_range(), operator_abs::update_bitmask(), operator_absu::update_bitmask(), operator_bitwise_and::update_bitmask(), operator_bitwise_not::update_bitmask(), operator_bitwise_or::update_bitmask(), operator_bitwise_xor::update_bitmask(), operator_cast::update_bitmask(), operator_div::update_bitmask(), operator_equal::update_bitmask(), operator_ge::update_bitmask(), operator_gt::update_bitmask(), operator_le::update_bitmask(), operator_lshift::update_bitmask(), operator_lt::update_bitmask(), operator_max::update_bitmask(), operator_min::update_bitmask(), operator_minus::update_bitmask(), operator_mult::update_bitmask(), operator_not_equal::update_bitmask(), operator_plus::update_bitmask(), operator_pointer_diff::update_bitmask(), operator_rshift::update_bitmask(), operator_trunc_mod::update_bitmask(), and pointer_plus_operator::update_bitmask().
|
static |
References wi::cmp(), wide_int_storage::from(), r, TYPE_PRECISION, TYPE_SIGN, and VR_ANTI_RANGE.
Referenced by create_possibly_reversed_range(), and value_range_with_overflow().
|
static |
References wide_int_storage::from(), wi::gt_p(), wi::max_value(), wi::min_value(), wi::ne_p(), wi::OVF_NONE, wi::OVF_OVERFLOW, wi::OVF_UNDERFLOW, r, TYPE_OVERFLOW_WRAPS, TYPE_PRECISION, TYPE_SIGN, and value_range_from_overflowed_bounds().
Referenced by cross_product_operator::wi_cross_product(), operator_bitwise_and::wi_fold(), operator_bitwise_or::wi_fold(), operator_bitwise_xor::wi_fold(), operator_max::wi_fold(), operator_min::wi_fold(), operator_minus::wi_fold(), operator_plus::wi_fold(), operator_trunc_mod::wi_fold(), wi_optimize_and_or(), and wi_optimize_signed_bitwise_op().
|
static |
References wi::bit_and(), wi::bit_or(), wi::ctz(), wi::eq_p(), gcc_unreachable, wide_int_storage::get_precision(), wi::mask(), wi::ne_p(), r, irange::set_nonzero(), and value_range_with_overflow().
Referenced by operator_bitwise_and::wi_fold(), and operator_bitwise_or::wi_fold().
|
static |
References wi::clrsb(), wi::mask(), MIN, r, TYPE_PRECISION, and value_range_with_overflow().
Referenced by operator_bitwise_and::wi_fold(), operator_bitwise_or::wi_fold(), and operator_bitwise_xor::wi_fold().
void wi_set_zero_nonzero_bits | ( | tree | type, |
const wide_int & | lb, | ||
const wide_int & | ub, | ||
wide_int & | maybe_nonzero, | ||
wide_int & | mustbe_nonzero ) |
References wi::bit_and_not(), wi::eq_p(), wi::floor_log2(), wi::ge_p(), wide_int_storage::get_precision(), wi::lt_p(), wi::mask(), wi::minus_one(), TYPE_SIGN, and wi::zero().
Referenced by vr_set_zero_nonzero_bits(), operator_bitwise_and::wi_fold(), operator_bitwise_or::wi_fold(), and operator_bitwise_xor::wi_fold().
range_operator default_operator |
operator_abs op_abs |
Referenced by range_op_table::range_op_table().
operator_absu op_absu |
Referenced by range_op_table::initialize_integral_ops().
operator_addr_expr op_addr |
Referenced by range_op_table::range_op_table().
operator_bitwise_and op_bitwise_and |
Referenced by range_op_table::range_op_table().
operator_bitwise_not op_bitwise_not |
Referenced by range_op_table::range_op_table().
operator_bitwise_or op_bitwise_or |
Referenced by range_op_table::range_op_table().
operator_bitwise_xor op_bitwise_xor |
Referenced by range_op_table::range_op_table().
operator_cast op_cast |
Referenced by range_op_table::range_op_table().
|
static |
Referenced by range_op_table::initialize_integral_ops().
operator_cst op_cst |
Referenced by range_op_table::range_op_table().
operator_equal op_equal |
Code for range operators. Copyright (C) 2017-2024 Free Software Foundation, Inc. Contributed by Andrew MacLeod <amacleod@redhat.com> and Aldy Hernandez <aldyh@redhat.com>. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>.
Referenced by range_op_table::range_op_table().
operator_exact_divide op_exact_div |
Referenced by range_op_table::initialize_integral_ops().
|
static |
Referenced by range_op_table::initialize_integral_ops().
operator_ge op_ge |
Referenced by range_op_table::range_op_table().
operator_gt op_gt |
Referenced by range_op_table::range_op_table().
operator_identity op_ident |
Referenced by range_op_table::range_op_table().
operator_le op_le |
Referenced by range_op_table::range_op_table().
operator_logical_and op_logical_and |
Referenced by range_op_table::initialize_integral_ops(), and operator_bitwise_and::op1_range().
operator_logical_not op_logical_not |
operator_logical_or op_logical_or |
Referenced by range_op_table::initialize_integral_ops(), and operator_bitwise_or::op1_range().
operator_lshift op_lshift |
Referenced by range_op_table::initialize_integral_ops(), and operator_rshift::op1_range().
operator_lt op_lt |
Referenced by range_op_table::range_op_table().
operator_max op_max |
Referenced by range_op_table::range_op_table().
operator_min op_min |
Referenced by range_op_table::range_op_table().
operator_minus op_minus |
Referenced by range_op_table::range_op_table().
operator_mult op_mult |
operator_negate op_negate |
Referenced by range_op_table::range_op_table().
operator_not_equal op_not_equal |
Referenced by range_op_table::range_op_table().
operator_plus op_plus |
Referenced by operator_rshift::op1_range(), and range_op_table::range_op_table().
|
static |
Referenced by range_op_table::initialize_integral_ops().
operator_rshift op_rshift |
|
static |
Referenced by range_op_table::initialize_integral_ops().
operator_trunc_mod op_trunc_mod |
Referenced by range_op_table::initialize_integral_ops().
operator_unknown op_unknown |
Referenced by range_op_table::initialize_integral_ops().
operator_widen_mult_signed op_widen_mult_signed |
Referenced by range_op_table::initialize_integral_ops().
operator_widen_mult_unsigned op_widen_mult_unsigned |
Referenced by range_op_table::initialize_integral_ops().
operator_widen_plus_signed op_widen_plus_signed |
Referenced by range_op_table::initialize_integral_ops().
operator_widen_plus_unsigned op_widen_plus_unsigned |
Referenced by range_op_table::initialize_integral_ops().
range_op_table operator_table |
Referenced by range_op_handler::range_op_handler().
const unsigned RO_FFF = dispatch_trio (VR_FRANGE, VR_FRANGE, VR_FRANGE) |
const unsigned RO_FIF = dispatch_trio (VR_FRANGE, VR_IRANGE, VR_FRANGE) |
Referenced by range_op_handler::op2_range(), and pointer_plus_operator::update_bitmask().
const unsigned RO_FII = dispatch_trio (VR_FRANGE, VR_IRANGE, VR_IRANGE) |
const unsigned RO_IFF = dispatch_trio (VR_IRANGE, VR_FRANGE, VR_FRANGE) |
const unsigned RO_IFI = dispatch_trio (VR_IRANGE, VR_FRANGE, VR_IRANGE) |
Referenced by range_op_handler::fold_range().
const unsigned RO_III = dispatch_trio (VR_IRANGE, VR_IRANGE, VR_IRANGE) |
const unsigned RO_IPI = dispatch_trio (VR_IRANGE, VR_PRANGE, VR_IRANGE) |
Referenced by pointer_plus_operator::update_bitmask().
const unsigned RO_IPP = dispatch_trio (VR_IRANGE, VR_PRANGE, VR_PRANGE) |
const unsigned RO_PII = dispatch_trio (VR_PRANGE, VR_IRANGE, VR_IRANGE) |
Referenced by range_op_handler::lhs_op1_relation().
const unsigned RO_PIP = dispatch_trio (VR_PRANGE, VR_IRANGE, VR_PRANGE) |
Referenced by range_op_handler::op2_range(), and pointer_plus_operator::update_bitmask().
const unsigned RO_PPI = dispatch_trio (VR_PRANGE, VR_PRANGE, VR_IRANGE) |
Referenced by pointer_plus_operator::update_bitmask().
const unsigned RO_PPP = dispatch_trio (VR_PRANGE, VR_PRANGE, VR_PRANGE) |
Referenced by range_op_handler::lhs_op1_relation(), and pointer_plus_operator::update_bitmask().