GCC Middle and Back End API Reference
gimple-range-op.cc File Reference
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "insn-codes.h"
#include "tree.h"
#include "gimple.h"
#include "ssa.h"
#include "gimple-pretty-print.h"
#include "optabs-tree.h"
#include "gimple-iterator.h"
#include "gimple-fold.h"
#include "wide-int.h"
#include "fold-const.h"
#include "case-cfn-macros.h"
#include "omp-general.h"
#include "cfgloop.h"
#include "tree-ssa-loop.h"
#include "tree-scalar-evolution.h"
#include "langhooks.h"
#include "vr-values.h"
#include "range.h"
#include "value-query.h"
#include "gimple-range.h"
#include "attr-fnspec.h"
#include "realmpfr.h"
Include dependency graph for gimple-range-op.cc:

Data Structures

class  cfn_constant_float_p
 
class  cfn_constant_p
 
class  cfn_pass_through_arg1
 
class  cfn_signbit
 
class  cfn_copysign
 
class  cfn_sqrt
 
class  cfn_sincos
 
class  cfn_toupper_tolower
 
class  cfn_ffs
 
class  cfn_popcount
 
class  cfn_clz
 
class  cfn_ctz
 
class  cfn_clrsb
 
class  cfn_ubsan
 
class  cfn_strlen
 
class  cfn_goacc_dim
 
class  cfn_parity
 

Functions

unsigned gimple_range_ssa_names (tree *vec, unsigned vec_size, gimple *stmt)
 
static tree gimple_range_base_of_assignment (const gimple *stmt)
 
static enum tree_code get_code (gimple *s)
 
static bool frange_mpfr_arg1 (REAL_VALUE_TYPE *res_low, REAL_VALUE_TYPE *res_high, int(*func)(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t), const REAL_VALUE_TYPE &arg, tree type, unsigned ulps)
 
cfn_sincos range_operator op_cfn_sin (CFN_SIN)
 
 cfn_sincos (combined_fn cfn)
 
virtual bool fold_range (frange &r, tree type, const frange &lh, const frange &, relation_trio) const final override
 
virtual bool op1_range (frange &r, tree type, const frange &lhs, const frange &, relation_trio) const final override
 
cfn_sincos range_operator op_cfn_cos (CFN_COS)
 
cfn_toupper_tolower range_operator op_cfn_toupper (true)
 
 cfn_toupper_tolower (bool toupper)
 
virtual bool fold_range (irange &r, tree type, const irange &lh, const irange &, relation_trio) const
 
bool get_letter_range (tree type, irange &lowers, irange &uppers) const
 
cfn_toupper_tolower range_operator op_cfn_tolower (false)
 
cfn_clz range_operator op_cfn_clz (false)
 
 cfn_clz (bool internal)
 
cfn_clz range_operator op_cfn_clz_internal (true)
 
cfn_ctz range_operator op_cfn_ctz (false)
 
 cfn_ctz (bool internal)
 
cfn_ctz range_operator op_cfn_ctz_internal (true)
 
cfn_goacc_dim range_operator op_cfn_goacc_dim_size (false)
 
 cfn_goacc_dim (bool is_pos)
 
cfn_goacc_dim range_operator op_cfn_goacc_dim_pos (true)
 

Variables

cfn_constant_float_p op_cfn_constant_float_p
 
cfn_constant_p op_cfn_constant_p
 
cfn_pass_through_arg1 op_cfn_pass_through_arg1
 
cfn_signbit op_cfn_signbit
 
cfn_copysign op_cfn_copysign
 
cfn_sqrt op_cfn_sqrt
 
combined_fn m_cfn
 
bool m_toupper
 
cfn_ffs op_cfn_ffs
 
cfn_popcount op_cfn_popcount
 
bool m_gimple_call_internal_p
 
cfn_clrsb op_cfn_clrsb
 
cfn_ubsan op_cfn_ubsan_add (PLUS_EXPR)
 
cfn_ubsan op_cfn_ubsan_sub (MINUS_EXPR)
 
cfn_ubsan op_cfn_ubsan_mul (MULT_EXPR)
 
cfn_strlen op_cfn_strlen
 
bool m_is_pos
 
cfn_parity op_cfn_parity
 

Function Documentation

◆ cfn_clz()

op_cfn_clz::cfn_clz ( bool internal)

◆ cfn_ctz()

op_cfn_ctz::cfn_ctz ( bool internal)

◆ cfn_goacc_dim()

op_cfn_goacc_dim_size::cfn_goacc_dim ( bool is_pos)

◆ cfn_sincos()

op_cfn_sin::cfn_sincos ( combined_fn cfn)

◆ cfn_toupper_tolower()

op_cfn_toupper::cfn_toupper_tolower ( bool toupper)

◆ fold_range() [1/2]

virtual bool op_cfn_sin::fold_range ( frange & r,
tree type,
const frange & lh,
const frange & ,
relation_trio  ) const
finaloverridevirtual

◆ fold_range() [2/2]

bool fold_range ( irange & r,
tree type,
const irange & lh,
const irange & rh,
relation_trio  ) const
virtual

◆ frange_mpfr_arg1()

static bool frange_mpfr_arg1 ( REAL_VALUE_TYPE * res_low,
REAL_VALUE_TYPE * res_high,
int(*)(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t) func,
const REAL_VALUE_TYPE & arg,
tree type,
unsigned ulps )
static
Compute FUNC (ARG) where FUNC is a mpfr function.  If RES_LOW is non-NULL,
set it to low bound of possible range if the function is expected to have
ULPS precision and similarly if RES_HIGH is non-NULL, set it to high bound.
If the function returns false, the results weren't set.   

References dconstinf, dconstninf, frange_nextafter(), ggc_alloc(), i, MODE_COMPOSITE_P, mpfr_from_real(), real_format::p, real_convert(), real_from_mpfr(), real_identical(), real_isfinite(), real_less(), REAL_MODE_FORMAT, REAL_VALUE_TYPE, rvc_zero, and TYPE_MODE.

Referenced by cfn_sqrt::fold_range(), and cfn_sincos::fold_range().

◆ get_code()

◆ get_letter_range()

bool op_cfn_toupper::get_letter_range ( tree type,
irange & lowers,
irange & uppers ) const
private

◆ gimple_range_base_of_assignment()

static tree gimple_range_base_of_assignment ( const gimple * stmt)
static

◆ gimple_range_ssa_names()

unsigned gimple_range_ssa_names ( tree * vec,
unsigned vec_size,
gimple * stmt )
Code for GIMPLE range op related routines.
   Copyright (C) 2019-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 count, gcc_checking_assert, ggc_alloc(), gimple_assign_rhs1(), gimple_assign_rhs2(), gimple_assign_rhs3(), gimple_assign_rhs_code(), gimple_range_ssa_p(), gimple_range_op_handler::operand1(), and gimple_range_op_handler::operand2().

Referenced by path_range_query::compute_exit_dependencies(), back_threader::find_paths_to_names(), and range_def_chain::get_def_chain().

◆ op1_range()

◆ op_cfn_clz()

◆ op_cfn_clz_internal()

◆ op_cfn_cos()

◆ op_cfn_ctz()

◆ op_cfn_ctz_internal()

◆ op_cfn_goacc_dim_pos()

◆ op_cfn_goacc_dim_size()

◆ op_cfn_sin()

◆ op_cfn_tolower()

◆ op_cfn_toupper()

Variable Documentation

◆ m_cfn

combined_fn m_cfn
private

◆ m_gimple_call_internal_p

bool m_gimple_call_internal_p
private

◆ m_is_pos

bool m_is_pos
private

◆ m_toupper

bool m_toupper
private

◆ op_cfn_clrsb

◆ op_cfn_constant_float_p

◆ op_cfn_constant_p

◆ op_cfn_copysign

◆ op_cfn_ffs

◆ op_cfn_parity

◆ op_cfn_pass_through_arg1

◆ op_cfn_popcount

◆ op_cfn_signbit

◆ op_cfn_sqrt

◆ op_cfn_strlen

◆ op_cfn_ubsan_add

◆ op_cfn_ubsan_mul

◆ op_cfn_ubsan_sub