|
GCC Middle and Back End API Reference
|

Data Structures | |
| struct | path_stats |
| struct | unwind_state |
Public Member Functions | |
| back_threader_profitability (bool speed_p, gimple *stmt) | |
| void | push_bb (const vec< basic_block > &) |
| void | pop_bb () |
| bool | possibly_profitable_path_p (const vec< basic_block > &, bool *) |
| bool | profitable_path_p (const vec< basic_block > &, edge taken, bool *irreducible_loop) |
Private Member Functions | |
| int | account_bb (basic_block, bool) |
| int | net_insns () const |
Private Attributes | |
| const bool | m_speed_p |
| int | m_exit_jump_benefit |
| bool | m_threaded_multiway_branch |
| class loop * | m_loop |
| path_stats | m_stats |
| auto_vec< unwind_state, 20 > | m_unwind |
SSA Jump Threading Copyright (C) 2005-2026 Free Software Foundation, Inc. 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 eni_size_weights, estimate_num_insns(), m_exit_jump_benefit, m_loop, m_speed_p, m_stats, m_threaded_multiway_branch, and NULL.
|
private |
Account for BB in the cumulative stats for the path being threaded. CHECK_MULTIWAY is true for all blocks except the block whose branch we are going to eliminate. Return the number of insns in BB, which PUSH_BB records so the dump can print a per-block count.
References back_threader_profitability::path_stats::contains_hot_bb, eni_size_weights, estimate_num_insns(), gimple_call_builtin_p(), gimple_call_internal_p(), gsi_after_labels(), gsi_end_p(), gsi_last_bb(), gsi_next_nondebug(), gsi_stmt(), is_gimple_debug(), m_speed_p, m_stats, back_threader_profitability::path_stats::multiway_branch_in_path, optimize_bb_for_speed_p(), and back_threader_profitability::path_stats::unprofitable_bb.
Referenced by push_bb().
|
inlineprivate |
References m_exit_jump_benefit, m_stats, and back_threader_profitability::path_stats::n_insns.
Referenced by possibly_profitable_path_p(), and profitable_path_p().
| void back_threader_profitability::pop_bb | ( | ) |
References m_stats, and m_unwind.
Referenced by back_threader::find_paths_to_names().
| bool back_threader_profitability::possibly_profitable_path_p | ( | const vec< basic_block > & | m_path, |
| bool * | large_non_fsm ) |
Examine jump threading path PATH and return TRUE if it is possibly profitable to thread it, otherwise return FALSE. If this function returns TRUE profitable_path_p might not be satisfied but when the path is extended it might be. In particular indicate in *LARGE_NON_FSM whether the thread is too large for a non-FSM thread but would be OK if we extend the path to cover the loop backedge. ?? It seems we should be able to loosen some of the restrictions in this function after loop optimizations have run.
References cfun, dump_file, dump_flags, EXIT_BLOCK, find_edge(), fputc(), gcc_checking_assert, basic_block_def::index, loop::latch, m_exit_jump_benefit, m_loop, m_speed_p, m_stats, m_threaded_multiway_branch, m_unwind, net_insns(), probably_never_executed_edge_p(), TDF_DETAILS, back_threader_profitability::path_stats::threaded_through_latch, and back_threader_profitability::path_stats::unprofitable_bb.
Referenced by back_threader::find_paths_to_names().
| bool back_threader_profitability::profitable_path_p | ( | const vec< basic_block > & | m_path, |
| edge | taken_edge, | ||
| bool * | creates_irreducible_loop ) |
Examine jump threading path PATH and return TRUE if it is profitable to thread it, otherwise return FALSE. The taken edge out of the path is TAKEN_EDGE. CREATES_IRREDUCIBLE_LOOP is set to TRUE if threading this path would create an irreducible loop. ?? It seems we should be able to loosen some of the restrictions in this function after loop optimizations have run.
References cfun, back_threader_profitability::path_stats::contains_hot_bb, determine_bb_domination_status(), DOMST_NONDOMINATING, dump_file, dump_flags, empty_block_p(), fputc(), loop::latch, m_speed_p, m_stats, m_threaded_multiway_branch, back_threader_profitability::path_stats::multiway_branch_in_path, net_insns(), optimize_edge_for_speed_p(), probably_never_executed_edge_p(), PROP_loop_opts_done, TDF_DETAILS, and back_threader_profitability::path_stats::threaded_through_latch.
Referenced by back_threader::maybe_register_path().
| void back_threader_profitability::push_bb | ( | const vec< basic_block > & | path | ) |
Update the stats after a block has been appended to PATH.
References account_bb(), loop::latch, m_loop, m_stats, m_unwind, back_threader_profitability::path_stats::n_insns, and back_threader_profitability::path_stats::threaded_through_latch.
Referenced by back_threader::find_paths_to_names().
|
private |
Referenced by back_threader_profitability(), net_insns(), and possibly_profitable_path_p().
|
private |
Referenced by back_threader_profitability(), possibly_profitable_path_p(), and push_bb().
|
private |
Referenced by account_bb(), back_threader_profitability(), possibly_profitable_path_p(), and profitable_path_p().
|
private |
Referenced by account_bb(), back_threader_profitability(), net_insns(), pop_bb(), possibly_profitable_path_p(), profitable_path_p(), and push_bb().
|
private |
Referenced by back_threader_profitability(), possibly_profitable_path_p(), and profitable_path_p().
|
private |
Referenced by pop_bb(), possibly_profitable_path_p(), and push_bb().