GCC Middle and Back End API Reference
value-range.cc File Reference
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "tree.h"
#include "gimple.h"
#include "ssa.h"
#include "tree-pretty-print.h"
#include "value-range-pretty-print.h"
#include "fold-const.h"
#include "gimple-range.h"
Include dependency graph for value-range.cc:

Namespaces

namespace  inchash
 

Macros

#define DEFINE_INT_RANGE_INSTANCE(N)
 

Functions

static irange_bitmask get_bitmask_from_range (tree type, const wide_int &min, const wide_int &max)
 
DEBUG_FUNCTION void debug (const value_range &r)
 
DEBUG_FUNCTION void debug (const irange_bitmask &bm)
 
void inchash::add_vrange (const vrange &v, inchash::hash &hstate, unsigned int)
 
static value_range_kind get_legacy_range (const irange &r, tree &min, tree &max)
 
static value_range_kind get_legacy_range (const prange &r, tree &min, tree &max)
 
value_range_kind get_legacy_range (const vrange &v, tree &min, tree &max)
 
static wide_int subtract_one (const wide_int &x, tree type, wi::overflow_type &overflow)
 
static wide_int add_one (const wide_int &x, tree type, wi::overflow_type &overflow)
 
void dump_value_range (FILE *file, const vrange *vr)
 
DEBUG_FUNCTION void debug (const vrange *vr)
 
DEBUG_FUNCTION void debug (const vrange &vr)
 
bool vrp_operand_equal_p (const_tree val1, const_tree val2)
 

Macro Definition Documentation

◆ DEFINE_INT_RANGE_INSTANCE

#define DEFINE_INT_RANGE_INSTANCE ( N)
Value:
template int_range<N>::int_range(tree_node *, \
const wide_int &, \
const wide_int &, \
template int_range<N>::int_range(const irange &); \
template int_range<N>::int_range(const int_range &); \
Definition value-range.h:367
int_range()
Definition value-range.h:1079
int_range & operator=(const int_range &)
Definition value-range.h:1122
Definition value-range.h:273
union tree_node * tree
Definition coretypes.h:97
value_range_kind
Definition value-range.h:29

Function Documentation

◆ add_one()

static wide_int add_one ( const wide_int & x,
tree type,
wi::overflow_type & overflow )
inlinestatic

References wi::add(), SIGNED, wi::sub(), TYPE_SIGN, and UNSIGNED.

Referenced by irange::invert().

◆ debug() [1/4]

DEBUG_FUNCTION void debug ( const irange_bitmask & bm)

◆ debug() [2/4]

DEBUG_FUNCTION void debug ( const value_range & r)

References r.

◆ debug() [3/4]

DEBUG_FUNCTION void debug ( const vrange & vr)

References debug.

◆ debug() [4/4]

DEBUG_FUNCTION void debug ( const vrange * vr)

References dump_value_range().

◆ dump_value_range()

void dump_value_range ( FILE * file,
const vrange * vr )

References vrange::dump().

Referenced by debug().

◆ get_bitmask_from_range()

static irange_bitmask get_bitmask_from_range ( tree type,
const wide_int & min,
const wide_int & max )
static
Support routines for value ranges.
   Copyright (C) 2019-2024 Free Software Foundation, Inc.
   Major hacks by Aldy Hernandez <aldyh@redhat.com> and
   Andrew MacLeod <amacleod@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 wi::clz(), wi::mask(), TYPE_PRECISION, and wi::zero().

Referenced by irange::get_bitmask(), prange::intersect(), and prange::set().

◆ get_legacy_range() [1/3]

◆ get_legacy_range() [2/3]

static value_range_kind get_legacy_range ( const prange & r,
tree & min,
tree & max )
static

◆ get_legacy_range() [3/3]

value_range_kind get_legacy_range ( const vrange & v,
tree & min,
tree & max )

◆ subtract_one()

static wide_int subtract_one ( const wide_int & x,
tree type,
wi::overflow_type & overflow )
inlinestatic

References wi::add(), SIGNED, wi::sub(), TYPE_SIGN, and UNSIGNED.

Referenced by irange::invert().

◆ vrp_operand_equal_p()

bool vrp_operand_equal_p ( const_tree val1,
const_tree val2 )
Return true, if VAL1 and VAL2 are equal values for VRP purposes.   

References operand_equal_p().

Referenced by ipa_predicate::add_clause(), add_condition(), adjust_pointer_diff_expr(), and expr_eval_ops_equal_p().