GCC Middle and Back End API Reference
|
#include <gimple-range.h>
Data Fields | |
auto_edge_flag | non_executable_edge_flag |
Protected Member Functions | |
bool | fold_range_internal (vrange &r, gimple *s, tree name) |
void | prefill_name (vrange &r, tree name) |
void | prefill_stmt_dependencies (tree ssa) |
bool | get_tree_range (vrange &v, tree expr, gimple *stmt, basic_block bbentry=NULL, basic_block bbexit=NULL) |
bool | invoke_range_of_expr (vrange &v, tree expr, gimple *stmt, basic_block bbentry, basic_block bbexit) |
bool | get_arith_expr_range (vrange &r, tree expr, gimple *stmt) |
void | share_query (range_query &q) |
Protected Attributes | |
ranger_cache | m_cache |
range_tracer | tracer |
basic_block | current_bb |
vec< tree > | m_stmt_list |
relation_oracle * | m_relation |
infer_range_oracle * | m_infer |
gimple_outgoing_range * | m_gori |
gori_map * | m_map |
bool | m_shared_copy_p |
Friends | |
class | path_range_query |
Header file for the GIMPLE range interface. Copyright (C) 2019-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/>.
Code for GIMPLE range related routines. Copyright (C) 2019-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/>.
References cfun, current_bb, dump_file, FOR_ALL_BB_FN, FOR_EACH_EDGE, gcc_checking_assert, m_cache, m_stmt_list, non_executable_edge_flag, NULL, num_ssa_names, RANGER_DEBUG_TRACE, range_query::share_query(), basic_block_def::succs, and tracer.
gimple_ranger::~gimple_ranger | ( | ) |
References m_stmt_list.
range_query & gimple_ranger::const_query | ( | ) |
References m_cache.
|
inherited |
References default_gori, gcc_checking_assert, m_gori, m_map, and NULL.
Referenced by ranger_cache::ranger_cache().
|
inherited |
References default_infer_oracle, gcc_checking_assert, m_infer, and range_query().
Referenced by ranger_cache::ranger_cache().
References CDI_DOMINATORS, default_relation_oracle, dom_info_available_p(), gcc_checking_assert, global_ranges, and m_relation.
Referenced by execute_fast_vrp(), and ranger_cache::ranger_cache().
void gimple_ranger::debug | ( | ) |
References dump().
|
inherited |
References default_gori, m_gori, m_map, and NULL.
Referenced by ~range_query().
|
inherited |
References default_infer_oracle, and m_infer.
Referenced by ~range_query(), and ranger_cache::~ranger_cache().
|
inherited |
References default_relation_oracle, and m_relation.
Referenced by execute_fast_vrp(), ~range_query(), and ranger_cache::~ranger_cache().
|
overridevirtual |
Reimplemented from range_query.
References cfun, dump_bb(), FOR_EACH_BB_FN, and m_cache.
Referenced by debug().
void gimple_ranger::dump_bb | ( | FILE * | f, |
basic_block | bb ) |
void gimple_ranger::export_global_ranges | ( | ) |
References dump_file, gimple_range_ssa_p(), m_cache, num_ssa_names, r, set_range_info(), ssa_name, SSA_NAME_IN_FREE_LIST, and TREE_TYPE.
References fold_using_range::fold_stmt(), and r.
Referenced by prefill_stmt_dependencies(), and range_of_stmt().
bool gimple_ranger::fold_stmt | ( | gimple_stmt_iterator * | gsi, |
tree(* | valueize )(tree) ) |
References current_bb, fold_stmt(), gimple_bb(), gsi_stmt(), and NULL.
Referenced by fold_stmt().
References r.
|
protectedinherited |
References as_a(), BINARY_CLASS_P, COMPARISON_CLASS_P, drop_tree_overflow(), range_op_handler::fold_range(), get_nonzero_bits(), gimple_range_global(), gimple_range_ssa_p(), invoke_range_of_expr(), POLY_INT_CST_P, r, real_isnan(), real_isneg(), REAL_VALUE_TYPE, frange::set(), frange::set_nan(), value_range::set_varying(), value_range::supports_type_p(), TREE_CODE, TREE_OPERAND, TREE_OVERFLOW_P, TREE_REAL_CST_PTR, tree_single_nonzero_warnv_p(), TREE_TYPE, TYPE_P, TYPE_PRECISION, UNARY_CLASS_P, and wi::zero().
Referenced by dom_ranger::range_of_expr(), gimple_ranger::range_of_expr(), global_range_query::range_of_expr(), ranger_cache::range_of_expr(), ssa_cache::range_of_expr(), dom_ranger::range_of_stmt(), gimple_ranger::range_of_stmt(), dom_ranger::range_on_edge(), gimple_ranger::range_on_edge(), ranger_cache::range_on_edge(), gimple_ranger::range_on_entry(), and gimple_ranger::range_on_exit().
|
inlineinherited |
References m_gori.
Referenced by ranger_cache::block_range(), path_range_query::compute_ranges_in_block(), gimple_ranger::dump_bb(), ranger_cache::edge_range(), ranger_cache::entry_range(), ranger_cache::fill_block_cache(), gori_on_edge(), ranger_cache::range_from_dom(), and ranger_cache::register_inferred_value().
|
inlineinherited |
References m_map.
Referenced by path_range_query::compute_exit_dependencies(), path_range_query::compute_ranges_in_block(), ranger_cache::dump_bb(), ranger_cache::get_global_range(), gimple_ranger::range_of_stmt(), ranger_cache::ranger_cache(), ranger_cache::register_inferred_value(), gimple_ranger::register_transitive_inferred_ranges(), and ranger_cache::set_global_range().
|
inlineinherited |
References m_infer.
Referenced by path_range_query::adjust_for_non_null_uses(), ranger_cache::apply_inferred_ranges(), ranger_cache::edge_range(), ranger_cache::fill_block_cache(), path_range_query::range_defined_in_block(), ranger_cache::range_from_dom(), gimple_ranger::range_on_edge(), and gimple_ranger::register_transitive_inferred_ranges().
|
protectedinherited |
References gcc_checking_assert, r, range_of_expr(), range_on_entry(), and range_on_exit().
Referenced by get_tree_range().
References gimple_range_ssa_p(), is_a(), m_cache, m_stmt_list, r, SSA_NAME_DEF_STMT, and gimple_range_op_handler::supported_p().
Referenced by prefill_stmt_dependencies().
|
protected |
References changed, dump_file, dyn_cast(), fold_range_internal(), gcc_checking_assert, gimple_bb(), gimple_phi_arg_def(), gimple_phi_num_args(), gimple_phi_result(), value_range::intersect(), is_a(), m_cache, m_stmt_list, NULL_TREE, gimple_range_op_handler::operand1(), gimple_range_op_handler::operand2(), prefill_name(), print_generic_expr(), print_gimple_stmt(), r, SSA_NAME_DEF_STMT, SSA_NAME_IS_DEFAULT_DEF, gimple_range_op_handler::supported_p(), TDF_SLIM, tracer, and TREE_TYPE.
Referenced by range_of_stmt().
Implements range_query.
References current_bb, dump_file, range_query::get_tree_range(), gimple_bb(), gimple_get_lhs(), gimple_range_ssa_p(), is_gimple_debug(), m_cache, print_generic_expr(), print_gimple_stmt(), r, range_of_stmt(), range_on_entry(), SSA_NAME_DEF_STMT, TDF_SLIM, tracer, and TREE_TYPE.
Referenced by range_on_exit(), and register_transitive_inferred_ranges().
Reimplemented from range_query.
References changed, dump_file, exp(), fold_range_internal(), FOR_EACH_GORI_EXPORT_NAME, range_query::get_tree_range(), gimple_bb(), gimple_get_lhs(), gimple_range_ssa_p(), range_query::gori_ssa(), is_a(), m_cache, NULL, NULL_TREE, prefill_stmt_dependencies(), print_generic_expr(), print_gimple_stmt(), r, TDF_SLIM, tracer, and TREE_TYPE.
Referenced by range_of_expr(), range_on_entry(), and register_inferred_ranges().
Support routines for value queries. Copyright (C) 2020-2025 Free Software Foundation, Inc. Contributed 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/>.
Reimplemented from range_query.
References dump_file, gcc_checking_assert, range_query::get_tree_range(), gimple_range_ssa_p(), range_query::infer_oracle(), m_cache, infer_range_oracle::maybe_adjust_range(), non_executable_edge_flag, NULL, print_generic_expr(), r, range_compatible_p(), range_on_exit(), TDF_SLIM, tracer, and TREE_TYPE.
|
overridevirtual |
Reimplemented from range_query.
References dump_file, range_query::get_tree_range(), gimple_range_ssa_p(), basic_block_def::index, m_cache, NULL, print_generic_expr(), r, range_of_stmt(), SSA_NAME_DEF_STMT, TDF_SLIM, tracer, and TREE_TYPE.
Referenced by range_of_expr(), and range_on_exit().
|
overridevirtual |
Reimplemented from range_query.
References dump_file, gcc_checking_assert, range_query::get_tree_range(), gimple_bb(), gimple_range_ssa_p(), basic_block_def::index, last_nondebug_stmt(), NULL, print_generic_expr(), r, range_compatible_p(), range_of_expr(), range_on_entry(), SSA_NAME_DEF_STMT, TDF_SLIM, tracer, and TREE_TYPE.
Referenced by range_on_edge().
void gimple_ranger::register_inferred_ranges | ( | gimple * | s | ) |
References gimple_get_lhs(), m_cache, range_of_stmt(), set_range_info(), TREE_TYPE, and value_range::varying_p().
void gimple_ranger::register_transitive_inferred_ranges | ( | basic_block | bb | ) |
References infer_range_oracle::add_ranges(), range_def_chain::depend1(), range_def_chain::depend2(), dump_file, dump_flags, fold_range(), g, gimple_get_lhs(), gimple_range_ssa_p(), range_query::gori_ssa(), gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_stmt(), basic_block_def::index, range_query::infer_oracle(), m_cache, r, range_of_expr(), si, TDF_DETAILS, and TREE_TYPE.
|
inlineinherited |
References m_relation.
Referenced by check_for_binary_op_overflow().
|
protectedinherited |
References m_gori, m_infer, m_map, m_relation, m_shared_copy_p, and range_query().
Referenced by gimple_ranger::gimple_ranger(), path_range_query::path_range_query(), and path_range_query::path_range_query().
Reimplemented in ccp_folder, copy_folder, fvrp_folder, rvrp_folder, and substitute_and_fold_engine.
References NULL_TREE, r, range_of_expr(), value_range::supports_type_p(), and TREE_TYPE.
Reimplemented in fvrp_folder, rvrp_folder, and substitute_and_fold_engine.
References gcc_checking_assert, gimple_get_lhs(), NULL_TREE, r, range_of_stmt(), value_range::supports_type_p(), and TREE_TYPE.
Reimplemented in fvrp_folder, rvrp_folder, and substitute_and_fold_engine.
References NULL_TREE, r, range_of_expr(), range_on_edge(), value_range::supports_type_p(), and TREE_TYPE.
|
virtualinherited |
References gcc_checking_assert, NULL_TREE, r, range_on_entry(), value_range::supports_type_p(), and TREE_TYPE.
|
virtualinherited |
References gcc_checking_assert, NULL_TREE, r, range_on_exit(), value_range::supports_type_p(), and TREE_TYPE.
|
friend |
References path_range_query.
Referenced by path_range_query.
|
protected |
Referenced by fold_stmt(), gimple_ranger(), and range_of_expr().
|
protected |
|
protectedinherited |
Referenced by create_gori(), destroy_gori(), gori(), range_query(), and share_query().
|
protectedinherited |
Referenced by create_infer_oracle(), destroy_infer_oracle(), infer_oracle(), range_query(), and share_query().
|
protectedinherited |
Referenced by create_gori(), destroy_gori(), gori_ssa(), range_query(), and share_query().
|
protectedinherited |
Referenced by create_relation_oracle(), destroy_relation_oracle(), ranger_cache::dump_bb(), ranger_cache::fill_block_cache(), path_range_query::get_path_oracle(), path_range_query::maybe_register_phi_relation(), path_range_query::path_range_query(), path_range_query::path_range_query(), range_query(), relation(), share_query(), and path_range_query::~path_range_query().
|
protectedinherited |
Referenced by range_query(), share_query(), and ~range_query().
Referenced by gimple_ranger(), prefill_name(), prefill_stmt_dependencies(), and ~gimple_ranger().
auto_edge_flag gimple_ranger::non_executable_edge_flag |
Referenced by gimple_ranger(), and range_on_edge().
|
protected |
Referenced by gimple_ranger(), prefill_stmt_dependencies(), range_of_expr(), range_of_stmt(), range_on_edge(), range_on_entry(), and range_on_exit().