GCC Middle and Back End API Reference
|
#include <basic-block.h>
Data Structures | |
union | basic_block_il_dependent |
Data Fields | |
vec< edge, va_gc > * | preds |
vec< edge, va_gc > * | succs |
PTR | aux |
struct loop * | loop_father |
struct et_node * | dom [2] |
basic_block | prev_bb |
basic_block | next_bb |
union basic_block_def::basic_block_il_dependent | il |
int | flags |
int | index |
gcov_type | count |
int | frequency |
int | discriminator |
A basic block is a sequence of instructions with only one entry and only one exit. If any one of the instructions are executed, they will all be executed, and in sequence from first to last.
There may be COND_EXEC instructions in the basic block. The COND_EXEC instructions will be executed – but if the condition is false the conditionally executed expressions will of course not be executed. We don't consider the conditionally executed expression (which might have side-effects) to be in a separate basic block because the program counter will always be at the same location after the COND_EXEC instruction, regardless of whether the condition is true or not.
Basic blocks need not start with a label nor end with a jump insn. For example, a previous basic block may just "conditionally fall" into the succeeding basic block, and the last basic block need not end with a jump insn. Block 0 is a descendant of the entry block.
A basic block beginning with two labels cannot have notes between the labels.
Data for jump tables are stored in jump_insns that occur in no basic block even though these insns can follow or precede insns in basic blocks. Basic block information indexed by block number.
PTR basic_block_def::aux |
Auxiliary info specific to a pass.
Referenced by alloc_aux_for_block(), bb_has_predicate(), bb_predicate(), bb_predicate_gimplified_stmts(), strlen_dom_walker::before_dom_children(), compute_available(), compute_nearerout(), find_comparison_dom_walker::find_comparison_dom_walker(), find_foldable_builtin_expect(), find_traces_1_round(), independent_of_stmt_p(), initialize_cfun(), insert_var_expansion_initialization(), label_for_bb(), reorder_basic_blocks(), set_bb_predicate(), and unsplit_all_eh().
gcov_type basic_block_def::count |
Expected number of executions: calculated in profile.c.
Referenced by build_cgraph_edges(), can_duplicate_block_p(), can_predict_insn_p(), check_bb_profile(), copy_phi_args(), copy_static_chain(), correct_negative_edge_counts(), expand_transaction(), find_clusters_1(), find_max_flow(), maybe_hot_count_p(), scale_loop_profile(), split_function(), and stmt_starts_bb_p().
int basic_block_def::discriminator |
The discriminator for this block. The discriminator distinguishes among several basic blocks that share a common locus, allowing for more accurate sample-based profiling.
Referenced by next_discriminator_for_locus().
struct et_node* basic_block_def::dom[2] |
The dominance and postdominance information node.
Referenced by free_dominance_info(), get_dominated_by_region(), and get_dominated_to_depth().
int basic_block_def::flags |
Various flags. See cfg-flags.def.
Referenced by df_get_bb_info(), find_unreachable_blocks(), finish_copies(), finish_copy(), get_immediate_dominator(), lv_flush_pending_stmts(), redirect_edge_succ(), replace_locals_op(), and replace_pseudos_in().
int basic_block_def::frequency |
Expected frequency. Normalized to be in range 0 to BB_FREQ_MAX.
Referenced by can_duplicate_block_p(), check_bb_profile(), expand_transaction(), find_clusters_1(), find_traces_1_round(), maybe_hot_count_p(), scale_loop_profile(), split_function(), and stmt_starts_bb_p().
union basic_block_def::basic_block_il_dependent basic_block_def::il |
int basic_block_def::index |
The index of this block.
Referenced by add_exit_phis(), add_label_notes(), associate_equivalences_with_edges(), bb_seen_p(), better_edge_p(), cfg_blocks_empty_p(), check_forbidden_calls(), compact_blocks(), compute_available(), compute_code_hoist_vbeinout(), compute_dominance_frontiers_1(), compute_partial_antic_aux(), cond_exec_find_if_block(), cond_move_process_if_block(), connect_traces(), copy_bb(), copy_original_table_clear(), correct_negative_edge_counts(), coverage_compute_profile_id(), cprop_into_successor_phis(), create_fixup_graph(), create_rdg_edges_for_scalar(), del_scev_info(), df_chain_create_bb_process_use(), df_chain_remove_problem(), df_get_bb_info(), df_grow_bb_info(), df_live_bb_local_compute(), df_live_confluence_n(), df_live_finalize(), df_live_free(), df_live_transfer_function(), df_live_verify_solution_end(), df_live_verify_solution_start(), df_lr_finalize(), df_lr_free(), df_lr_transfer_function(), df_mark_solutions_dirty(), df_set_bb_dirty(), df_set_regs_ever_live(), df_word_lr_bb_local_compute(), dfs_enumerate_from(), dfs_find_deadend(), disqualify_ops_if_throwing_stmt(), draw_cfg_node_succ_edges(), dse_optimize_stmt(), dse_step3(), dump_live_info(), dump_split_point(), dump_tm_memopt_sets(), dump_var_map(), emit_partition_copy(), fill_sons_in_loop(), find_group(), find_implicit_sets(), find_insn_before_first_wild_read(), find_max_flow(), find_partition_fixes(), find_refs_for_sm(), find_same_succ(), find_traces_1_round(), fixup_noreturn_call(), fixup_partitions(), flow_loops_cfg_dump(), free_code_hoist_mem(), free_cprop_mem(), free_original_copy_tables(), gate_ud_dce(), get_common_info(), get_rank(), initialize_flags_in_bb(), insert_rtx_to_part_on_edge(), insert_store(), instantiate_scev_1(), instrument_edges(), invalidate_memory(), ipa_tm_create_version(), ipa_tm_scan_calls_transaction(), ipa_uninstrument_transaction(), link_roots(), loe_visit_block(), loop_exit_at_end_p(), make_edges(), mark_def_interesting(), mark_last_stmt_necessary(), maybe_instrument_assignment(), merge_blocks_move_predecessor_nojumps(), merge_blocks_move_successor_nojumps(), new_btr_user(), optimize_stmt(), outgoing_edges_match(), output_eh_regions(), partition_is_global(), post_order_compute(), pre_and_rev_post_order_compute(), predict_paths_for_bb(), prescan_insns_for_dce(), print_edge_list(), print_hard_reg_set(), print_loop(), print_rtl_with_bb(), print_worklist(), process_insert_insn(), prune_expressions(), read_profile_edge_counts(), record_insns(), remap_decl_1(), rewrite_use_compare(), rtl_verify_bb_pointers(), rtl_verify_edges(), same_phi_alternatives_1(), scan_one_insn(), scan_stores_nospill(), set_var_live_on_entry(), setup_loop_tree_level(), single_def_use_dom_walker::single_def_use_dom_walker(), split_function(), strlen_optimize_stmt(), thread_prologue_and_epilogue_insns(), thread_through_normal_block(), tm_memopt_accumulate_memops(), unchecked_make_edge(), union_groups(), va_list_ptr_read(), valid_in_sets(), value_replacement(), verify_edge_list(), verify_expr_location_1(), verify_ssa(), and vop_phi().
struct loop* basic_block_def::loop_father |
Innermost loop containing the block.
Referenced by can_copy_bbs_p(), compute_always_reached(), copy_loops(), create_expression_by_pieces(), disambiguate_multiple_latches(), dump_recorded_exits(), expand_transaction(), find_implicit_sets(), fix_bb_placement(), fix_loop_placement(), flow_loop_nodes_find(), get_iv(), get_loops_exits(), gimple_redirect_edge_and_branch_force(), initialize_cfun(), merge_blocks_move_successor_nojumps(), move_stmt_r(), new_loop_vec_info(), outermost_invariant_loop(), predict_edge(), predicted_by_p(), record_mem_ref_loc(), scev_reset(), sese_record_loop(), and setup_loop_tree_level().
basic_block basic_block_def::next_bb |
Referenced by alloc_block(), contains_no_active_insn_p(), link_block(), output_eh_regions(), reorder_basic_blocks(), and replace_locals_op().
The edges into and out of the block.
Referenced by add_phi_node_to_bb(), attempt_coalesce(), bb_dom_dfs_in(), check_bb_profile(), clear_edges(), compute_hash_table(), cond_exec_find_if_block(), correct_negative_edge_counts(), count_reg_usage(), dfs_enumerate_from(), dfs_find_deadend(), dominated_by_forbidden(), dump_split_point(), estimated_unrolled_size(), expected_loop_iterations_unbounded(), find_clusters_1(), find_edge(), find_implicit_sets(), find_same_succ(), find_traces_1_round(), finish_copies(), flow_loop_nodes_find(), free_expr_hash_elt_contents(), get_uncond_jump_length(), ssa_names_hasher::hash(), tm_memop_hasher::hash(), if_convertible_loop_p(), independent_of_stmt_p(), input_phi(), insert_insn_start_basic_block(), link_roots(), lower_eh_constructs(), lower_emutls_phi_arg(), mark_regno_dead(), move_stmt_r(), pre_and_rev_post_order_compute(), remove_forwarder_block(), reorder_basic_blocks(), replace_pseudos_in(), same_phi_alternatives_1(), sanitize_hot_paths(), thread_prologue_and_epilogue_insns(), thread_single_edge(), vect_create_cond_for_alias_checks(), verify_dominators(), and control_dependences::~control_dependences().
basic_block basic_block_def::prev_bb |
Previous and next blocks in the chain.
Referenced by alloc_block(), link_block(), merge_blocks_move_successor_nojumps(), rtl_redirect_edge_and_branch_force(), and simple_goto_p().
Referenced by alloc_aux_for_edge(), can_remove_branch_p(), cfg_layout_initialize(), clear_edges(), compute_available(), compute_dominance_frontiers_1(), conditional_probability(), connect_dest(), contains_no_active_insn_p(), correct_negative_edge_counts(), count_reg_usage(), coverage_compute_profile_id(), debug_var_infos_r(), dump_function_to_file(), duplicate_loop(), estimated_unrolled_size(), expand_switch_as_decision_tree_p(), fill_sons_in_loop(), find_active_insn_after(), find_clusters_1(), find_max_flow(), find_traces_1_round(), find_working_set(), flow_loops_cfg_dump(), free_aux_for_blocks(), gate_ud_dce(), get_last_bb_insn(), get_tm_region_blocks(), get_uncond_jump_length(), gimple_make_forwarder_block(), gimple_merge_blocks(), if_convertible_loop_p(), inner_loop_header_p(), insert_store(), ipa_tm_create_version(), ipa_tm_scan_calls_transaction(), ipa_uninstrument_transaction(), link_roots(), make_edges(), move_stmt_r(), one_pre_gcse_pass(), output_eh_regions(), output_location(), print_edge_list(), print_loop(), record_const_or_copy(), remove_conditions_and_labels(), remove_fake_predecessors(), set_bb_counts(), set_var_live_on_entry(), simulate_stmt(), tm_memopt_accumulate_memops(), update_bb_profile_for_threading(), update_forwarder_flag(), and verify_edge_list().