GCC Middle and Back End API Reference
range-op-float.cc File 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 "range-op-mixed.h"
Include dependency graph for range-op-float.cc:

Data Structures

class  foperator_unordered
 
class  foperator_ordered
 
class  foperator_unordered_lt
 
class  foperator_unordered_le
 
class  foperator_unordered_gt
 
class  foperator_unordered_ge
 
class  foperator_unordered_equal
 
class  foperator_ltgt
 
class  foperator_div
 

Functions

static bool maybe_isnan (const frange &op1, const frange &op2)
 
static bool frelop_early_resolve (irange &r, tree type, const frange &op1, const frange &op2, relation_trio trio, relation_kind my_rel)
 
void frange_nextafter (enum machine_mode mode, REAL_VALUE_TYPE &value, const REAL_VALUE_TYPE &inf)
 
void frange_arithmetic (enum tree_code code, tree type, REAL_VALUE_TYPE &result, const REAL_VALUE_TYPE &op1, const REAL_VALUE_TYPE &op2, const REAL_VALUE_TYPE &inf)
 
static void frange_drop_inf (frange &r, tree type)
 
static void frange_drop_ninf (frange &r, tree type)
 
static void frange_drop_infs (frange &r, tree type)
 
static void frange_add_zeros (frange &r, tree type)
 
static bool build_le (frange &r, tree type, const frange &val)
 
static bool build_lt (frange &r, tree type, const frange &val)
 
static bool build_ge (frange &r, tree type, const frange &val)
 
static bool build_gt (frange &r, tree type, const frange &val)
 
static bool float_binary_op_range_finish (bool ret, frange &r, tree type, const frange &lhs, bool div_op2=false)
 
static bool zero_p (const REAL_VALUE_TYPE &lb, const REAL_VALUE_TYPE &ub)
 
static bool contains_zero_p (const REAL_VALUE_TYPE &lb, const REAL_VALUE_TYPE &ub)
 
static bool singleton_inf_p (const REAL_VALUE_TYPE &lb, const REAL_VALUE_TYPE &ub)
 
static int signbit_known_p (const REAL_VALUE_TYPE &lh_lb, const REAL_VALUE_TYPE &lh_ub, const REAL_VALUE_TYPE &rh_lb, const REAL_VALUE_TYPE &rh_ub)
 
static void zero_range (REAL_VALUE_TYPE &lb, REAL_VALUE_TYPE &ub, int signbit_known)
 
static void inf_range (REAL_VALUE_TYPE &lb, REAL_VALUE_TYPE &ub, int signbit_known)
 
static void zero_to_inf_range (REAL_VALUE_TYPE &lb, REAL_VALUE_TYPE &ub, int signbit_known)
 
static frange float_widen_lhs_range (tree type, const frange &lhs)
 
static void find_range (REAL_VALUE_TYPE &lb, REAL_VALUE_TYPE &ub, const REAL_VALUE_TYPE(&cp)[8])
 

Variables

foperator_unordered fop_unordered
 
foperator_ordered fop_ordered
 
foperator_unordered_lt fop_unordered_lt
 
foperator_unordered_le fop_unordered_le
 
foperator_unordered_gt fop_unordered_gt
 
foperator_unordered_ge fop_unordered_ge
 
foperator_unordered_equal fop_unordered_equal
 
foperator_ltgt fop_ltgt
 
foperator_div fop_div
 

Function Documentation

◆ build_ge()

◆ build_gt()

◆ build_le()

◆ build_lt()

◆ contains_zero_p()

◆ find_range()

static void find_range ( REAL_VALUE_TYPE & lb,
REAL_VALUE_TYPE & ub,
const REAL_VALUE_TYPE(&) cp[8] )
static

◆ float_binary_op_range_finish()

◆ float_widen_lhs_range()

static frange float_widen_lhs_range ( tree type,
const frange & lhs )
static
Extend the LHS range by 1ulp in each direction.  For op1_range
or op2_range of binary operations just computing the inverse
operation on ranges isn't sufficient.  Consider e.g.
[1., 1.] = op1 + [1., 1.].  op1's range is not [0., 0.], but
[-0x1.0p-54, 0x1.0p-53] (when not -frounding-math), any value for
which adding 1. to it results in 1. after rounding to nearest.
So, for op1_range/op2_range extend the lhs range by 1ulp (or 0.5ulp)
in each direction.  See PR109008 for more details.   

References dconst1, dconst2, dconstinf, dconstm1, dconstninf, FLOAT_MODE_FORMAT, frange_nextafter(), MODE_COMPOSITE_P, real_arithmetic(), real_isfinite(), real_isinf(), REAL_VALUE_TYPE, frange::set(), SET_REAL_EXP, and TYPE_MODE.

Referenced by foperator_div::op1_range(), operator_minus::op1_range(), operator_mult::op1_range(), operator_plus::op1_range(), foperator_div::op2_range(), and operator_minus::op2_range().

◆ frange_add_zeros()

◆ frange_arithmetic()

◆ frange_drop_inf()

static void frange_drop_inf ( frange & r,
tree type )
inlinestatic

◆ frange_drop_infs()

static void frange_drop_infs ( frange & r,
tree type )
inlinestatic

◆ frange_drop_ninf()

static void frange_drop_ninf ( frange & r,
tree type )
inlinestatic

◆ frange_nextafter()

◆ frelop_early_resolve()

◆ inf_range()

static void inf_range ( REAL_VALUE_TYPE & lb,
REAL_VALUE_TYPE & ub,
int signbit_known )
static

◆ maybe_isnan()

◆ signbit_known_p()

static int signbit_known_p ( const REAL_VALUE_TYPE & lh_lb,
const REAL_VALUE_TYPE & lh_ub,
const REAL_VALUE_TYPE & rh_lb,
const REAL_VALUE_TYPE & rh_ub )
static

◆ singleton_inf_p()

static bool singleton_inf_p ( const REAL_VALUE_TYPE & lb,
const REAL_VALUE_TYPE & ub )
static

◆ zero_p()

static bool zero_p ( const REAL_VALUE_TYPE & lb,
const REAL_VALUE_TYPE & ub )
static

◆ zero_range()

static void zero_range ( REAL_VALUE_TYPE & lb,
REAL_VALUE_TYPE & ub,
int signbit_known )
static

References dconst0, and dconstm0.

Referenced by foperator_div::rv_fold(), and operator_mult::rv_fold().

◆ zero_to_inf_range()

Variable Documentation

◆ fop_div

◆ fop_ltgt

◆ fop_ordered

◆ fop_unordered

◆ fop_unordered_equal

◆ fop_unordered_ge

◆ fop_unordered_gt

◆ fop_unordered_le

◆ fop_unordered_lt