GCC Middle and Back End API Reference
operator_plus Class Reference

#include <range-op-mixed.h>

Inheritance diagram for operator_plus:
Collaboration diagram for operator_plus:

Public Member Functions

bool op1_range (irange &r, tree type, const irange &lhs, const irange &op2, relation_trio) const final override
 
bool op1_range (frange &r, tree type, const frange &lhs, const frange &op2, relation_trio=TRIO_VARYING) const final override
 
bool op2_range (irange &r, tree type, const irange &lhs, const irange &op1, relation_trio) const final override
 
bool op2_range (frange &r, tree type, const frange &lhs, const frange &op1, relation_trio=TRIO_VARYING) const final override
 
relation_kind lhs_op1_relation (const irange &lhs, const irange &op1, const irange &op2, relation_kind rel) const final override
 
relation_kind lhs_op2_relation (const irange &lhs, const irange &op1, const irange &op2, relation_kind rel) const final override
 
void update_bitmask (irange &r, const irange &lh, const irange &rh) const final override
 
virtual bool overflow_free_p (const irange &lh, const irange &rh, relation_trio=TRIO_VARYING) const
 
bool operand_check_p (tree t1, tree t2, tree t3) const final override
 
virtual bool op1_range (prange &r, tree type, const prange &lhs, const prange &op2, relation_trio=TRIO_VARYING) const
 
virtual bool op1_range (prange &r, tree type, const irange &lhs, const prange &op2, relation_trio=TRIO_VARYING) const
 
virtual bool op1_range (prange &r, tree type, const prange &lhs, const irange &op2, relation_trio=TRIO_VARYING) const
 
virtual bool op1_range (irange &r, tree type, const prange &lhs, const irange &op2, relation_trio=TRIO_VARYING) const
 
virtual bool op1_range (frange &r, tree type, const irange &lhs, const frange &op2, relation_trio=TRIO_VARYING) const
 
virtual bool op2_range (prange &r, tree type, const irange &lhs, const prange &op1, relation_trio=TRIO_VARYING) const
 
virtual bool op2_range (irange &r, tree type, const prange &lhs, const prange &op1, relation_trio=TRIO_VARYING) const
 
virtual bool op2_range (frange &r, tree type, const irange &lhs, const frange &op1, relation_trio=TRIO_VARYING) const
 
virtual relation_kind lhs_op1_relation (const prange &lhs, const prange &op1, const prange &op2, relation_kind=VREL_VARYING) const
 
virtual relation_kind lhs_op1_relation (const prange &lhs, const irange &op1, const irange &op2, relation_kind=VREL_VARYING) const
 
virtual relation_kind lhs_op1_relation (const irange &lhs, const prange &op1, const prange &op2, relation_kind=VREL_VARYING) const
 
virtual relation_kind lhs_op1_relation (const frange &lhs, const frange &op1, const frange &op2, relation_kind=VREL_VARYING) const
 
virtual relation_kind lhs_op1_relation (const irange &lhs, const frange &op1, const frange &op2, relation_kind=VREL_VARYING) const
 
virtual relation_kind lhs_op2_relation (const frange &lhs, const frange &op1, const frange &op2, relation_kind=VREL_VARYING) const
 
virtual relation_kind lhs_op2_relation (const irange &lhs, const frange &op1, const frange &op2, relation_kind=VREL_VARYING) const
 
virtual void update_bitmask (irange &, const prange &, const prange &) const
 
virtual bool fold_range (irange &r, tree type, const irange &lh, const irange &rh, relation_trio=TRIO_VARYING) const
 
virtual bool fold_range (frange &r, tree type, const frange &lh, const frange &rh, relation_trio=TRIO_VARYING) const
 
virtual bool fold_range (irange &r, tree type, const frange &lh, const irange &rh, relation_trio=TRIO_VARYING) const
 
virtual bool fold_range (irange &r, tree type, const frange &lh, const frange &rh, relation_trio=TRIO_VARYING) const
 
virtual bool fold_range (frange &r, tree type, const irange &lh, const irange &rh, relation_trio=TRIO_VARYING) const
 
virtual bool fold_range (prange &r, tree type, const prange &lh, const prange &rh, relation_trio=TRIO_VARYING) const
 
virtual bool fold_range (prange &r, tree type, const prange &lh, const irange &rh, relation_trio=TRIO_VARYING) const
 
virtual bool fold_range (irange &r, tree type, const prange &lh, const prange &rh, relation_trio=TRIO_VARYING) const
 
virtual bool fold_range (prange &r, tree type, const irange &lh, const prange &rh, relation_trio=TRIO_VARYING) const
 
virtual bool fold_range (irange &r, tree type, const prange &lh, const irange &rh, relation_trio=TRIO_VARYING) const
 
virtual relation_kind op1_op2_relation (const irange &lhs, const irange &op1, const irange &op2) const
 
virtual relation_kind op1_op2_relation (const irange &lhs, const prange &op1, const prange &op2) const
 
virtual relation_kind op1_op2_relation (const irange &lhs, const frange &op1, const frange &op2) const
 
virtual relation_kind op1_op2_relation (const frange &lhs, const frange &op1, const frange &op2) const
 

Protected Member Functions

virtual bool op1_op2_relation_effect (irange &lhs_range, tree type, const irange &op1_range, const irange &op2_range, relation_kind rel) const
 
virtual bool op1_op2_relation_effect (prange &lhs_range, tree type, const prange &op1_range, const prange &op2_range, relation_kind rel) const
 
virtual bool op1_op2_relation_effect (prange &lhs_range, tree type, const prange &op1_range, const irange &op2_range, relation_kind rel) const
 
virtual bool op1_op2_relation_effect (irange &lhs_range, tree type, const prange &op1_range, const prange &op2_range, relation_kind rel) const
 
virtual bool op1_op2_relation_effect (prange &lhs_range, tree type, const irange &op1_range, const prange &op2_range, relation_kind rel) const
 
virtual bool op1_op2_relation_effect (irange &lhs_range, tree type, const prange &op1_range, const irange &op2_range, relation_kind rel) const
 
void wi_fold_in_parts (irange &r, tree type, const wide_int &lh_lb, const wide_int &lh_ub, const wide_int &rh_lb, const wide_int &rh_ub) const
 
void wi_fold_in_parts_equiv (irange &r, tree type, const wide_int &lb, const wide_int &ub, unsigned limit) const
 

Private Member Functions

void wi_fold (irange &r, tree type, const wide_int &lh_lb, const wide_int &lh_ub, const wide_int &rh_lb, const wide_int &rh_ub) const final override
 
void rv_fold (frange &r, tree type, const REAL_VALUE_TYPE &lh_lb, const REAL_VALUE_TYPE &lh_ub, const REAL_VALUE_TYPE &rh_lb, const REAL_VALUE_TYPE &rh_ub, relation_kind) const final override
 

Member Function Documentation

◆ fold_range() [1/10]

bool range_operator::fold_range ( frange & r,
tree type,
const frange & op1,
const frange & op2,
relation_trio trio = TRIO_VARYING ) const
virtualinherited
Floating point range operators.
   Copyright (C) 2022-2024 Free Software Foundation, Inc.
   Contributed by 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/>.   

Reimplemented in cfn_clrsb, cfn_clz, cfn_constant_float_p, cfn_constant_p, cfn_copysign, cfn_ctz, cfn_ffs, cfn_goacc_dim, cfn_isfinite, cfn_isinf, cfn_isnormal, cfn_parity, cfn_pass_through_arg1, cfn_popcount, cfn_signbit, cfn_sincos, cfn_sqrt, cfn_strlen, cfn_toupper_tolower, cfn_ubsan, foperator_ltgt, foperator_ordered, foperator_unordered, foperator_unordered_equal, foperator_unordered_ge, foperator_unordered_gt, foperator_unordered_le, foperator_unordered_lt, operator_abs, operator_addr_expr, operator_bitwise_and, operator_bitwise_not, operator_bitwise_or, operator_cast, operator_cst, operator_equal, operator_ge, operator_gt, operator_identity, operator_le, operator_logical_and, operator_logical_not, operator_logical_or, operator_lshift, operator_lt, operator_max, operator_min, operator_minus, operator_negate, operator_not_equal, operator_pointer_diff, operator_rshift, operator_unknown, and pointer_plus_operator.

References empty_range_varying(), frange::known_isnan(), frange::lower_bound(), frange::maybe_isnan(), relation_trio::op1_op2(), r, range_operator::rv_fold(), and frange::upper_bound().

◆ fold_range() [2/10]

◆ fold_range() [3/10]

◆ fold_range() [4/10]

◆ fold_range() [5/10]

bool range_operator::fold_range ( irange & r,
tree type,
const irange & lh,
const irange & rh,
relation_trio trio = TRIO_VARYING ) const
virtualinherited

◆ fold_range() [6/10]

◆ fold_range() [7/10]

◆ fold_range() [8/10]

◆ fold_range() [9/10]

◆ fold_range() [10/10]

bool range_operator::fold_range ( prange & r,
tree type,
const prange & lh,
const prange & rh,
relation_trio = TRIO_VARYING ) const
virtualinherited
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/>.   

Reimplemented in cfn_clrsb, cfn_clz, cfn_constant_float_p, cfn_constant_p, cfn_copysign, cfn_ctz, cfn_ffs, cfn_goacc_dim, cfn_isfinite, cfn_isinf, cfn_isnormal, cfn_parity, cfn_pass_through_arg1, cfn_popcount, cfn_signbit, cfn_sincos, cfn_sqrt, cfn_strlen, cfn_toupper_tolower, cfn_ubsan, foperator_ltgt, foperator_ordered, foperator_unordered, foperator_unordered_equal, foperator_unordered_ge, foperator_unordered_gt, foperator_unordered_le, foperator_unordered_lt, operator_abs, operator_addr_expr, operator_bitwise_and, operator_bitwise_not, operator_bitwise_or, operator_cast, operator_cst, operator_equal, operator_ge, operator_gt, operator_identity, operator_le, operator_logical_and, operator_logical_not, operator_logical_or, operator_lshift, operator_lt, operator_max, operator_min, operator_minus, operator_negate, operator_not_equal, operator_pointer_diff, operator_rshift, operator_unknown, and pointer_plus_operator.

◆ lhs_op1_relation() [1/6]

relation_kind range_operator::lhs_op1_relation ( const frange & lhs,
const frange & op1,
const frange & op2,
relation_kind = VREL_VARYING ) const
virtual

Reimplemented from range_operator.

◆ lhs_op1_relation() [2/6]

relation_kind range_operator::lhs_op1_relation ( const irange & lhs,
const frange & op1,
const frange & op2,
relation_kind = VREL_VARYING ) const
virtual

Reimplemented from range_operator.

◆ lhs_op1_relation() [3/6]

◆ lhs_op1_relation() [4/6]

relation_kind range_operator::lhs_op1_relation ( const irange & lhs,
const prange & op1,
const prange & op2,
relation_kind rel = VREL_VARYING ) const
virtual

Reimplemented from range_operator.

◆ lhs_op1_relation() [5/6]

relation_kind range_operator::lhs_op1_relation ( const prange & lhs,
const irange & op1,
const irange & op2,
relation_kind rel = VREL_VARYING ) const
virtual

Reimplemented from range_operator.

◆ lhs_op1_relation() [6/6]

relation_kind range_operator::lhs_op1_relation ( const prange & lhs,
const prange & op1,
const prange & op2,
relation_kind rel = VREL_VARYING ) const
virtual

Reimplemented from range_operator.

◆ lhs_op2_relation() [1/3]

relation_kind range_operator::lhs_op2_relation ( const frange & lhs,
const frange & op1,
const frange & op2,
relation_kind = VREL_VARYING ) const
virtual

Reimplemented from range_operator.

References VREL_VARYING.

◆ lhs_op2_relation() [2/3]

relation_kind range_operator::lhs_op2_relation ( const irange & lhs,
const frange & op1,
const frange & op2,
relation_kind = VREL_VARYING ) const
virtual

Reimplemented from range_operator.

◆ lhs_op2_relation() [3/3]

relation_kind operator_plus::lhs_op2_relation ( const irange & lhs,
const irange & op1,
const irange & op2,
relation_kind rel ) const
finaloverridevirtual

Reimplemented from range_operator.

References lhs_op1_relation().

◆ op1_op2_relation() [1/4]

relation_kind range_operator::op1_op2_relation ( const frange & lhs,
const frange & op1,
const frange & op2 ) const
virtualinherited

◆ op1_op2_relation() [2/4]

relation_kind range_operator::op1_op2_relation ( const irange & lhs,
const frange & op1,
const frange & op2 ) const
virtualinherited

◆ op1_op2_relation() [3/4]

relation_kind range_operator::op1_op2_relation ( const irange & lhs,
const irange & op1,
const irange & op2 ) const
virtualinherited

◆ op1_op2_relation() [4/4]

relation_kind range_operator::op1_op2_relation ( const irange & lhs,
const prange & op1,
const prange & op2 ) const
virtualinherited

◆ op1_op2_relation_effect() [1/6]

bool range_operator::op1_op2_relation_effect ( irange & lhs_range,
tree type,
const irange & op1_range,
const irange & op2_range,
relation_kind rel ) const
protectedvirtualinherited

◆ op1_op2_relation_effect() [2/6]

bool range_operator::op1_op2_relation_effect ( irange & lhs_range,
tree type,
const prange & op1_range,
const irange & op2_range,
relation_kind rel ) const
protectedvirtualinherited

◆ op1_op2_relation_effect() [3/6]

bool range_operator::op1_op2_relation_effect ( irange & lhs_range,
tree type,
const prange & op1_range,
const prange & op2_range,
relation_kind rel ) const
protectedvirtualinherited

◆ op1_op2_relation_effect() [4/6]

bool range_operator::op1_op2_relation_effect ( prange & lhs_range,
tree type,
const irange & op1_range,
const prange & op2_range,
relation_kind rel ) const
protectedvirtualinherited

◆ op1_op2_relation_effect() [5/6]

bool range_operator::op1_op2_relation_effect ( prange & lhs_range,
tree type,
const prange & op1_range,
const irange & op2_range,
relation_kind rel ) const
protectedvirtualinherited

◆ op1_op2_relation_effect() [6/6]

bool range_operator::op1_op2_relation_effect ( prange & lhs_range,
tree type,
const prange & op1_range,
const prange & op2_range,
relation_kind rel ) const
protectedvirtualinherited

◆ op1_range() [1/7]

bool operator_plus::op1_range ( frange & r,
tree type,
const frange & lhs,
const frange & op2,
relation_trio = TRIO_VARYING ) const
finaloverridevirtual

◆ op1_range() [2/7]

bool range_operator::op1_range ( frange & r,
tree type,
const irange & lhs,
const frange & op2,
relation_trio = TRIO_VARYING ) const
virtual

Reimplemented from range_operator.

◆ op1_range() [3/7]

bool operator_plus::op1_range ( irange & r,
tree type,
const irange & lhs,
const irange & op2,
relation_trio trio ) const
finaloverridevirtual

◆ op1_range() [4/7]

bool range_operator::op1_range ( irange & r,
tree type,
const prange & lhs,
const irange & op2,
relation_trio = TRIO_VARYING ) const
virtual

Reimplemented from range_operator.

◆ op1_range() [5/7]

bool range_operator::op1_range ( prange & r,
tree type,
const irange & lhs,
const prange & op2,
relation_trio = TRIO_VARYING ) const
virtual

Reimplemented from range_operator.

◆ op1_range() [6/7]

bool range_operator::op1_range ( prange & r,
tree type,
const prange & lhs,
const irange & op2,
relation_trio = TRIO_VARYING ) const
virtual

Reimplemented from range_operator.

◆ op1_range() [7/7]

bool range_operator::op1_range ( prange & r,
tree type,
const prange & lhs,
const prange & op2,
relation_trio = TRIO_VARYING ) const
virtual

Reimplemented from range_operator.

◆ op2_range() [1/5]

bool operator_plus::op2_range ( frange & r,
tree type,
const frange & lhs,
const frange & op1,
relation_trio = TRIO_VARYING ) const
finaloverridevirtual

Reimplemented from range_operator.

References op1_range(), and r.

◆ op2_range() [2/5]

bool range_operator::op2_range ( frange & r,
tree type,
const irange & lhs,
const frange & op1,
relation_trio = TRIO_VARYING ) const
virtual

Reimplemented from range_operator.

◆ op2_range() [3/5]

bool operator_plus::op2_range ( irange & r,
tree type,
const irange & lhs,
const irange & op1,
relation_trio rel ) const
finaloverridevirtual

Reimplemented from range_operator.

References op1_range(), r, and relation_trio::swap_op1_op2().

◆ op2_range() [4/5]

bool range_operator::op2_range ( irange & r,
tree type,
const prange & lhs,
const prange & op1,
relation_trio = TRIO_VARYING ) const
virtual

Reimplemented from range_operator.

◆ op2_range() [5/5]

bool range_operator::op2_range ( prange & r,
tree type,
const irange & lhs,
const prange & op1,
relation_trio = TRIO_VARYING ) const
virtual

Reimplemented from range_operator.

◆ operand_check_p()

bool operator_plus::operand_check_p ( tree t1,
tree t2,
tree t3 ) const
inlinefinaloverridevirtual

Reimplemented from range_operator.

References range_compatible_p().

◆ overflow_free_p()

bool operator_plus::overflow_free_p ( const irange & lh,
const irange & rh,
relation_trio = TRIO_VARYING ) const
virtual

◆ rv_fold()

void operator_plus::rv_fold ( frange & r,
tree type,
const REAL_VALUE_TYPE & lh_lb,
const REAL_VALUE_TYPE & lh_ub,
const REAL_VALUE_TYPE & rh_lb,
const REAL_VALUE_TYPE & rh_ub,
relation_kind  ) const
finaloverrideprivatevirtual

◆ update_bitmask() [1/2]

void range_operator::update_bitmask ( irange & ,
const prange & ,
const prange &  ) const
virtual

Reimplemented from range_operator.

◆ update_bitmask() [2/2]

void operator_plus::update_bitmask ( irange & r,
const irange & lh,
const irange & rh ) const
finaloverridevirtual

Reimplemented from range_operator.

References r, and update_known_bitmask().

◆ wi_fold()

void operator_plus::wi_fold ( irange & r,
tree type,
const wide_int & lh_lb,
const wide_int & lh_ub,
const wide_int & rh_lb,
const wide_int & rh_ub ) const
finaloverrideprivatevirtual

Reimplemented from range_operator.

References wi::add(), r, TYPE_SIGN, and value_range_with_overflow().

◆ wi_fold_in_parts()

void range_operator::wi_fold_in_parts ( irange & r,
tree type,
const wide_int & lh_lb,
const wide_int & lh_ub,
const wide_int & rh_lb,
const wide_int & rh_ub ) const
protectedinherited

◆ wi_fold_in_parts_equiv()

void range_operator::wi_fold_in_parts_equiv ( irange & r,
tree type,
const wide_int & lb,
const wide_int & ub,
unsigned limit ) const
protectedinherited

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