GCC Middle and Back End API Reference
|
#include <gimple-range-cache.h>
Protected Member Functions | |
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 | |
relation_oracle * | m_relation |
infer_range_oracle * | m_infer |
gimple_outgoing_range * | m_gori |
gori_map * | m_map |
bool | m_shared_copy_p |
Private Types | |
enum | rfd_mode { RFD_NONE , RFD_READ_ONLY , RFD_FILL } |
Private Member Functions | |
void | fill_block_cache (tree name, basic_block bb, basic_block def_bb) |
void | propagate_cache (tree name) |
bool | range_from_dom (vrange &r, tree name, basic_block bb, enum rfd_mode) |
void | resolve_dom (vrange &r, tree name, basic_block bb) |
void | range_of_def (vrange &r, tree name, basic_block bb=NULL) |
void | entry_range (vrange &r, tree expr, basic_block bb, enum rfd_mode) |
void | exit_range (vrange &r, tree expr, basic_block bb, enum rfd_mode) |
bool | edge_range (vrange &r, edge e, tree name, enum rfd_mode) |
Private Attributes | |
ssa_cache | m_globals |
block_range_cache | m_on_entry |
class temporal_cache * | m_temporal |
vec< basic_block > | m_workback |
class update_list * | m_update |
|
private |
ranger_cache::ranger_cache | ( | int | not_executable_flag, |
bool | use_imm_uses ) |
ranger_cache::~ranger_cache | ( | ) |
void ranger_cache::apply_inferred_ranges | ( | gimple * | s | ) |
References block_range_cache::bb_range_p(), cfun, ENTRY_BLOCK_PTR_FOR_FN, fill_block_cache(), gcc_checking_assert, block_range_cache::get_bb_range(), gimple_bb(), gimple_range_ssa_p(), range_query::gori(), m_on_entry, NULL, r, SSA_NAME_DEF_STMT, and SSA_NAME_IS_DEFAULT_DEF.
Referenced by gimple_ranger::dump_bb(), gimple_ranger::range_of_expr(), and gimple_ranger::range_on_entry().
|
inline |
References m_globals.
Referenced by gimple_ranger::const_query().
|
inherited |
References default_gori, gcc_checking_assert, range_query::m_gori, range_query::m_map, and NULL.
Referenced by ranger_cache().
|
inherited |
References default_infer_oracle, gcc_checking_assert, and range_query::m_infer.
Referenced by ranger_cache().
References CDI_DOMINATORS, default_relation_oracle, dom_info_available_p(), gcc_checking_assert, global_ranges, and range_query::m_relation.
Referenced by execute_fast_vrp(), and ranger_cache().
|
inherited |
References default_gori, range_query::m_gori, range_query::m_map, and NULL.
Referenced by range_query::~range_query().
|
inherited |
References default_infer_oracle, and range_query::m_infer.
Referenced by range_query::~range_query(), and ~ranger_cache().
|
inherited |
References default_relation_oracle, and range_query::m_relation.
Referenced by execute_fast_vrp(), range_query::~range_query(), and ~ranger_cache().
|
overridevirtual |
Reimplemented from range_query.
References ssa_cache::dump(), and m_globals.
Referenced by gimple_ranger::dump().
void ranger_cache::dump_bb | ( | FILE * | f, |
basic_block | bb ) |
References block_range_cache::dump(), gori_map::dump(), relation_oracle::dump(), range_query::gori_ssa(), m_on_entry, and range_query::m_relation.
Referenced by gimple_ranger::dump_bb().
References exit_range(), range_query::gori(), range_query::infer_oracle(), infer_range_oracle::maybe_adjust_range(), r, and TREE_TYPE.
Referenced by propagate_cache(), range_on_edge(), and resolve_dom().
|
private |
References cfun, ENTRY_BLOCK_PTR_FOR_FN, block_range_cache::get_bb_range(), gimple_range_global(), range_query::gori(), m_on_entry, r, range_from_dom(), and range_of_def().
Referenced by exit_range(), and range_of_expr().
|
private |
References cfun, ENTRY_BLOCK_PTR_FOR_FN, entry_range(), gimple_bb(), gimple_range_global(), r, range_of_def(), and SSA_NAME_DEF_STMT.
Referenced by edge_range(), and register_inferred_value().
|
private |
References update_list::add(), adjust_equivalence_range(), block_range_cache::bb_range_p(), CDI_DOMINATORS, cfun, DEBUG_RANGE_CACHE, dominated_by_p(), value_range::dump(), dump_file, update_list::empty_p(), ENTRY_BLOCK_PTR_FOR_FN, FOR_EACH_EDGE, FOR_EACH_PARTIAL_AND_FULL_EQUIV, gcc_checking_assert, block_range_cache::get_bb_range(), gimple_bb(), range_query::gori(), basic_block_def::index, range_query::infer_oracle(), value_range::intersect(), last_basic_block_for_fn, m_on_entry, range_query::m_relation, m_update, m_workback, pe_to_bits(), basic_block_def::preds, print_generic_expr(), print_relation(), propagate_cache(), r, range_cast(), range_from_dom(), RFD_FILL, RFD_READ_ONLY, block_range_cache::set_bb_range(), value_range::set_undefined(), SSA_NAME_DEF_STMT, TDF_SLIM, TREE_TYPE, TYPE_PRECISION, and VREL_EQ.
Referenced by block_range().
References ssa_cache::get_range(), gimple_range_global(), m_globals, and r.
Referenced by gimple_ranger::dump_bb(), gimple_ranger::export_global_ranges(), get_global_range(), gimple_ranger::prefill_name(), gimple_ranger::prefill_stmt_dependencies(), range_from_dom(), gimple_ranger::range_of_expr(), and gimple_ranger::range_of_stmt().
|
protectedinherited |
References as_a(), BINARY_CLASS_P, COMPARISON_CLASS_P, drop_tree_overflow(), expr, range_op_handler::fold_range(), get_nonzero_bits(), gimple_range_global(), gimple_range_ssa_p(), range_query::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(), 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(), 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(), range_on_edge(), gimple_ranger::range_on_entry(), and gimple_ranger::range_on_exit().
|
inlineinherited |
References range_query::m_gori.
Referenced by block_range(), path_range_query::compute_ranges_in_block(), gimple_ranger::dump_bb(), edge_range(), entry_range(), evaluate_control_stmt_using_entry_checks(), fill_block_cache(), fur_source::gori(), gori_on_edge(), range_from_dom(), and register_inferred_value().
|
inlineinherited |
References range_query::m_map.
Referenced by hybrid_jt_simplifier::compute_exit_dependencies(), path_range_query::compute_exit_dependencies(), path_range_query::compute_ranges_in_block(), dump_bb(), get_global_range(), fur_source::gori_ssa(), remove_unreachable::handle_early(), gimple_ranger::range_of_stmt(), ranger_cache(), register_inferred_value(), gimple_ranger::register_transitive_inferred_ranges(), remove_unreachable::remove_and_update_globals(), set_global_range(), and dom_opt_dom_walker::set_global_ranges_from_unreachable_edges().
|
inlineinherited |
References range_query::m_infer.
Referenced by path_range_query::adjust_for_non_null_uses(), apply_inferred_ranges(), edge_range(), fill_block_cache(), path_range_query::range_defined_in_block(), range_from_dom(), gimple_ranger::range_on_edge(), and gimple_ranger::register_transitive_inferred_ranges().
|
protectedinherited |
References gcc_checking_assert, r, range_query::range_of_expr(), range_query::range_on_entry(), and range_query::range_on_exit().
Referenced by range_query::get_tree_range().
|
private |
References update_list::add(), block_range_cache::bb_range_p(), update_list::clear_failures(), DEBUG_RANGE_CACHE, value_range::dump(), dump_file, edge_range(), update_list::empty_p(), FOR_EACH_EDGE, gcc_checking_assert, block_range_cache::get_bb_range(), basic_block_def::index, m_on_entry, m_update, update_list::pop(), basic_block_def::preds, print_generic_expr(), update_list::propagation_failed(), RFD_READ_ONLY, block_range_cache::set_bb_range(), value_range::set_undefined(), basic_block_def::succs, TDF_SLIM, TREE_TYPE, value_range::union_(), and value_range::varying_p().
Referenced by fill_block_cache(), and propagate_updated_value().
void ranger_cache::propagate_updated_value | ( | tree | name, |
basic_block | bb ) |
References update_list::add(), block_range_cache::bb_range_p(), DEBUG_RANGE_CACHE, dump_file, update_list::empty_p(), FOR_EACH_EDGE, gcc_checking_assert, basic_block_def::index, m_on_entry, m_update, print_generic_expr(), propagate_cache(), basic_block_def::succs, and TDF_SLIM.
Referenced by gimple_ranger::range_of_stmt(), and set_global_range().
|
private |
References CDI_DOMINATORS, cfun, DEBUG_RANGE_CACHE, dom_info_available_p(), dominated_by_p(), dump_file, EDGE_COUNT, EDGE_PRED, ENTRY_BLOCK_PTR_FOR_FN, EXIT_BLOCK_PTR_FOR_FN, FOR_EACH_EDGE, gcc_checking_assert, block_range_cache::get_bb_range(), get_global_range(), get_immediate_dominator(), gimple_bb(), range_query::gori(), has_abnormal_call_or_eh_pred_edge_p(), basic_block_def::index, range_query::infer_oracle(), m_on_entry, m_workback, infer_range_oracle::maybe_adjust_range(), NULL, basic_block_def::preds, print_generic_expr(), r, resolve_dom(), RFD_FILL, RFD_NONE, value_range::set_varying(), single_pred_edge(), single_pred_p(), SSA_NAME_DEF_STMT, TDF_SLIM, and TREE_TYPE.
Referenced by entry_range(), and fill_block_cache().
|
private |
References fold_range(), gcc_checking_assert, get_global_range_query(), ssa_cache::get_range(), gimple_bb(), gimple_get_lhs(), gimple_range_global(), gimple_range_ssa_p(), m_globals, r, and SSA_NAME_DEF_STMT.
Referenced by entry_range(), exit_range(), and range_of_expr().
Implements range_query.
References entry_range(), range_query::get_tree_range(), gimple_bb(), gimple_range_ssa_p(), r, range_of_def(), RFD_NONE, and SSA_NAME_DEF_STMT.
Referenced by gimple_ranger::range_of_expr().
Reimplemented in dom_ranger, gimple_ranger, and path_range_query.
References gcc_checking_assert, gimple_get_lhs(), r, and range_query::range_of_expr().
Referenced by simplify_using_ranges::fold_cond(), and range_query::value_of_stmt().
Support routines for value queries. Copyright (C) 2020-2024 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 edge_range(), range_query::get_tree_range(), gimple_range_ssa_p(), NULL, r, and RFD_NONE.
Referenced by gimple_ranger::dump_bb(), and gimple_ranger::range_on_edge().
|
virtualinherited |
Reimplemented in gimple_ranger.
References r, and range_query::range_of_expr().
Referenced by remove_unreachable::handle_early(), range_query::invoke_range_of_expr(), remove_unreachable::remove_and_update_globals(), and range_query::value_on_entry().
|
virtualinherited |
Reimplemented in gimple_ranger.
References r, and range_query::range_of_expr().
Referenced by range_query::invoke_range_of_expr(), and range_query::value_on_exit().
void ranger_cache::register_inferred_value | ( | const vrange & | r, |
tree | name, | ||
basic_block | bb ) |
References exit_range(), block_range_cache::get_bb_range(), range_query::gori(), range_query::gori_ssa(), m_on_entry, r, RFD_READ_ONLY, block_range_cache::set_bb_range(), gori_map::set_range_invariant(), and TREE_TYPE.
Referenced by apply_inferred_ranges(), and gimple_ranger::register_transitive_inferred_ranges().
|
inlineinherited |
References range_query::m_relation.
Referenced by path_range_query::compute_ranges(), path_range_query::path_range_query(), path_range_query::path_range_query(), fur_stmt::query_relation(), jt_fur_source::query_relation(), fur_depend::register_relation(), fur_depend::register_relation(), jt_fur_source::register_relation(), and jt_fur_source::register_relation().
|
private |
References block_range_cache::bb_range_p(), CDI_DOMINATORS, dominated_by_p(), edge_range(), FOR_EACH_EDGE, get_immediate_dominator(), gimple_bb(), m_on_entry, basic_block_def::preds, r, RFD_READ_ONLY, block_range_cache::set_bb_range(), SSA_NAME_DEF_STMT, and TREE_TYPE.
Referenced by range_from_dom().
References cfun, changed, temporal_cache::current_p(), DEBUG_RANGE_CACHE, dump_file, ENTRY_BLOCK_PTR_FOR_FN, gimple_bb(), range_query::gori_ssa(), m_globals, m_temporal, POINTER_TYPE_P, propagate_updated_value(), r, temporal_cache::set_always_current(), ssa_cache::set_range(), gori_map::set_range_invariant(), temporal_cache::set_timestamp(), SSA_NAME_DEF_STMT, and TREE_TYPE.
Referenced by gimple_ranger::prefill_stmt_dependencies(), and gimple_ranger::range_of_stmt().
|
protectedinherited |
Reimplemented in ccp_folder, copy_folder, fvrp_folder, rvrp_folder, and substitute_and_fold_engine.
References NULL_TREE, r, range_query::range_of_expr(), value_range::supports_type_p(), and TREE_TYPE.
Referenced by fvrp_folder::value_of_expr(), and rvrp_folder::value_of_expr().
Reimplemented in fvrp_folder, rvrp_folder, and substitute_and_fold_engine.
References gcc_checking_assert, gimple_get_lhs(), NULL_TREE, r, range_query::range_of_stmt(), value_range::supports_type_p(), and TREE_TYPE.
Referenced by fvrp_folder::value_of_stmt(), and rvrp_folder::value_of_stmt().
Reimplemented in fvrp_folder, rvrp_folder, and substitute_and_fold_engine.
References NULL_TREE, r, range_query::range_of_expr(), range_query::range_on_edge(), value_range::supports_type_p(), and TREE_TYPE.
Referenced by fvrp_folder::value_on_edge(), and rvrp_folder::value_on_edge().
|
virtualinherited |
References gcc_checking_assert, NULL_TREE, r, range_query::range_on_entry(), value_range::supports_type_p(), and TREE_TYPE.
|
virtualinherited |
References gcc_checking_assert, NULL_TREE, r, range_query::range_on_exit(), value_range::supports_type_p(), and TREE_TYPE.
|
private |
Referenced by const_query(), dump(), get_global_range(), get_global_range(), range_of_def(), and set_global_range().
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
private |
|
protectedinherited |
Referenced by range_query::create_relation_oracle(), range_query::destroy_relation_oracle(), dump_bb(), 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::range_query(), range_query::relation(), range_query::share_query(), and path_range_query::~path_range_query().
|
protectedinherited |
Referenced by range_query::range_query(), range_query::share_query(), and range_query::~range_query().
|
private |
Referenced by get_global_range(), ranger_cache(), set_global_range(), and ~ranger_cache().
|
private |
Referenced by fill_block_cache(), propagate_cache(), propagate_updated_value(), ranger_cache(), and ~ranger_cache().
|
private |
Referenced by fill_block_cache(), range_from_dom(), ranger_cache(), and ~ranger_cache().