|
GCC Middle and Back End API Reference
|
#include "predict.h"
Go to the source code of this file.
Data Structures | |
| struct | profile_record |
| class | copy_bb_data |
| struct | cfg_hooks |
Namespaces | |
| namespace | diagnostics |
| namespace | json |
Typedefs | |
| typedef int_hash< unsigned short, 0 > | dependence_hash |
Variables | |
| const struct cfg_hooks | gimple_cfg_hooks |
| const struct cfg_hooks | rtl_cfg_hooks |
| const struct cfg_hooks | cfg_layout_rtl_cfg_hooks |
| typedef int_hash<unsigned short, 0> dependence_hash |
|
extern |
Return 1 if BB ends with a call, possibly followed by some instructions that must stay with the call, 0 otherwise.
References block_ends_with_call_p(), cfg_hooks::block_ends_with_call_p, current_ir_name(), and internal_error().
Referenced by block_ends_with_call_p(), compute_branch_probabilities(), find_traces_1_round(), is_edge_inconsistent(), and is_inconsistent().
|
extern |
Return 1 if BB ends with a conditional branch, 0 otherwise.
References block_ends_with_condjump_p(), cfg_hooks::block_ends_with_condjump_p, current_ir_name(), and internal_error().
Referenced by block_ends_with_condjump_p(), and compute_branch_probabilities().
|
extern |
Checks whether all N blocks in BBS array can be copied. PREVAILING_EXIT is as in copy_bbs. If non-NULL, the copy of its source keeps only the prevailing edge, so the abnormal successor edges of that block do not require redirection.
References can_copy_bbs_p(), can_duplicate_block_p(), end(), FOR_EACH_EDGE, and i.
Referenced by can_copy_bbs_p(), can_duplicate_loop_p(), duplicate_loop_body_to_header_edge(), back_jt_path_registry::duplicate_thread_path(), find_seed_stmts_for_distribution(), gimple_duplicate_seme_region(), gimple_duplicate_sese_tail(), slpeel_can_duplicate_loop_p(), and split_loop().
Returns true if we can duplicate E's destination with E redirected to the copy.
References can_duplicate_block_on_edge_p(), can_duplicate_block_p(), EDGE_COMPLEX, FOR_EACH_EDGE, and basic_block_def::succs.
Referenced by can_duplicate_block_on_edge_p(), replicate_cond_into_pred(), and jump_threader::thread_across_edge().
|
extern |
Returns true if we can duplicate basic block BB.
References can_duplicate_block_p(), cfg_hooks::can_duplicate_block_p, cfun, current_ir_name(), ENTRY_BLOCK_PTR_FOR_FN, EXIT_BLOCK_PTR_FOR_FN, and internal_error().
Referenced by analyze_bb(), cached_can_duplicate_bb_p(), can_copy_bbs_p(), can_dup_for_shrink_wrapping(), can_duplicate_block_on_edge_p(), can_duplicate_block_p(), copy_bb_p(), duplicate_block(), duplicate_computed_gotos(), find_implicit_erroneous_behavior(), handle_return_addr_local_phi_arg(), maybe_duplicate_computed_goto(), tail_duplicate(), and fwd_jt_path_registry::update_cfg().
|
extern |
Checks whether we may merge blocks BB1 and BB2.
References can_merge_blocks_p(), cfg_hooks::can_merge_blocks_p, current_ir_name(), and internal_error().
Referenced by can_merge_blocks_p(), combine_blocks(), find_cond_trap(), noce_finish_if_conversion(), try_optimize_cfg(), and want_merge_blocks_p().
|
extern |
Returns true if it is possible to remove the edge E by redirecting it to the destination of the other edge going from its source.
References can_remove_branch_p(), cfg_hooks::can_remove_branch_p, current_ir_name(), EDGE_COUNT, and internal_error().
Referenced by can_remove_branch_p(), and remove_path().
|
extern |
Loop versioning uses the duplicate_loop_body_to_header_edge to create a new version of the loop basic-blocks, the parameters here are exactly the same as in duplicate_loop_body_to_header_edge or tree_duplicate_loop_body_to_header_edge; while in tree-ssa there is additional work to maintain ssa information that's why there is a need to call the tree_duplicate_loop_body_to_header_edge rather than duplicate_loop_body_to_header_edge when we are in tree mode.
References cfg_hook_duplicate_loop_body_to_header_edge(), cfg_hooks::cfg_hook_duplicate_loop_body_to_header_edge, and gcc_assert.
Referenced by cfg_hook_duplicate_loop_body_to_header_edge(), and loop_version().
|
extern |
Initialization of functions specific to the rtl IR.
References cfg_layout_rtl_cfg_hooks, and cfg_layout_rtl_register_cfg_hooks().
Referenced by cfg_layout_initialize(), cfg_layout_rtl_register_cfg_hooks(), and skip_pass().
|
inline |
Check control flow invariants, if internal consistency checks are enabled.
References checking_verify_flow_info(), and verify_flow_info().
Referenced by cfg_layout_finalize(), checking_verify_flow_info(), cleanup_tree_cfg_noloop(), commit_edge_insertions(), expand_thunk(), gimple_flow_call_edges_add(), if_convert(), move_loop_invariants(), split_all_insns(), tree_transform_and_unroll_loop(), and try_optimize_cfg().
|
extern |
Duplicates N basic blocks stored in array BBS. Newly created basic blocks are placed into array NEW_BBS in the same order. Edges from basic blocks in BBS are also duplicated and copies of those that lead into BBS are redirected to appropriate newly created block. The function assigns bbs into loops (copy of basic block bb is assigned to bb->loop_father->copy loop, so this must be set up correctly in advance) If UPDATE_DOMINANCE is true then this function updates dominators locally (LOOPS structure that contains the information about dominators is passed to enable this), otherwise it does not update the dominator information and it assumed that the caller will do this, perhaps by destroying and recreating it instead of trying to do an incremental update like this function does when update_dominance is true. BASE is the superloop to that basic block belongs; if its header or latch is copied, we do not set the new blocks as header or latch. Created copies of N_EDGES edges in array EDGES are stored in array NEW_EDGES, also in the same order. Newly created basic blocks are put after the basic block AFTER in the instruction stream, and the order of the blocks in BBS array is preserved. If PREVAILING_EXIT is non-NULL, its source must be in BBS, and its destination must not be: the copy of that block keeps only its edges to PREVAILING_EXIT->dest, and the rest of its outgoing edges are removed. None of its edges are redirected, which allows copying a region whose exit block has abnormal successor edges into the region. It is the caller's responsibility to remove or rewrite the copied block's control statement.
References CDI_DOMINATORS, copy_bbs(), duplicate_block(), ei_next(), ei_safe_edge(), ei_start, find_edge(), basic_block_def::flags, gcc_checking_assert, get_bb_copy(), get_immediate_dominator(), loop::header, i, loop::latch, basic_block_def::loop_father, NULL, redirect_edge_and_branch_force(), remove_edge(), set_immediate_dominator(), and basic_block_def::succs.
Referenced by copy_bbs(), duplicate_loop_body_to_header_edge(), back_jt_path_registry::duplicate_thread_path(), gimple_duplicate_seme_region(), gimple_duplicate_sese_tail(), and slpeel_tree_duplicate_loop_to_edge_cfg().
|
extern |
References create_basic_block(), create_basic_block_1(), and NULL.
Referenced by cfg_layout_duplicate_bb(), cfg_layout_split_edge(), construct_exit_block(), construct_init_block(), copy_bb(), create_basic_block(), create_basic_block(), create_eh_forwarder_block(), emit_to_new_bb_before(), expand_gimple_cond(), expand_gimple_tailcall(), expand_thunk(), fix_crossing_conditional_branches(), force_nonfallthru_and_redirect(), handle_abnormal_edges(), handle_simple_exit(), init_lowered_empty_function(), make_blocks_1(), rtl_split_block(), rtl_split_edge(), split_function(), and unloop_loops().
|
extern |
References create_basic_block(), create_basic_block_1(), and end().
|
extern |
Creates an empty basic block just after basic block AFTER.
References create_basic_block_1(), create_empty_bb(), and NULL.
Referenced by build_gimple_cfg(), rt_bb_visited::check(), create_cond_insert_point(), create_empty_bb(), execute_sm_if_changed(), expand_complex_div_wide(), expand_omp_for_generic(), expand_omp_for_init_counts(), expand_omp_for_init_vars(), expand_omp_sections(), expand_omp_simd(), expand_omp_target(), expand_parallel_call(), expand_transaction(), extract_omp_for_update_vars(), gimple_duplicate_bb(), gimple_split_block(), gimple_split_edge(), gsi_insert_finally_seq_after_call(), insert_check_and_trap(), insert_cond_bb(), rt_bb_visited::insert_exit_check_on_edge(), lower_resx(), move_sese_region_to_fn(), optimize_mask_stores(), simd_clone_adjust(), try_shrink_wrapping(), tree_switch_conversion::switch_decision_tree::try_switch_expansion(), ubsan_expand_null_ifn(), and ubsan_expand_ptr_ifn().
|
extern |
Declarations.
Returns current ir type.
References current_ir_type(), and cfg_hooks::ir.
Referenced by cleanup_cfg(), current_ir_type(), delete_unreachable_blocks(), dump_eh_tree(), duplicate_loop_body_to_header_edge(), emit_barrier_after_bb(), expand_remove_edge(), find_cond_trap(), find_subloop_latch_edge(), fixup_partitions(), force_edge_cold(), gt_ggc_mx(), gt_pch_nx(), gt_pch_nx(), init_copyid_allocator(), lv_adjust_loop_entry_edge(), mark_all_labels(), remove_edge(), reorder_basic_blocks(), rtl_loop_init(), rtl_verify_edges(), try_optimize_cfg(), update_cfg_for_uncondjump(), and verify_hot_cold_block_grouping().
|
extern |
Deletes the basic block BB.
References CDI_DOMINATORS, CDI_POST_DOMINATORS, current_ir_name(), current_loops, cfg_hooks::delete_basic_block, delete_basic_block(), delete_from_dominance_info(), dom_info_available_p(), EDGE_COUNT, EDGE_PRED, EDGE_SUCC, expunge_block(), loop::header, internal_error(), loop::latch, basic_block_def::loop_father, mark_loop_for_removal(), NULL, basic_block_def::preds, remove_bb_from_loops(), remove_edge(), and basic_block_def::succs.
Referenced by cleanup_control_flow_pre(), combine_blocks(), convert_if_conditions_to_switch(), delete_basic_block(), delete_unreachable_blocks(), delete_unreachable_blocks_update_callgraph(), destroy_loop(), doloop_modify(), eliminate_unnecessary_stmts(), tree_switch_conversion::switch_decision_tree::emit(), find_cond_trap(), find_if_case_1(), find_if_case_2(), fuse_loops(), maybe_remove_forwarder_block(), noce_finish_if_conversion(), post_order_compute(), tree_switch_conversion::switch_conversion::prune_bbs(), remove_bbs(), remove_edge_and_dominated_blocks(), replace_block_by(), replace_phi_edge_with_variable(), slpeel_tree_duplicate_loop_to_edge_cfg(), try_crossjump_to_edge(), try_optimize_cfg(), and try_simplify_condjump().
|
extern |
Print out one basic block BB to file OUTF. INDENT is printed at the start of each new line. FLAGS are the TDF_* flags in dumpfile.h. This function takes care of the purely graph related information. The cfg hook for the active representation should dump representation-specific information.
|
extern |
References BB_PARTITION, basic_block_def::count, current_ir_name(), cfg_hooks::dump_bb_as_sarif_properties, dump_bb_as_sarif_properties(), cfg_hooks::dump_bb_for_graph, ENTRY_BLOCK, EXIT_BLOCK, basic_block_def::index, profile_count::initialized_p(), internal_error(), pp_formatted_text(), pp_printf(), PRId64, json::object::set_string(), and profile_count::to_gcov_type().
Referenced by cfg_diagnostic_digraph::add_cfg_node(), and dump_bb_as_sarif_properties().
|
extern |
Dumps basic block BB to pretty-printer PP, for use as a label of a DOT graph record-node. The implementation of this hook is expected to write the label to the stream that is attached to PP. Field separators between instructions are pipe characters printed verbatim. Instructions should be written with some characters escaped, using pp_write_text_as_dot_label_to_stream().
References basic_block_def::count, current_ir_name(), cfg_hooks::dump_bb_for_graph, dump_bb_for_graph(), dump_flags, profile_count::initialized_p(), internal_error(), pp_printf(), pp_write_text_to_stream(), PRId64, TDF_SLIM, and profile_count::to_gcov_type().
Referenced by draw_cfg_node(), and dump_bb_for_graph().
|
extern |
Dump the complete CFG to FILE. FLAGS are the TDF_* flags in dumpfile.h.
References cfun, dump_bb(), dump_flow_info(), FOR_ALL_BB_FN, n_basic_blocks_for_fn, and n_edges_for_fn.
Referenced by compute_alignments(), debug_flow_info(), dump_flow_info(), reorder_basic_blocks(), rest_of_handle_cse(), rest_of_handle_cse2(), rest_of_handle_if_conversion(), rtl_loop_init(), and variable_tracking_main_1().
|
extern |
Duplicate basic block BB, place it after AFTER (if non-null) and redirect edge E to it (if non-null). Return the new basic block. If BB contains a returns_twice call, the caller is responsible for recreating incoming abnormal edges corresponding to the "second return" for the copy. gimple_can_duplicate_bb_p rejects such blocks, while RTL likes to live dangerously. If BB has incoming abnormal edges for some other reason, their destinations should be tied to label(s) of the original BB and not the copy.
References add_bb_to_loop(), can_duplicate_block_p(), basic_block_def::count, current_ir_name(), current_loops, cfg_hooks::duplicate_block, duplicate_block(), basic_block_def::flags, FOR_EACH_EDGE, gcc_checking_assert, get_loop_copy(), loop::header, internal_error(), basic_block_def::loop_father, loop_outer(), LOOPS_MAY_HAVE_MULTIPLE_LATCHES, loops_state_set(), mark_loop_for_removal(), move_block_after(), NULL, redirect_edge_and_branch_force(), set_bb_copy(), set_bb_original(), basic_block_def::succs, unchecked_make_edge(), and profile_count::uninitialized().
Referenced by copy_bb(), copy_bbs(), create_block_for_threading(), duplicate_block(), isolate_path(), maybe_duplicate_computed_goto(), replicate_cond_into_pred(), transform_duplicate(), and try_shrink_wrapping().
|
extern |
Return true if BB contains only labels or non-executable instructions
References cfg_hooks::empty_block_p, empty_block_p(), and gcc_assert.
Referenced by allow_ip_end_pos_p(), jt_path_registry::cancel_invalid_paths(), tree_switch_conversion::switch_conversion::check_all_empty_except_final(), tree_switch_conversion::switch_conversion::check_final_bb(), tree_switch_conversion::switch_conversion::collect(), comparison_combine(), determine_iv_cost(), do_not_sink(), empty_bb_or_one_feeding_into_p(), empty_block_p(), find_doloop_use(), forwarder_block_to(), if_convertible_bb_p(), ifconvertable_edge(), predicate::init_from_control_deps(), one_feeding_comparison_into_p(), optimize_spaceship(), back_threader_profitability::profitable_path_p(), replace_phi_edge_with_variable(), slpeel_can_duplicate_loop_p(), spaceship_replacement(), split_loop(), suitable_cond_bb(), fwd_jt_path_registry::thread_through_loop_header(), unroll_jam_possible_p(), vect_analyze_loop_form(), and vect_update_ivs_after_vectorizer().
|
extern |
This function is called immediately after edge E is added to the edge vector E->dest->preds.
References cfg_hooks::execute_on_growing_pred, and execute_on_growing_pred().
Referenced by execute_on_growing_pred(), redirect_edge_succ(), and unchecked_make_edge().
|
extern |
This function is called immediately before edge E is removed from the edge vector E->dest->preds.
References cfg_hooks::execute_on_shrinking_pred, and execute_on_shrinking_pred().
Referenced by execute_on_shrinking_pred(), redirect_edge_succ(), and remove_edge_raw().
|
extern |
Conditional jumps are represented differently in trees and RTL, this hook takes a basic block that is known to have a cond jump at its end and extracts the taken and not taken edges out of it and store it in E1 and E2 respectively.
References b, cfg_hooks::extract_cond_bb_edges, extract_cond_bb_edges(), and gcc_assert.
Referenced by extract_cond_bb_edges().
|
extern |
Add fake edges to the function exit for any non constant and non noreturn calls, volatile inline assembly in the bitmap of blocks specified by BLOCKS or to the whole CFG if BLOCKS is zero. Return the number of blocks that were split. The goal is to expose cases in which entering a basic block does not imply that all subsequent instructions must be executed.
References current_ir_name(), cfg_hooks::flow_call_edges_add, flow_call_edges_add(), and internal_error().
Referenced by branch_prob(), and flow_call_edges_add().
|
extern |
Edge E is assumed to be fallthru edge. Emit needed jump instruction (and possibly create new basic block) to make edge non-fallthru. Return newly created BB or NULL if none.
References add_bb_to_loop(), CDI_DOMINATORS, current_ir_name(), current_loops, dom_info_available_p(), find_common_loop(), cfg_hooks::force_nonfallthru, force_nonfallthru(), loop::header, internal_error(), loop::latch, basic_block_def::loop_father, NULL, rescan_loop_exit(), set_immediate_dominator(), single_pred(), and single_succ().
Referenced by emit_to_new_bb_before(), fix_up_fall_thru_edges(), fixup_new_cold_bb(), fixup_reorder_chain(), force_nonfallthru(), merge_blocks_move(), reorder_basic_blocks_simple(), rtl_split_edge(), try_optimize_cfg(), and try_shrink_wrapping().
|
extern |
References get_cfg_hooks().
Referenced by get_cfg_hooks().
|
extern |
Initialization of functions specific to the tree IR.
References gimple_cfg_hooks, and gimple_register_cfg_hooks().
Referenced by cgraph_node::add_new_function(), cgraph_node::analyze(), build_gimple_cfg(), copy_cfg_body(), cgraph_node::expand(), gimple_register_cfg_hooks(), init_lowered_empty_function(), initialize_cfun(), input_function(), ipa_passes(), optimize_inline_calls(), and symbol_table::process_new_functions().
|
extern |
Conditions in trees and RTL are different so we need a different handling when we add the condition to the versioning code.
References gcc_assert, cfg_hooks::lv_add_condition_to_bb, and lv_add_condition_to_bb().
Referenced by lv_add_condition_to_bb(), and lv_adjust_loop_entry_edge().
|
extern |
Responsible for updating the ssa info (PHI nodes) on the new condition basic block that guards the versioned loop.
References cfg_hooks::lv_adjust_loop_header_phi, and lv_adjust_loop_header_phi().
Referenced by lv_adjust_loop_entry_edge(), and lv_adjust_loop_header_phi().
|
extern |
This is used inside loop versioning when we want to insert stmts/insns on the edges, which have a different behavior in tree's and in RTL, so we made a CFG hook.
References cfg_hooks::flush_pending_stmts, and lv_flush_pending_stmts().
Referenced by loop_version(), and lv_flush_pending_stmts().
|
extern |
Split BB into entry part and the rest (the rest is the newly created block). Redirect those edges for that REDIRECT_EDGE_P returns true to the entry part. Returns the edge connecting the entry part to the rest. DATA gets passed on to REDIRECT_EDGE_P.
References add_bb_to_loop(), CDI_DOMINATORS, basic_block_def::count, current_ir_name(), current_loops, dom_info_available_p(), ei_next(), ei_safe_edge(), ei_start, find_common_loop(), find_edge(), FOR_EACH_EDGE, loop::header, internal_error(), iterate_fix_dominators(), loop::latch, basic_block_def::loop_father, loop_outer(), cfg_hooks::make_forwarder_block, make_forwarder_block(), NULL, basic_block_def::preds, redirect_edge_and_branch_force(), remove_bb_from_loops(), split_block_after_labels(), and profile_count::zero().
Referenced by cleanup_tree_cfg_noloop(), create_preheader(), form_subloop(), make_forwarder_block(), merge_latch_edges(), and fwd_jt_path_registry::thread_through_loop_header().
|
extern |
Merges basic block B into basic block A.
References a, add_bb_to_loop(), b, CDI_DOMINATORS, CDI_POST_DOMINATORS, current_ir_name(), current_loops, delete_from_dominance_info(), dom_info_available_p(), EDGE_COUNT, EDGE_SUCC, expunge_block(), FOR_EACH_EDGE, internal_error(), mark_loop_for_removal(), profile_count::max_prefer_initialized(), cfg_hooks::merge_blocks, merge_blocks(), NULL, redirect_immediate_dominators(), remove_bb_from_loops(), remove_edge(), and rescan_loop_exit().
Referenced by cleanup_tree_cfg_bb(), combine_blocks(), find_cond_trap(), maybe_duplicate_computed_goto(), merge_block_into_combo(), merge_blocks(), merge_blocks_move(), merge_blocks_move_predecessor_nojumps(), merge_blocks_move_successor_nojumps(), merge_if_block(), noce_finish_if_conversion(), and try_optimize_cfg().
|
extern |
Moves block BB immediately after block AFTER. Returns false if the movement was impossible.
References current_ir_name(), internal_error(), cfg_hooks::move_block_after, and move_block_after().
Referenced by create_preheader(), duplicate_block(), gimple_merge_blocks(), loop_version(), move_block_after(), and move_block_to_fn().
|
extern |
References current_ir_name(), internal_error(), cfg_hooks::predict_edge, and predict_edge().
Referenced by predict_edge(), predict_edge_def(), predict_iv_comparison(), predict_loops(), and tree_predict_by_opcode().
|
extern |
References current_ir_name(), internal_error(), cfg_hooks::predict_edge, cfg_hooks::predicted_by_p, and predicted_by_p().
Referenced by predict_loops(), and predicted_by_p().
| void profile_record_account_profile | ( | profile_record * | record | ) |
Work-horse for passes.cc:acount_profile. Do book-keeping of the CFG for the profile accounting. Store the counting in RECORD.
References cfg_hooks::account_profile_record, cfun, FOR_ALL_BB_FN, gcc_assert, and profile_record_account_profile().
Referenced by account_profile(), and profile_record_account_profile().
| void profile_record_check_consistency | ( | profile_record * | record | ) |
Work-horse for passes.cc:check_profile_consistency. Do book-keeping of the CFG for the profile consistency checker. Store the counting in RECORD.
References cfun, basic_block_def::count, profile_count::differs_from_p(), profile_record::dyn_mismatched_count_in, profile_record::dyn_mismatched_prob_out, EDGE_COUNT, ENTRY_BLOCK_PTR_FOR_FN, EXIT_BLOCK_PTR_FOR_FN, FOR_ALL_BB_FN, FOR_EACH_EDGE, profile_count::initialized_p(), profile_count::ipa(), profile_record::num_mismatched_count_in, profile_record::num_mismatched_prob_out, basic_block_def::preds, PROFILE_ABSENT, profile_info, profile_record_check_consistency(), profile_status_for_fn, basic_block_def::succs, sreal::to_double(), profile_count::to_gcov_type(), profile_count::to_sreal_scale(), and profile_count::zero().
Referenced by check_profile_consistency(), and profile_record_check_consistency().
|
extern |
Redirect edge E to the given basic block DEST and update underlying program representation. Returns edge representing redirected branch (that may not be equivalent to E in the case of duplicate edges being removed) or NULL if edge is not easily redirectable for whatever reason.
References current_ir_name(), current_loops, internal_error(), NULL, cfg_hooks::redirect_edge_and_branch, redirect_edge_and_branch(), and rescan_loop_exit().
Referenced by combine_blocks(), create_parallel_loop(), back_jt_path_registry::duplicate_thread_path(), eliminate_tail_call(), expand_omp_for_static_chunk(), expand_omp_for_static_nochunk(), fixup_reorder_chain(), fuse_loops(), gimple_duplicate_seme_region(), gimple_duplicate_sese_tail(), gimple_split_edge(), isolate_path(), maybe_remove_forwarder_block(), move_edge_and_update(), redirect_edge_and_branch(), remove_branch(), replace_block_by(), replace_phi_edge_with_variable(), rtl_redirect_edge_and_branch_force(), rtl_split_edge(), slpeel_tree_duplicate_loop_to_edge_cfg(), split_function(), ssa_fix_duplicate_block_edges(), ssa_redirect_edges(), transform_to_exit_first_loop_alt(), and try_forward_edges().
|
extern |
Redirect the edge E to basic block DEST even if it requires creating of a new basic block; then it returns the newly created basic block. Aborts when redirection is impossible.
References add_bb_to_loop(), CDI_DOMINATORS, current_ir_name(), current_loops, dom_info_available_p(), find_common_loop(), find_edge(), internal_error(), NULL, cfg_hooks::redirect_edge_and_branch_force, redirect_edge_and_branch_force(), rescan_loop_exit(), set_immediate_dominator(), single_pred(), and single_succ().
Referenced by add_test(), bypass_block(), cfg_layout_split_edge(), copy_bbs(), doloop_modify(), duplicate_block(), duplicate_loop_body_to_header_edge(), back_jt_path_registry::duplicate_thread_path(), find_if_case_1(), force_one_exit_fallthru(), loop_redirect_edge(), make_forwarder_block(), make_forwarders_with_degenerate_phis(), noce_finish_if_conversion(), redirect_edge_and_branch_force(), slpeel_tree_duplicate_loop_to_edge_cfg(), try_crossjump_to_edge(), try_forward_edges(), and try_shrink_wrapping().
|
extern |
Like redirect_edge_succ but avoid possible duplicate edge.
References find_edge(), redirect_edge_succ(), redirect_edge_succ_nodup(), redirect_edge_var_map_dup(), and remove_edge().
Referenced by cfg_layout_redirect_edge_and_branch(), create_empty_loop_on_edge(), force_nonfallthru_and_redirect(), maybe_remove_forwarder_block(), redirect_branch_edge(), redirect_edge_succ_nodup(), ssa_redirect_edge(), try_optimize_cfg(), and try_simplify_condjump().
|
extern |
Removes E, by redirecting it to the destination of the other edge going from its source. Can_remove_branch_p must be true for E, hence this operation cannot fail.
References EDGE_COUNT, EDGE_SUCC, gcc_assert, NULL, redirect_edge_and_branch(), and remove_branch().
Referenced by fuse_loops(), remove_branch(), and remove_path().
|
extern |
Removes edge E from cfg. Unlike remove_branch, it does not update IL.
References current_ir_type(), current_loops, IR_GIMPLE, LOOPS_HAVE_MARKED_IRREDUCIBLE_REGIONS, LOOPS_NEED_FIXUP, loops_state_satisfies_p(), loops_state_set(), NULL, redirect_edge_var_map_clear(), remove_edge(), remove_edge_raw(), and rescan_loop_exit().
Referenced by clean_up_after_unswitching(), simplify_using_ranges::cleanup_edges_and_switches(), cleanup_empty_eh(), combine_blocks(), convert_if_conditions_to_switch(), copy_bbs(), dead_or_predicable(), delete_basic_block(), edge_before_returns_twice_call(), eliminate_unnecessary_stmts(), expand_call_inline(), expand_omp_for_generic(), expand_omp_for_init_counts(), expand_omp_for_init_vars(), expand_omp_for_ordered_loops(), expand_omp_for_static_chunk(), expand_omp_for_static_nochunk(), expand_omp_simd(), expand_omp_target(), expand_omp_taskloop_for_inner(), expand_omp_taskloop_for_outer(), expand_omp_taskreg(), expand_parallel_call(), expand_remove_edge(), expand_thunk(), find_bb_boundaries(), find_cond_trap(), tree_switch_conversion::switch_conversion::gen_inbound_check(), gimple_divmod_fixed_value(), gimple_ic(), gimple_mod_pow2(), gimple_stringop_fixed_value(), isolate_path(), local_cprop_pass(), lower_eh_dispatch(), lower_resx(), merge_blocks(), move_sese_region_to_fn(), noce_finish_if_conversion(), one_cprop_pass(), tree_switch_conversion::switch_conversion::prune_bbs(), purge_dead_edges(), purge_dead_tablejump_edges(), redirect_edge_succ_nodup(), remove_ctrl_stmt_and_useless_edges(), remove_edge(), remove_edge_and_dominated_blocks(), remove_fake_predecessors(), remove_phi_nodes_and_edges_for_unreachable_block(), split_function(), try_combine(), try_redirect_by_replacing_jump(), unloop(), and unsplit_eh().
|
extern |
Initialization of functions specific to the rtl IR.
References rtl_cfg_hooks, and rtl_register_cfg_hooks().
Referenced by cfg_layout_finalize(), function_reader::create_function(), rtl_register_cfg_hooks(), and skip_pass().
|
extern |
References set_cfg_hooks().
Referenced by set_cfg_hooks().
|
extern |
References i, split_block(), and split_block_1().
Referenced by branch_fixup(), rt_bb_visited::check(), copy_edges_for_bb(), create_call_for_reduction_1(), create_cond_insert_point(), decompose_multiword_subregs(), tree_switch_conversion::switch_decision_tree::do_jump_if_equal(), tree_switch_conversion::jump_table_cluster::emit(), tree_switch_conversion::switch_decision_tree::emit_cmp_and_jump_insns(), tree_switch_conversion::switch_conversion::exp_index_transform(), expand_call_inline(), expand_complex_div_wide(), expand_oacc_for(), expand_omp_for_generic(), expand_omp_for_init_counts(), expand_omp_for_init_vars(), expand_omp_for_ordered_loops(), expand_omp_for_static_chunk(), expand_omp_for_static_nochunk(), expand_omp_ordered_sink(), expand_omp_simd(), expand_omp_target(), expand_omp_taskloop_for_outer(), expand_omp_taskreg(), find_bb_boundaries(), find_explicit_erroneous_behavior(), fixup_noreturn_call(), tree_switch_conversion::switch_conversion::gen_inbound_check(), gimple_divmod_fixed_value(), gimple_find_sub_bbs(), gimple_flow_call_edges_add(), gimple_ic(), gimple_lower_bitint(), gimple_mod_pow2(), gimple_mod_subtract(), gimple_split_block_before_cond_jump(), gimple_stringop_fixed_value(), gsi_insert_finally_seq_after_call(), tree_switch_conversion::bit_test_cluster::hoist_edge_and_branch_if_true(), hoist_guard(), insert_cond_bb(), insert_trap(), local_cprop_pass(), oacc_entry_exit_single_gang(), omp_sese_split_blocks(), one_cprop_pass(), optimize_mask_stores(), peep2_attempt(), remove_exits_and_undefined_stmts(), rtl_flow_call_edges_add(), rtl_split_block_before_cond_jump(), shrink_wrap_one_built_in_call_with_conds(), simd_clone_adjust(), split_bb_make_tm_edge(), split_block(), split_block(), split_function(), try_combine(), try_crossjump_to_edge(), tree_switch_conversion::switch_decision_tree::try_switch_expansion(), ubsan_expand_null_ifn(), ubsan_expand_ptr_ifn(), vect_loop_versioning(), worker_single_copy(), and worker_single_simple().
|
extern |
References i, split_block(), and split_block_1().
|
extern |
Splits block BB just after labels. The newly created edge is returned.
References NULL, split_block_1(), and split_block_after_labels().
Referenced by branch_prob(), create_eh_forwarder_block(), create_empty_loop_on_edge(), edge_before_returns_twice_call(), execute_sm_if_changed(), expand_omp_ordered_sink(), expand_omp_target(), expand_parallel_call(), fixup_fallthru_exit_predecessor(), rt_bb_visited::insert_exit_check_on_edge(), ipa_tm_insert_irr_call(), make_forwarder_block(), oacc_entry_exit_single_gang(), simd_clone_adjust(), split_block_after_labels(), transform_to_exit_first_loop(), and tree_switch_conversion::switch_decision_tree::try_switch_expansion().
|
extern |
Split a basic block if it ends with a conditional branch and if the other part of the block is not empty.
References gcc_assert, cfg_hooks::split_block_before_cond_jump, and split_block_before_cond_jump().
Referenced by split_block_before_cond_jump(), and transform_to_exit_first_loop_alt().
|
extern |
Splits edge E and returns the newly created basic block.
References add_bb_to_loop(), profile_probability::always(), CDI_DOMINATORS, basic_block_def::count, current_ir_name(), current_loops, dom_info_available_p(), dom_info_state(), DOM_NO_FAST_QUERY, dominated_by_p(), find_common_loop(), basic_block_def::flags, FOR_EACH_EDGE, get_immediate_dominator(), loop::header, internal_error(), loop::latch, basic_block_def::loop_father, NULL, rescan_loop_exit(), set_immediate_dominator(), single_pred(), single_pred_edge(), single_succ(), single_succ_edge(), cfg_hooks::split_edge, and split_edge().
Referenced by analyze_insns_in_loop(), branch_prob(), build_and_add_sum(), commit_one_edge_insertion(), connect_loops(), convert_if_conditions_to_switch(), create_bb_after_loop(), create_empty_if_region_on_edge(), create_empty_loop_on_edge(), create_parallel_loop(), create_preheader(), disambiguate_multiple_latches(), do_split_loop_on_cond(), doloop_modify(), tree_switch_conversion::switch_decision_tree::emit_case_nodes(), execute_sm_if_changed(), expand_complex_libcall(), expand_omp_for_generic(), expand_omp_for_static_chunk(), expand_omp_for_static_nochunk(), expand_omp_simd(), expand_phi_nodes(), find_implicit_sets(), fixup_reorder_chain(), force_one_exit_fallthru(), force_single_succ_latches(), gimple_duplicate_sese_tail(), gimple_find_edge_insert_loc(), gimple_gen_ic_func_profiler(), gimple_gen_time_profiler(), gimple_ic(), ifcvt_split_critical_edges(), insert_edge_check_and_trap(), insert_prologue_epilogue_for_components(), loop_version(), lv_adjust_loop_entry_edge(), make_forwarders_with_degenerate_phis(), maybe_remove_forwarder_block(), move_insn_for_shrink_wrap(), move_invariant_reg(), move_sese_in_condition(), remove_path(), separate_decls_in_region(), shrink_wrap_one_built_in_call_with_conds(), sjlj_emit_function_enter(), slpeel_add_loop_guard(), slpeel_tree_duplicate_loop_to_edge_cfg(), split_critical_edges(), split_edge(), split_edge_and_insert(), split_loop_exit_edge(), fwd_jt_path_registry::thread_through_loop_header(), transform_to_exit_first_loop_alt(), tree_function_versioning(), tree_optimize_tail_calls_1(), tree_transform_and_unroll_loop(), try_shrink_wrapping(), tree_switch_conversion::switch_decision_tree::try_switch_expansion(), unroll_loop_runtime_iterations(), vect_do_peeling(), vect_loop_versioning(), vect_transform_loop(), worker_single_copy(), and worker_single_simple().
|
extern |
Try to make the edge fallthru.
References cfg_hooks::tidy_fallthru_edge, and tidy_fallthru_edge().
Referenced by merge_if_block(), tidy_fallthru_edge(), tidy_fallthru_edges(), and try_simplify_condjump().
|
extern |
Fix up edges that now fall through, or rather should now fall through but previously required a jump around now deleted blocks. Simplify the search by only examining blocks numerically adjacent, since this is how they were created. ??? This routine is currently RTL specific.
References b, BB_END, cfun, CROSSING_JUMP_P, EDGE_COMPLEX, ENTRY_BLOCK_PTR_FOR_FN, EXIT_BLOCK_PTR_FOR_FN, FOR_BB_BETWEEN, JUMP_P, single_succ_edge(), single_succ_p(), cfg_hooks::tidy_fallthru_edge, tidy_fallthru_edge(), and tidy_fallthru_edges().
Referenced by delete_unreachable_blocks(), post_order_compute(), and tidy_fallthru_edges().
|
extern |
Verify the CFG consistency. Currently it does following: checks edge and basic block list correctness and calls into IL dependent checking then.
References BASIC_BLOCK_FOR_FN, cfun, basic_block_def::count, current_loops, dump_edge_info(), ENTRY_BLOCK_PTR_FOR_FN, error(), EXIT_BLOCK_PTR_FOR_FN, basic_block_def::flags, FOR_BB_BETWEEN, FOR_EACH_BB_REVERSE_FN, FOR_EACH_EDGE, fputc(), free(), basic_block_def::index, edge_iterator::index, profile_count::initialized_p(), internal_error(), last_basic_block_for_fn, basic_block_def::loop_father, NULL, basic_block_def::preds, basic_block_def::prev_bb, PROFILE_GUESSED, profile_status_for_fn, basic_block_def::succs, TDF_DETAILS, timevar_pop(), timevar_push(), profile_count::verify(), cfg_hooks::verify_flow_info, and verify_flow_info().
Referenced by checking_verify_flow_info(), execute_function_todo(), rtl_flow_call_edges_add(), and verify_flow_info().
|
extern |
Implementation of CFG manipulation for cfg layout RTL, where basic block connected via fallthru edges does not have to be adjacent. This representation will hopefully become the default one in future version of the compiler.
Referenced by cfg_layout_rtl_register_cfg_hooks().
|
extern |
Hooks containers.
Referenced by gimple_register_cfg_hooks().
|
extern |
Implementation of CFG manipulation for linearized RTL.
Referenced by rtl_register_cfg_hooks().