GCC Middle and Back End API Reference
|
Go to the source code of this file.
Functions | |
bool | cleanup_tree_cfg (unsigned=0) |
bool | fixup_noreturn_call (gimple *stmt) |
bool | delete_unreachable_blocks_update_callgraph (cgraph_node *dst_node, bool update_clones) |
unsigned | clean_up_loop_closed_phi (function *) |
bool | phi_alternatives_equal (basic_block, edge, edge) |
Variables | |
bitmap | cfgcleanup_altered_bbs |
|
extern |
Check exits of each loop in FUN, walk over loop closed PHIs in each exit basic block and propagate degenerate PHIs.
References calculate_dominance_info(), CDI_DOMINATORS, dump_file, dump_flags, FOR_EACH_IMM_USE_ON_STMT, FOR_EACH_IMM_USE_STMT, get_loop_exit_edges(), gimple_phi_arg_def(), gimple_phi_result(), gsi_end_p(), gsi_next(), gsi_start_phis(), LOOPS_HAVE_RECORDED_EXITS, loops_state_satisfies_p(), may_propagate_copy(), gphi_iterator::phi(), print_generic_expr(), remove_phi_node(), replace_uses_by(), SET_USE, single_pred_p(), SSA_NAME_OCCURS_IN_ABNORMAL_PHI, TDF_DETAILS, and virtual_operand_p().
Referenced by loop_optimizer_finalize().
|
extern |
Cleanup cfg and repair loop structures.
References changed, cleanup_tree_cfg_noloop(), current_loops, LOOPS_NEED_FIXUP, loops_state_satisfies_p(), NULL, and repair_loop_structures().
Referenced by autofdo::auto_profile(), execute_build_cfg(), execute_cleanup_cfg_post_optimizing(), execute_function_todo(), expand_omp_target(), expand_omp_taskreg(), gimple_lower_bitint(), tree_loop_unroll_and_jam(), tree_profiling(), and tree_unroll_loops_completely().
|
extern |
Delete all unreachable basic blocks and update callgraph. Doing so is somewhat nontrivial because we need to update all clones and remove inline function that become unreachable.
References b, cgraph_edge::callee, cfun, changed, cgraph_node::clone_of, cgraph_node::clones, delete_basic_block(), ENTRY_BLOCK_PTR_FOR_FN, EXIT_BLOCK_PTR_FOR_FN, find_unreachable_blocks(), cgraph_node::get_edge(), gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_stmt(), cgraph_edge::inline_failed, basic_block_def::next_bb, cgraph_node::next_sibling_clone, NULL, cgraph_edge::remove(), symtab_node::remove_stmt_references(), and cgraph_node::remove_symbol_and_inline_clones().
Referenced by ipcp_transform_function(), optimize_inline_calls(), and tree_function_versioning().
STMT is a call that has been discovered noreturn. Split the block to prepare fixing up the CFG and remove LHS. Return true if cleanup-cfg needs to run.
References cfun, changed, create_tmp_reg(), gimple_bb(), gimple_build_nop(), gimple_call_builtin_p(), gimple_call_ctrl_altering_p(), gimple_call_fntype(), gimple_call_lhs(), gimple_call_set_ctrl_altering(), gimple_call_set_lhs(), gsi_end_p(), gsi_for_stmt(), gsi_last_bb(), gsi_last_nondebug_bb(), gsi_next(), gsi_remove(), gsi_stmt(), NULL_TREE, set_ssa_default_def(), SET_SSA_NAME_VAR_OR_IDENTIFIER, should_remove_lhs_p(), split_block(), SSA_NAME_DEF_STMT, TREE_CODE, TREE_TYPE, update_stmt(), and VOID_TYPE_P.
Referenced by eliminate_dom_walker::eliminate_cleanup(), execute_fixup_cfg(), and substitute_and_fold_engine::substitute_and_fold().
|
extern |
If all the PHI nodes in DEST have alternatives for E1 and E2 and those alternatives are equal in each of the PHI nodes, then return true, else return false.
References gcc_assert, gimple_phi_arg_def(), gsi_end_p(), gsi_next(), gsi_start_phis(), NULL_TREE, operand_equal_for_phi_arg_p(), and gphi_iterator::phi().
Referenced by tree_switch_conversion::switch_conversion::collect(), remove_forwarder_block(), and remove_forwarder_block_with_phi().
|
extern |
Header file for CFG cleanup for trees. Copyright (C) 2013-2024 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/>.
In tree-cfgcleanup.cc
CFG cleanup for trees. Copyright (C) 2001-2024 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/>.
The set of blocks in that at least one of the following changes happened: -- the statement at the end of the block was changed -- the block was newly created -- the set of the predecessors of the block changed -- the set of the successors of the block changed ??? Maybe we could track these changes separately, since they determine what cleanups it makes sense to try on the block.
Referenced by cleanup_control_expr_graph(), cleanup_control_flow_bb(), cleanup_tree_cfg_bb(), cleanup_tree_cfg_noloop(), gimple_merge_blocks(), remove_edge_and_dominated_blocks(), remove_forwarder_block(), and replace_uses_by().