GCC Middle and Back End API Reference
|
Data Fields | |
remove_unreachable * | m_unreachable |
bool | fold_all_stmts |
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 Member Functions | |
DISABLE_COPY_AND_ASSIGN (fvrp_folder) | |
Private Attributes | |
simplify_using_ranges | m_simplifier |
dom_ranger * | m_dom_ranger |
|
inline |
References m_dom_ranger, m_unreachable, and NULL.
|
inline |
|
inherited |
References default_gori, gcc_checking_assert, range_query::m_gori, range_query::m_map, and NULL.
Referenced by ranger_cache::ranger_cache().
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().
|
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().
|
private |
|
virtualinherited |
Reimplemented in gimple_ranger, path_range_query, ranger_cache, and ssa_cache.
|
inlineoverridevirtual |
Reimplemented from substitute_and_fold_engine.
References fold_stmt(), follow_single_use_edges(), m_simplifier, and simplify_using_ranges::simplify().
Referenced by fold_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(), 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(), path_range_query::compute_ranges_in_block(), gimple_ranger::dump_bb(), ranger_cache::edge_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(), path_range_query::compute_exit_dependencies(), path_range_query::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 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_query::range_of_expr(), range_query::range_on_entry(), and range_query::range_on_exit().
Referenced by range_query::get_tree_range().
|
inlineoverridevirtual |
Reimplemented from substitute_and_fold_engine.
References m_dom_ranger, and dom_ranger::post_bb().
|
inlinevirtualinherited |
Referenced by substitute_and_fold_dom_walker::foreach_new_stmt_in_bb().
|
inlineoverridevirtual |
Reimplemented from substitute_and_fold_engine.
References gimple_range_ssa_p(), gsi_end_p(), gsi_next(), gsi_start_phis(), m_dom_ranger, gphi_iterator::phi(), PHI_RESULT, dom_ranger::pre_bb(), dom_ranger::range_of_stmt(), and TREE_TYPE.
|
inlineoverridevirtual |
Reimplemented from substitute_and_fold_engine.
References gimple_range_type(), m_dom_ranger, m_unreachable, remove_unreachable::maybe_register(), and dom_ranger::range_of_stmt().
|
inherited |
References FOR_EACH_EDGE, gsi_end_p(), gsi_next(), gsi_start_phis(), is_gimple_min_invariant(), may_propagate_copy(), PHI_ARG_DEF_PTR_FROM_EDGE, propagate_value(), basic_block_def::succs, TREE_CODE, USE_FROM_PTR, substitute_and_fold_engine::value_on_edge(), and virtual_operand_p().
Referenced by substitute_and_fold_dom_walker::before_dom_children().
|
virtualinherited |
Implements range_query.
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 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().
|
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().
Replace propagated values into all the arguments for PHI using the values from PROP_VALUE.
References dump_file, dump_flags, gcc_checking_assert, gimple_phi_arg_def(), gimple_phi_arg_edge(), gimple_phi_num_args(), i, may_propagate_copy(), prop_stats_d::num_const_prop, prop_stats_d::num_copy_prop, PHI_ARG_DEF_PTR, print_gimple_stmt(), prop_stats, propagate_value(), SSA_NAME_OCCURS_IN_ABNORMAL_PHI, TDF_DETAILS, TDF_SLIM, TREE_CODE, substitute_and_fold_engine::value_on_edge(), and virtual_operand_p().
Referenced by substitute_and_fold_dom_walker::before_dom_children().
Replace USE references in statement STMT with the values stored in PROP_VALUE. Return true if at least one reference was replaced.
References FOR_EACH_SSA_USE_OPERAND, may_propagate_copy(), may_propagate_copy_into_asm(), NULL_TREE, prop_stats_d::num_const_prop, prop_stats_d::num_copy_prop, prop_stats, propagate_value(), SSA_OP_USE, TREE_CODE, USE_FROM_PTR, and substitute_and_fold_engine::value_of_expr().
Referenced by substitute_and_fold_dom_walker::before_dom_children().
|
protectedinherited |
|
inherited |
Perform final substitution and folding of propagated values. Process the whole function if BLOCK is null, otherwise only process the blocks that BLOCK dominates. In the latter case, it is the caller's responsibility to ensure that dominator information is available and up-to-date. PROP_VALUE[I] contains the single value that should be substituted at every use of SSA name N_I. If PROP_VALUE is NULL, no values are substituted. If FOLD_FN is non-NULL the function will be invoked on all statements before propagating values for pass specific simplification. DO_DCE is true if trivially dead stmts can be removed. If DO_DCE is true, the statements within a BB are walked from last to first element. Otherwise we scan from first to last element. Return TRUE when something changed.
References bitmap_empty_p(), calculate_dominance_info(), CDI_DOMINATORS, cfun, substitute_and_fold_dom_walker::dceworklist, dom_info_state(), dump_file, dump_flags, ENTRY_BLOCK_PTR_FOR_FN, fixup_noreturn_call(), gcc_assert, gimple_purge_all_dead_abnormal_call_edges(), gimple_purge_all_dead_eh_edges(), substitute_and_fold_dom_walker::need_ab_cleanup, substitute_and_fold_dom_walker::need_eh_cleanup, prop_stats_d::num_const_prop, prop_stats_d::num_copy_prop, prop_stats_d::num_stmts_folded, print_gimple_stmt(), prop_stats, simple_dce_from_worklist(), substitute_and_fold_dom_walker::something_changed, statistics_counter_event(), substitute_and_fold_dom_walker::stmts_to_fixup, TDF_DETAILS, and dom_walker::walk().
Referenced by ccp_finalize(), execute_fast_vrp(), execute_ranger_vrp(), and fini_copy_prop().
Implements substitute_and_fold_engine.
References m_dom_ranger, NULL, SSA_NAME_OCCURS_IN_ABNORMAL_PHI, TREE_CODE, and range_query::value_of_expr().
Reimplemented from substitute_and_fold_engine.
References m_dom_ranger, NULL, SSA_NAME_OCCURS_IN_ABNORMAL_PHI, TREE_CODE, and range_query::value_of_stmt().
Reimplemented from substitute_and_fold_engine.
References m_dom_ranger, NULL, SSA_NAME_OCCURS_IN_ABNORMAL_PHI, TREE_CODE, and range_query::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.
|
inherited |
Referenced by substitute_and_fold_dom_walker::before_dom_children().
|
private |
Referenced by fvrp_folder(), post_fold_bb(), pre_fold_bb(), pre_fold_stmt(), value_of_expr(), value_of_stmt(), and value_on_edge().
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
Referenced by range_query::create_relation_oracle(), range_query::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::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 fold_stmt().
remove_unreachable* fvrp_folder::m_unreachable |
Referenced by execute_fast_vrp(), fvrp_folder(), and pre_fold_stmt().