GCC Middle and Back End API Reference
|
#include <gimple-range-path.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 Attributes | |
ssa_lazy_cache | m_cache |
auto_vec< basic_block > | m_path |
auto_bitmap | m_exit_dependencies |
gimple_ranger & | m_ranger |
unsigned | m_pos |
bool | m_resolve |
bool | m_undefined_path |
Header file for jump threading path solver. Copyright (C) 2021-2024 Free Software Foundation, Inc. Contributed by 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/>.
path_range_query::path_range_query | ( | class gimple_ranger & | ranger, |
const vec< basic_block > & | path, | ||
const bitmap_head * | dependencies = NULL, | ||
bool | resolve = true ) |
References m_ranger, range_query::m_relation, ranger, range_query::relation(), reset_path(), and range_query::share_query().
path_range_query::path_range_query | ( | gimple_ranger & | ranger, |
bool | resolve = true ) |
References m_ranger, range_query::m_relation, ranger, range_query::relation(), and range_query::share_query().
|
virtual |
References range_query::m_relation, and NULL.
References bitmap_set_bit, SSA_NAME_VERSION, value_range::supports_type_p(), TREE_CODE, and TREE_TYPE.
Referenced by compute_exit_dependencies().
|
private |
References EXECUTE_IF_SET_IN_BITMAP, get_cache(), i, range_query::infer_oracle(), m_cache, m_exit_dependencies, POINTER_TYPE_P, r, ssa_lazy_cache::set_range(), ssa_name, and TREE_TYPE.
Referenced by compute_ranges().
|
inlineprivate |
Referenced by compute_ranges_in_block(), and ssa_range_in_phi().
|
inlineprivate |
References m_pos.
Referenced by compute_ranges(), and compute_ranges_in_block().
|
private |
References add_to_exit_dependencies(), bitmap_copy(), bitmap_count_bits(), bitmap_set_bit, count, dyn_cast(), EXECUTE_IF_SET_IN_BITMAP, FOR_EACH_GORI_EXPORT_NAME, gimple_bb(), gimple_phi_arg(), gimple_phi_arg_edge(), gimple_phi_num_args(), gimple_range_ssa_names(), range_query::gori_ssa(), i, m_path, m_resolve, ssa_name, SSA_NAME_DEF_STMT, SSA_NAME_IS_DEFAULT_DEF, SSA_NAME_VERSION, TREE_CODE, TREE_TYPE, and worklist.
Referenced by compute_ranges().
|
private |
References EDGE_SUCC, gcc_unreachable, gcond_edge_range(), gsi_last_bb(), m_path, NULL, r, fur_source::register_outgoing_edges(), and safe_dyn_cast().
Referenced by compute_ranges_in_block().
|
private |
References exit_dependency_p(), find_edge(), gimple_phi_arg_edge(), gimple_phi_num_args(), gimple_phi_result(), gsi_end_p(), gsi_next(), gsi_start_phis(), i, maybe_register_phi_relation(), and NULL.
Referenced by compute_ranges_in_block().
|
private |
References adjust_for_non_null_uses(), at_exit(), bitmap_copy(), compute_exit_dependencies(), compute_ranges_in_block(), curr_bb(), DEBUG_SOLVER, path_oracle::dump(), dump(), dump_file, get_path_oracle(), i, basic_block_def::index, m_exit_dependencies, m_path, m_ranger, m_resolve, move_next(), range_query::relation(), and path_oracle::reset_path().
Referenced by reset_path().
|
private |
References at_entry(), at_exit(), ssa_lazy_cache::clear_range(), compute_outgoing_relations(), compute_phi_relations(), compute_ranges_in_phis(), DEBUG_SOLVER, dump_file, EXECUTE_IF_AND_IN_BITMAP, EXECUTE_IF_SET_IN_BITMAP, gori_map::exports(), find_edge(), get_cache(), get_path_oracle(), range_query::gori(), range_query::gori_ssa(), i, m_cache, m_exit_dependencies, m_resolve, next_bb(), prev_bb(), print_generic_expr(), r, range_defined_in_block(), relations_may_be_invalidated(), path_oracle::reset_path(), ssa_lazy_cache::set_range(), ssa_defined_in_bb(), ssa_name, SSA_NAME_DEF_STMT, TDF_SLIM, and TREE_TYPE.
Referenced by compute_ranges().
|
private |
References exit_dependency_p(), gimple_phi_result(), gsi_end_p(), gsi_next(), gsi_start_phis(), m_cache, r, range_defined_in_block(), ssa_lazy_cache::set_range(), and TREE_TYPE.
Referenced by compute_ranges_in_block().
|
inherited |
References default_gori, gcc_checking_assert, range_query::m_gori, range_query::m_map, and NULL.
Referenced by ranger_cache::ranger_cache().
|
inherited |
References default_infer_oracle, gcc_checking_assert, and range_query::m_infer.
Referenced by ranger_cache::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::ranger_cache().
|
inlineprivate |
Referenced by compute_ranges().
void path_range_query::debug | ( | ) |
References dump().
References gimple_bb(), m_path, and SSA_NAME_DEF_STMT.
Referenced by internal_range_of_expr(), range_on_path_entry(), and ssa_range_in_phi().
|
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::~ranger_cache().
|
inherited |
References default_relation_oracle, and range_query::m_relation.
Referenced by execute_fast_vrp(), range_query::~range_query(), and ranger_cache::~ranger_cache().
|
overridevirtual |
Reimplemented from range_query.
References ssa_cache::dump(), dump_file, dump_flags, dump_ranger(), EXECUTE_IF_SET_IN_BITMAP, i, m_cache, m_exit_dependencies, m_path, print_generic_expr(), ssa_name, TDF_DETAILS, and TDF_SLIM.
Referenced by compute_ranges(), and debug().
|
inlineprivate |
References m_path.
Referenced by maybe_register_phi_relation(), and range_on_path_entry().
|
inlineprivate |
References m_path.
References bitmap_bit_p, m_exit_dependencies, SSA_NAME_VERSION, and TREE_CODE.
Referenced by compute_phi_relations(), and compute_ranges_in_phis().
|
inlineprivate |
References range_query::m_relation.
Referenced by compute_ranges(), compute_ranges_in_block(), maybe_register_phi_relation(), and range_defined_in_block().
|
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(), 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 range_query::m_gori.
Referenced by ranger_cache::block_range(), compute_ranges_in_block(), gimple_ranger::dump_bb(), ranger_cache::edge_range(), ranger_cache::entry_range(), evaluate_control_stmt_using_entry_checks(), ranger_cache::fill_block_cache(), fur_source::gori(), gori_on_edge(), ranger_cache::range_from_dom(), and ranger_cache::register_inferred_value().
|
inlineinherited |
References range_query::m_map.
Referenced by hybrid_jt_simplifier::compute_exit_dependencies(), compute_exit_dependencies(), compute_ranges_in_block(), ranger_cache::dump_bb(), ranger_cache::get_global_range(), fur_source::gori_ssa(), remove_unreachable::handle_early(), gimple_ranger::range_of_stmt(), ranger_cache::ranger_cache(), ranger_cache::register_inferred_value(), gimple_ranger::register_transitive_inferred_ranges(), remove_unreachable::remove_and_update_globals(), ranger_cache::set_global_range(), and dom_opt_dom_walker::set_global_ranges_from_unreachable_edges().
|
inlineinherited |
References range_query::m_infer.
Referenced by adjust_for_non_null_uses(), ranger_cache::apply_inferred_ranges(), ranger_cache::edge_range(), ranger_cache::fill_block_cache(), range_defined_in_block(), ranger_cache::range_from_dom(), gimple_ranger::range_on_edge(), and gimple_ranger::register_transitive_inferred_ranges().
References defined_outside_path(), get_cache(), gimple_bb(), gimple_range_global(), m_cache, m_resolve, r, range_defined_in_block(), range_on_path_entry(), ssa_lazy_cache::set_range(), TREE_CODE, and TREE_TYPE.
Referenced by range_of_expr().
|
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().
References dump_file, dump_flags, entry_bb(), get_path_oracle(), gimple_bb(), gimple_phi_arg_def(), gimple_phi_result(), gimple_range_ssa_p(), basic_block_def::index, path_oracle::killing_def(), range_query::m_relation, relation_oracle::record(), relations_may_be_invalidated(), ssa_defined_in_bb(), TDF_DETAILS, and VREL_EQ.
Referenced by compute_phi_relations().
|
inlineprivate |
References m_pos.
Referenced by compute_ranges().
|
inlineprivate |
Referenced by compute_ranges_in_block().
|
inlineprivate |
Referenced by compute_ranges_in_block(), and ssa_range_in_phi().
|
private |
References as_a(), DEBUG_SOLVER, dump_file, get_cache(), get_path_oracle(), gimple_bb(), basic_block_def::index, range_query::infer_oracle(), path_oracle::killing_def(), infer_range_oracle::maybe_adjust_range(), POINTER_TYPE_P, print_generic_expr(), r, range_of_stmt(), SSA_NAME_DEF_STMT, ssa_range_in_phi(), TDF_SLIM, and TREE_TYPE.
Referenced by compute_ranges_in_block(), compute_ranges_in_phis(), and internal_range_of_expr().
|
overridevirtual |
Implements range_query.
References internal_range_of_expr(), m_undefined_path, and r.
Referenced by check_nul_terminated_array(), determine_value_range(), dump_strlen_info(), expr_not_equal_to(), back_threader::find_taken_edge_switch(), find_what_p_points_to(), infer_loop_bounds_from_signedness(), minmax_from_comparison(), scev_var_range_cant_overflow(), set_strlen_range(), set_switch_stmt_execution_predicate(), hybrid_jt_simplifier::simplify(), simplify_conversion_using_ranges(), size_must_be_zero_p(), split_constant_offset(), vect_get_range_info(), and vect_recog_divmod_pattern().
|
overridevirtual |
Reimplemented from range_query.
References fold_using_range::fold_stmt(), gimple_range_type(), m_path, m_resolve, and r.
Referenced by back_threader::find_taken_edge_cond(), loop_static_stmt_p(), range_defined_in_block(), hybrid_jt_simplifier::simplify(), and static_loop_exit().
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 in dom_ranger, gimple_ranger, and ranger_cache.
References r, and range_query::range_of_expr().
Referenced by fur_edge::get_operand(), fur_edge::get_phi_operand(), fur_source::get_phi_operand(), phi_analyzer::process_phi(), and range_query::value_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().
References defined_outside_path(), entry_bb(), gcc_checking_assert, m_ranger, r, and gimple_ranger::range_on_entry().
Referenced by internal_range_of_expr(), and ssa_range_in_phi().
|
inlineinherited |
References range_query::m_relation.
Referenced by compute_ranges(), 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().
Referenced by compute_ranges_in_block(), and maybe_register_phi_relation().
void path_range_query::reset_path | ( | const vec< basic_block > & | path, |
const bitmap_head * | dependencies ) |
References ssa_lazy_cache::clear(), compute_ranges(), gcc_checking_assert, m_cache, m_path, m_pos, and m_undefined_path.
Referenced by path_range_query(), and hybrid_jt_simplifier::simplify().
|
protectedinherited |
References range_query::m_gori, range_query::m_infer, range_query::m_map, range_query::m_relation, and range_query::m_shared_copy_p.
Referenced by gimple_ranger::gimple_ranger(), path_range_query(), and path_range_query().
|
private |
References gimple_bb(), SSA_NAME_DEF_STMT, and TREE_CODE.
Referenced by compute_ranges_in_block(), maybe_register_phi_relation(), and ssa_range_in_phi().
References at_entry(), defined_outside_path(), find_edge(), get_cache(), gimple_bb(), gimple_phi_arg_def(), gimple_phi_num_args(), gimple_phi_result(), i, m_ranger, m_resolve, NULL, PHI_ARG_DEF_FROM_EDGE, prev_bb(), r, gimple_ranger::range_of_expr(), gimple_ranger::range_on_edge(), range_on_path_entry(), ssa_defined_in_bb(), TREE_CODE, and TREE_TYPE.
Referenced by range_defined_in_block().
bool path_range_query::unreachable_path_p | ( | ) |
References m_undefined_path.
Referenced by back_threader::find_taken_edge_cond().
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 |
|
private |
Referenced by adjust_for_non_null_uses(), compute_ranges(), compute_ranges_in_block(), dump(), and exit_dependency_p().
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
private |
|
private |
Referenced by at_entry(), at_exit(), curr_bb(), move_next(), next_bb(), prev_bb(), and reset_path().
|
private |
Referenced by compute_ranges(), path_range_query(), path_range_query(), range_on_path_entry(), and ssa_range_in_phi().
|
protectedinherited |
Referenced by range_query::create_relation_oracle(), range_query::destroy_relation_oracle(), ranger_cache::dump_bb(), ranger_cache::fill_block_cache(), get_path_oracle(), maybe_register_phi_relation(), path_range_query(), path_range_query(), range_query::range_query(), range_query::relation(), range_query::share_query(), and ~path_range_query().
|
private |
|
protectedinherited |
Referenced by range_query::range_query(), range_query::share_query(), and range_query::~range_query().
|
private |
Referenced by range_of_expr(), reset_path(), and unreachable_path_p().