| GCC Middle and Back End API Reference
    | 
#include <gimple-range-gori.h>


| Data Structures | |
| struct | rdc | 
| Public Member Functions | |
| range_def_chain () | |
| ~range_def_chain () | |
| tree | depend1 (tree name) const | 
| tree | depend2 (tree name) const | 
| bool | in_chain_p (tree name, tree def) | 
| bool | chain_import_p (tree name, tree import) | 
| void | register_dependency (tree name, tree ssa1, basic_block bb=NULL) | 
| void | dump (FILE *f, basic_block bb, const char *prefix=NULL) | 
| Protected Member Functions | |
| bool | has_def_chain (tree name) | 
| bool | def_chain_in_bitmap_p (tree name, bitmap b) | 
| void | add_def_chain_to_bitmap (bitmap b, tree name) | 
| bitmap | get_def_chain (tree name) | 
| bitmap | get_imports (tree name) | 
| Protected Attributes | |
| bitmap_obstack | m_bitmaps | 
| Private Member Functions | |
| void | set_import (struct rdc &data, tree imp, bitmap b) | 
| Private Attributes | |
| vec< rdc > | m_def_chain | 
| int | m_logical_depth | 
Header file for gimple range GORI structures. Copyright (C) 2017-2025 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/>.
| range_def_chain::range_def_chain | ( | ) | 
RANGE_DEF_CHAIN is used to determine which SSA names in a block can have range information calculated for them, and what the dependencies on each other are. Information for a basic block is calculated once and stored. It is only calculated the first time a query is made, so if no queries are made, there is little overhead. The def_chain bitmap is indexed by SSA_NAME_VERSION. Bits are set within this bitmap to indicate SSA names that are defined in the SAME block and used to calculate this SSA name. <bb 2> : _1 = x_4(D) + -2; _2 = _1 * 4; j_7 = foo (); q_5 = _2 + 3; if (q_5 <= 13) _1 : x_4(D) _2 : 1 x_4(D) q_5 : _1 _2 x_4(D) This dump indicates the bits set in the def_chain vector. as well as demonstrates the def_chain bits for the related ssa_names. Checking the chain for _2 indicates that _1 and x_4 are used in its evaluation. Def chains also only include statements which are valid gimple so a def chain will only span statements for which the range engine implements operations for.
References bitmap_obstack_initialize(), m_bitmaps, m_def_chain, m_logical_depth, and num_ssa_names.
| range_def_chain::~range_def_chain | ( | ) | 
References bitmap_obstack_release(), m_bitmaps, and m_def_chain.
References b, bitmap_ior_into(), get_def_chain(), and r.
Referenced by gori_map::maybe_add_gori().
References b, bitmap_bit_p, get_imports(), and SSA_NAME_VERSION.
References a, b, bitmap_intersect_p(), and get_def_chain().
References m_def_chain, NULL_TREE, ssa_name, and SSA_NAME_VERSION.
Referenced by gimple_ranger::register_transitive_inferred_ranges().
References m_def_chain, NULL_TREE, ssa_name, and SSA_NAME_VERSION.
Referenced by gimple_ranger::register_transitive_inferred_ranges().
| void range_def_chain::dump | ( | FILE * | f, | 
| basic_block | bb, | ||
| const char * | prefix = NULL ) | 
References bitmap_bit_p, bitmap_empty_p(), EXECUTE_IF_SET_IN_BITMAP, get_def_chain(), get_imports(), gimple_bb(), has_def_chain(), NULL, num_ssa_names, print_generic_expr(), ssa_name, SSA_NAME_DEF_STMT, TDF_SLIM, and y.
Referenced by gori_map::dump().
References count, gimple_bb(), gimple_range_ssa_names(), has_def_chain(), m_def_chain, m_logical_depth, NULL, register_dependency(), set_import(), SSA_NAME_DEF_STMT, SSA_NAME_IS_DEFAULT_DEF, and SSA_NAME_VERSION.
Referenced by add_def_chain_to_bitmap(), def_chain_in_bitmap_p(), dump(), get_imports(), in_chain_p(), and register_dependency().
References get_def_chain(), has_def_chain(), i, m_def_chain, and SSA_NAME_VERSION.
Referenced by chain_import_p(), dump(), gori_map::maybe_add_gori(), and register_dependency().
References m_def_chain, num_ssa_names, and SSA_NAME_VERSION.
Referenced by dump(), get_def_chain(), and get_imports().
References bitmap_bit_p, gcc_checking_assert, get_def_chain(), gimple_range_ssa_p(), NULL, and SSA_NAME_VERSION.
Referenced by fold_using_range::condexpr_adjust().
| void range_def_chain::register_dependency | ( | tree | name, | 
| tree | ssa1, | ||
| basic_block | bb = NULL ) | 
References b, BITMAP_ALLOC, bitmap_ior_into(), bitmap_set_bit, range_def_chain::rdc::bm, get_def_chain(), get_imports(), gimple_bb(), gimple_range_ssa_p(), is_a(), m_bitmaps, m_def_chain, NULL, NULL_TREE, num_ssa_names, set_import(), range_def_chain::rdc::ssa1, range_def_chain::rdc::ssa2, SSA_NAME_DEF_STMT, and SSA_NAME_VERSION.
Referenced by get_def_chain(), fold_using_range::range_of_address(), fold_using_range::range_of_phi(), and fold_using_range::range_of_range_op().
References b, BITMAP_ALLOC, bitmap_ior_into(), bitmap_set_bit, m_bitmaps, NULL_TREE, and SSA_NAME_VERSION.
Referenced by get_def_chain(), and register_dependency().
| 
 | protected | 
Referenced by gori_map::calculate_gori(), gori_map::gori_map(), range_def_chain(), register_dependency(), set_import(), and ~range_def_chain().
Referenced by depend1(), depend2(), get_def_chain(), get_imports(), has_def_chain(), range_def_chain(), register_dependency(), and ~range_def_chain().
| 
 | private | 
Referenced by get_def_chain(), and range_def_chain().