GCC Middle and Back End API Reference
|
Data Structures | |
struct | cfg_stats_d |
struct | locus_discrim_map |
struct | locus_discrim_hasher |
struct | label_record |
struct | move_stmt_d |
Variables | |
static const int | initial_cfg_capacity = 20 |
static struct pointer_map_t * | edge_to_cases |
static bitmap | touched_switch_bbs |
static struct cfg_stats_d | cfg_stats |
static bool | found_computed_goto |
static hash_table < locus_discrim_hasher > | discriminator_per_locus |
static struct label_record * | label_for_bb |
static bool | eh_error_found |
struct cfg_hooks | gimple_cfg_hooks |
void add_phi_args_after_copy | ( | basic_block * | region_copy, |
unsigned | n_region, | ||
edge | e_copy | ||
) |
Blocks in REGION_COPY array of length N_REGION were created by duplication of basic blocks. Add phi node arguments for edges going from these blocks. If E_COPY is not NULL, also add phi node arguments for its destination.
References add_phi_args_after_copy_bb(), and add_phi_args_after_copy_edge().
Referenced by gimple_duplicate_sese_region(), gimple_duplicate_sese_tail(), ipa_uninstrument_transaction(), slpeel_tree_duplicate_loop_to_edge_cfg(), and tail_duplicate().
void add_phi_args_after_copy_bb | ( | ) |
Basic block BB_COPY was created by code duplication. Add phi node arguments for edges going out of BB_COPY. The blocks that were duplicated have BB_DUPLICATED set.
References add_phi_args_after_copy_edge(), and basic_block_def::succs.
Referenced by add_phi_args_after_copy(), and copy_phi_node_args().
|
static |
Adds phi node arguments for edge E_COPY after basic block duplication.
References add_phi_arg(), bb_copy, edge_def::dest, find_edge(), basic_block_def::flags, get_bb_original(), gimple_phi_arg_location_from_edge(), gimple_seq_empty_p(), gsi_end_p(), gsi_next(), gsi_start_phis(), gsi_stmt(), phi_nodes(), edge_def::src, and basic_block_def::succs.
Referenced by add_phi_args_after_copy(), and add_phi_args_after_copy_bb().
|
static |
Assign discriminators to each basic block.
References edge_def::dest, basic_block_def::discriminator, first, first_non_label_stmt(), gimple_location(), last, last_stmt(), locus_discrim_map::locus, next_discriminator_for_locus(), same_line_p(), and basic_block_def::succs.
Referenced by build_gimple_cfg().
|
static |
Checks if BB is part of the region defined by N_REGION BBS.
Referenced by gimple_duplicate_sese_tail().
|
static |
Entry point to the CFG builder for trees. SEQ is the sequence of statements to be added to the flowgraph.
References assign_discriminators(), cfg_stats, cleanup_dead_labels(), hash_table< Descriptor, Allocator >::create(), create_empty_bb(), hash_table< Descriptor, Allocator >::dispose(), factor_computed_gotos(), found_computed_goto, gimple_register_cfg_hooks(), group_case_labels(), init_empty_tree_cfg(), make_blocks(), make_edges(), memset(), and vec_safe_grow_cleared().
Referenced by execute_build_cfg().
|
static |
Return true if T, a GIMPLE_CALL, can make an abnormal transfer of control flow. Transfers of control flow associated with EH are excluded.
References function::calls_setjmp, cfun, gimple_call_flags(), gimple_has_side_effects(), and function::has_nonlocal_label.
Referenced by is_ctrl_altering_stmt(), and stmt_can_make_abnormal_goto().
void cleanup_dead_labels | ( | void | ) |
Cleanup redundant labels. This is a three-step process: 1) Find the leading label for each block. 2) Redirect all references to labels to the leading labels. 3) Cleanup all useless labels.
References cleanup_dead_labels_eh(), computed_goto_p(), free(), gimple_asm_label_op(), gimple_asm_nlabels(), gimple_cond_false_label(), gimple_cond_set_false_label(), gimple_cond_set_true_label(), gimple_cond_true_label(), gimple_goto_dest(), gimple_goto_set_dest(), gimple_label_label(), gimple_switch_label(), gimple_switch_num_labels(), gimple_transaction_label(), gimple_transaction_set_label(), gsi_end_p(), gsi_next(), gsi_remove(), gsi_start_bb(), gsi_stmt(), basic_block_def::index, label_record::label, label_for_bb, last_stmt(), main_block_label(), and label_record::used.
Referenced by build_gimple_cfg(), and execute_cleanup_cfg_post_optimizing().
|
static |
Clean up redundant labels within the exception tree.
References eh_region_d::eh_region_u::allowed, cfun, function::eh, eh_region_d::eh_region_u::eh_try, ERT_ALLOWED_EXCEPTIONS, ERT_CLEANUP, ERT_MUST_NOT_THROW, ERT_TRY, eh_region_d::eh_region_u::eh_region_u_try::first_catch, eh_landing_pad_d::index, eh_catch_d::label, eh_region_d::eh_region_u::eh_region_u_allowed::label, eh_status::lp_array, main_block_label(), eh_catch_d::next_catch, eh_landing_pad_d::post_landing_pad, eh_region_d::type, eh_region_d::u, and vec_safe_iterate().
Referenced by cleanup_dead_labels().
void clear_special_calls | ( | void | ) |
Clear flags set by notice_special_calls. Used by dead code removal to update the flags.
References function::calls_alloca, function::calls_setjmp, and cfun.
Referenced by eliminate_unnecessary_stmts().
|
static |
Insert all subblocks of BLOCK into BLOCKS and recurse.
References pointer_set_insert().
Referenced by verify_gimple_in_cfg().
|
static |
Return true if T is a computed goto.
References gimple_goto_dest().
Referenced by cleanup_dead_labels(), factor_computed_gotos(), find_taken_edge(), make_blocks(), and stmt_can_make_abnormal_goto().
|
static |
Create and return a new empty basic block after bb AFTER.
References alloc_block(), basic_block_def::flags, basic_block_def::index, link_block(), set_bb_seq(), and vec_safe_grow_cleared().
DEBUG_FUNCTION void debug | ( | ) |
Dump a loop.
References print_loop().
DEBUG_FUNCTION void debug_cfg_stats | ( | void | ) |
Dump CFG statistics on stderr. Keep extern so that it's always linked in the final executable.
References dump_cfg_stats().
DEBUG_FUNCTION void debug_function | ( | ) |
Dump FUNCTION_DECL FN to stderr using FLAGS (see TDF_* in tree.h)
References dump_function_to_file().
DEBUG_FUNCTION void debug_loop | ( | ) |
Print on stderr the code of LOOP, at some VERBOSITY level.
References print_loop().
Referenced by debug_loop_num().
DEBUG_FUNCTION void debug_loop_num | ( | ) |
Print on stderr the code of loop number NUM, at some VERBOSITY level.
References cfun, debug_loop(), and get_loop().
DEBUG_FUNCTION void debug_loops | ( | ) |
Debugging loops structure at tree level, at some VERBOSITY level.
References print_loops().
DEBUG_FUNCTION void debug_verbose | ( | ) |
Dump a loop verbosely.
References print_loop().
void delete_tree_cfg_annotations | ( | void | ) |
Remove block annotations and other data structures.
References vec_free().
Referenced by gimple_expand_cfg(), and release_function_body().
|
static |
Walk a gimplified function and warn for functions whose return value is ignored and attribute((warn_unused_result)) is set. This is done before inlining, so we don't have to worry about that.
References g, gimple_bind_body(), gimple_call_fndecl(), gimple_call_fntype(), gimple_call_internal_p(), gimple_call_lhs(), gimple_catch_handler(), gimple_eh_filter_failure(), gimple_location(), gimple_try_cleanup(), gimple_try_eval(), gsi_end_p(), gsi_next(), gsi_stmt(), lookup_attribute(), and warning_at().
Referenced by run_warn_unused_result().
void dump_cfg_stats | ( | ) |
Dump CFG statistics on FILE.
References cfg_stats, current_function_name(), cfg_stats_d::num_merged_labels, and basic_block_def::succs.
Referenced by debug_cfg_stats(), and gimple_dump_cfg().
void dump_function_to_file | ( | ) |
Dump FUNCTION_DECL FN to file FILE using FLAGS (see TDF_* in dumpfile.h)
References function::cfg, cfun, function::curr_properties, current_function_decl, function::decl, decl_is_tm_clone(), dump_bb(), dump_eh_tree(), dump_enumerated_decls(), dump_flags, dump_node(), function_name(), gimple_body(), gimple_has_body_p(), gimple_in_ssa_p(), gimple_seq_first_stmt(), gimple_seq_last_stmt(), indent, function::local_decls, print_generic_decl(), print_generic_expr(), print_generic_stmt_indented(), print_gimple_seq(), print_node(), and vec_safe_is_empty().
Referenced by cgraph_materialize_clone(), debug_body(), debug_function(), dump_function(), execute_function_dump(), finalize_nesting_tree_1(), gimple_dump_cfg(), graphite_initialize(), insert_range_assertions(), split_function(), and tail_merge_optimize().
|
static |
Called for each element in the hash table (P) as we delete the edge to cases hash table. Clear all the TREE_CHAINs to prevent problems with copying of SWITCH_EXPRs and structure sharing rules, then free the hash table element.
Referenced by end_recording_case_labels().
void end_recording_case_labels | ( | void | ) |
Stop recording information mapping edges to case labels and remove any information we have recorded.
References edge_to_cases_cleanup(), group_case_labels_stmt(), last_stmt(), pointer_map_destroy(), and pointer_map_traverse().
Referenced by cleanup_tree_cfg_1(), and split_critical_edges().
|
static |
|
static |
Emit noreturn warnings.
References current_function_decl, and warn_function_noreturn().
|
static |
Emit return warnings.
References cfun, function::decl, function::function_end_locus, gimple_call_builtin_p(), gimple_location(), gimple_no_warning_p(), gimple_return_retval(), last, last_stmt(), edge_def::src, targetm, and warning_at().
void extract_true_false_edges_from_block | ( | basic_block | b, |
edge * | true_edge, | ||
edge * | false_edge | ||
) |
Given a basic block B which ends with a conditional and has precisely two successors, determine which of the edges is taken if the conditional is true and which is taken if the conditional is false. Set TRUE_EDGE and FALSE_EDGE appropriately.
References edge_def::flags.
Referenced by abs_replacement(), associate_equivalences_with_edges(), canonicalize_loop_ivs(), check_forbidden_calls(), conditional_replacement(), create_parallel_loop(), dom_opt_leave_block(), dump_implicit_edges(), expand_gimple_cond(), extract_true_false_args_from_phi(), find_taken_edge_cond_expr(), gimple_verify_flow_info(), minmax_replacement(), predicate_bbs(), record_edge_info(), tree_unswitch_loop(), and value_replacement().
|
static |
Search the CFG for any computed gotos. If found, factor them to a common computed goto site. Also record the location of that site so that we can un-factor the gotos after we have converted back to normal form.
References computed_goto_p(), create_artificial_label(), create_empty_bb(), create_tmp_var(), gimple_build_goto(), gimple_build_label(), gimple_goto_dest(), gimple_goto_set_dest(), gsi_end_p(), gsi_insert_after(), gsi_insert_before(), gsi_last_bb(), GSI_NEW_STMT, GSI_SAME_STMT, gsi_start_bb(), gsi_stmt(), and last.
Referenced by build_gimple_cfg().
Referenced by find_taken_edge_switch_expr().
|
static |
Return the CASE_LABEL_EXPR that SWITCH_STMT will take for VAL. We can make optimal use here of the fact that the case labels are sorted: We can do a binary search for a case matching VAL.
References gimple_switch_default_label(), gimple_switch_label(), gimple_switch_num_labels(), and tree_int_cst_compare().
|
static |
Examine the statements in BB (which is in SRC_CFUN); find and return the outermost EH region. Use REGION as the incoming base EH region.
References eh_region_outermost(), get_eh_region_from_lp_number_fn(), gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_stmt(), lookup_stmt_eh_lp_fn(), and si.
Referenced by move_sese_region_to_fn().
edge find_taken_edge | ( | ) |
Given a basic block BB ending with COND_EXPR or SWITCH_EXPR, and a predicate VAL, return the edge that will be taken out of the block. If VAL does not match a unique edge, NULL is returned.
References computed_goto_p(), find_taken_edge_computed_goto(), find_taken_edge_cond_expr(), find_taken_edge_switch_expr(), is_ctrl_stmt(), is_gimple_min_invariant(), and last_stmt().
Referenced by cleanup_control_expr_graph(), copy_prop_visit_cond_stmt(), optimize_stmt(), propagate_rhs_into_lhs(), thread_across_edge(), thread_around_empty_block(), visit_cond_stmt(), and vrp_visit_cond_stmt().
|
static |
Referenced by find_taken_edge().
|
static |
Given a constant value VAL and the entry block BB to a GOTO_EXPR statement, determine which of the outgoing edges will be taken out of the block. Return NULL if either edge may be taken.
References find_edge().
|
static |
Referenced by find_taken_edge().
|
static |
Given a constant value VAL and the entry block BB to a COND_EXPR statement, determine which of the two edges will be taken out of the block. Return NULL if either edge may be taken.
References extract_true_false_edges_from_block(), and integer_zerop().
|
static |
Referenced by find_taken_edge().
|
static |
Given an INTEGER_CST VAL and the entry block BB to a SWITCH_EXPR statement, determine which edge will be taken out of the block. Return NULL if any edge may be taken.
References find_case_label_for_value(), find_edge(), and last_stmt().
|
static |
Referenced by assign_discriminators().
|
static |
Return the first non-label statement in basic block BB.
References gsi_end_p(), gsi_next(), gsi_start_bb(), and gsi_stmt().
gimple first_stmt | ( | ) |
Return the first statement in basic block BB.
References gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_stmt(), and is_gimple_debug().
Referenced by build_and_add_sum(), dump_gimple_bb_header(), expand_omp_atomic(), make_cond_expr_edges(), pp_cfg_jump(), remove_forwarder_block(), remove_forwarder_block_with_phi(), vect_analyze_slp_instance(), vect_build_slp_tree_1(), vect_cost_group_size(), vect_get_place_in_interleaving_chain(), vect_get_slp_defs(), vect_model_load_cost(), vect_model_store_cost(), vect_record_grouped_load_vectors(), vect_remove_stores(), vectorizable_load(), and vectorizable_store().
|
static |
Fixup the loop arrays and numbers after moving LOOP and its subloops from FN1 to FN2.
References get_loops(), loop::inner, loops_for_fn(), loop::next, loop::num, number_of_loops(), and vec_safe_push().
Referenced by move_sese_region_to_fn().
void fold_cond_expr_cond | ( | void | ) |
Fold COND_EXPR_COND of each COND_EXPR.
References fold_binary_loc(), fold_defer_overflow_warnings(), fold_undefer_overflow_warnings(), gimple_cond_code(), gimple_cond_lhs(), gimple_cond_make_false(), gimple_cond_make_true(), gimple_cond_rhs(), gimple_location(), integer_onep(), integer_zerop(), last_stmt(), and WARN_STRICT_OVERFLOW_CONDITIONAL.
Referenced by make_edges(), and tree_function_versioning().
|
static |
|
static |
void gather_blocks_in_sese_region | ( | basic_block | entry, |
basic_block | exit, | ||
vec< basic_block > * | bbs_p | ||
) |
Add all the blocks dominated by ENTRY to the array BBS_P. Stop adding blocks when the dominator traversal reaches EXIT. This function silently assumes that ENTRY strictly dominates EXIT.
References CDI_DOMINATORS, first_dom_son(), gather_blocks_in_sese_region(), and next_dom_son().
Referenced by eliminate_local_variables(), gather_blocks_in_sese_region(), move_sese_region_to_fn(), and separate_decls_in_region().
|
static |
If we are inside a {start,end}_recording_cases block, then return a chain of CASE_LABEL_EXPRs from T which reference E. Otherwise return NULL.
References find_edge(), gimple_switch_label(), gimple_switch_num_labels(), pointer_map_contains(), pointer_map_insert(), recording_case_labels_p(), and edge_def::src.
Referenced by gimple_redirect_edge_and_branch().
|
static |
Do book-keeping of basic block BB for the profile consistency checker. If AFTER_PASS is 0, do pre-pass accounting, or if AFTER_PASS is 1 then do post-pass accounting. Store the counting in RECORD.
References basic_block_def::count, eni_size_weights, eni_time_weights, estimate_num_insns(), basic_block_def::frequency, gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_stmt(), PROFILE_GUESSED, PROFILE_READ, profile_record::size, and profile_record::time.
|
static |
Return true if BB ends with a call, possibly followed by some instructions that must stay with the call. Return false, otherwise.
References gsi_end_p(), gsi_last_nondebug_bb(), gsi_stmt(), and is_gimple_call().
|
static |
Return true if BB ends with a conditional branch. Return false, otherwise.
References last_stmt().
tree gimple_block_label | ( | ) |
Return a non-special label in the head of basic block BLOCK. Create one if it doesn't exist.
References create_artificial_label(), first, gimple_build_label(), gimple_label_label(), gsi_end_p(), gsi_insert_before(), gsi_move_before(), GSI_NEW_STMT, gsi_next(), gsi_start_bb(), and gsi_stmt().
Referenced by construct_init_block(), expand_omp_sections(), expand_thunk(), gimple_redirect_edge_and_branch(), lower_eh_dispatch(), lower_resx(), redirect_eh_dispatch_edge(), redirect_eh_edge_1(), and split_bb_make_tm_edge().
|
static |
Return true if basic_block can be duplicated.
|
static |
|
static |
Checks whether we can merge block B into block A.
References gimple_label_label(), gimple_location(), edge_def::goto_locus, gsi_after_labels(), gsi_end_p(), gsi_last_nondebug_bb(), gsi_next(), gsi_next_nondebug(), gsi_start_bb(), gsi_start_phis(), gsi_stmt(), is_gimple_debug(), last_stmt(), loop::latch, basic_block_def::loop_father, name_registered_for_update_p(), single_pred_p(), single_succ(), single_succ_edge(), single_succ_p(), and stmt_ends_bb_p().
|
static |
Returns true if it is possible to remove edge E by redirecting it to the destination of the other edge from E->src.
References edge_def::flags.
void gimple_debug_bb | ( | ) |
basic_block gimple_debug_bb_n | ( | ) |
Dump basic block with index N on stderr.
References gimple_debug_bb().
void gimple_debug_cfg | ( | ) |
Dump the CFG on stderr. FLAGS are the same used by the tree dumping functions (see TDF_* in dumpfile.h).
References gimple_dump_cfg().
void gimple_dump_cfg | ( | ) |
Dump the program showing basic block boundaries on the given FILE. FLAGS are the same used by the tree dumping functions (see TDF_* in tree.h).
References brief_dump_cfg(), current_function_decl, dump_cfg_stats(), dump_function_header(), and dump_function_to_file().
Referenced by compute_branch_probabilities(), execute_fixup_cfg(), gimple_debug_cfg(), rewrite_out_of_ssa(), and tree_estimate_probability_driver().
|
static |
Create a duplicate of the basic block BB. NOTE: This does not preserve SSA form.
References cfun, copy(), create_empty_bb(), create_new_def_for(), create_phi_node(), get_base_address(), gimple_copy(), gimple_debug_bind_get_var(), gimple_debug_bind_p(), gimple_duplicate_stmt_histograms(), gimple_get_lhs(), gimple_phi_result(), gimple_phi_result_ptr(), walk_stmt_info::gsi, gsi_end_p(), gsi_insert_after(), GSI_NEW_STMT, gsi_next(), gsi_start_bb(), gsi_stmt(), maybe_duplicate_eh_stmt(), phi_nodes(), and phis.
bool gimple_duplicate_sese_region | ( | edge | entry, |
edge | exit, | ||
basic_block * | region, | ||
unsigned | n_region, | ||
basic_block * | region_copy, | ||
bool | update_dominance | ||
) |
Duplicates a REGION (set of N_REGION basic blocks) with just a single important exit edge EXIT. By important we mean that no SSA name defined inside region is live over the other exit edges of the region. All entry edges to the region must go to ENTRY->dest. The edge ENTRY is redirected to the duplicate of the region. Dominance and loop information is updated if UPDATE_DOMINANCE is true, but not the SSA web. If UPDATE_DOMINANCE is false then we assume that the caller will update the dominance information after calling this function. The new basic blocks are stored to REGION_COPY in the same order as they had in REGION, provided that REGION_COPY is not NULL. The function returns false if it is unable to copy the region, true otherwise.
References add_phi_args_after_copy(), can_copy_bbs_p(), CDI_DOMINATORS, copy_bbs(), edge_def::count, basic_block_def::count, edge_def::dest, dominated_by_p(), flush_pending_stmts(), free(), free_original_copy_tables(), basic_block_def::frequency, get_bb_copy(), get_bb_original(), get_dominated_by_region(), loop::header, initialize_original_copy_tables(), iterate_fix_dominators(), loop::latch, basic_block_def::loop_father, loop_outer(), redirect_edge_and_branch(), scale_bbs_frequencies_gcov_type(), scale_bbs_frequencies_int(), set_immediate_dominator(), set_loop_copy(), split_edge_bb_loc(), and edge_def::src.
Referenced by copy_loop_headers().
bool gimple_duplicate_sese_tail | ( | edge | entry, |
edge | exit, | ||
basic_block * | region, | ||
unsigned | n_region, | ||
basic_block * | region_copy | ||
) |
Duplicates REGION consisting of N_REGION blocks. The new blocks are stored to REGION_COPY in the same order in that they appear in REGION, if REGION_COPY is not NULL. ENTRY is the entry to the region, EXIT an exit from it. The condition guarding EXIT is moved to ENTRY. Returns true if duplication succeeds, false otherwise. For example, some_code; if (cond) A; else B; is transformed to if (cond) { some_code; A; } else { some_code; B; }
References add_phi_arg(), add_phi_args_after_copy(), bb_part_of_region_p(), can_copy_bbs_p(), CDI_DOMINATORS, cfun, copy_bbs(), duplicate_loop(), duplicate_subloops(), loop::exits, edge_def::flags, free(), free_original_copy_tables(), get_bb_copy(), get_bb_original(), get_dominated_by_region(), gimple_copy(), gimple_phi_arg_location_from_edge(), gsi_end_p(), gsi_insert_after(), gsi_last_bb(), GSI_NEW_STMT, gsi_next(), gsi_start_phis(), gsi_stmt(), loop::header, initialize_original_copy_tables(), loop::inner, iterate_fix_dominators(), last_stmt(), loop::latch, make_edge(), need_ssa_update_p(), loop::next, redirect_edge_and_branch(), rescan_loop_exit(), scale_bbs_frequencies_gcov_type(), scale_bbs_frequencies_int(), set_immediate_dominator(), set_loop_copy(), single_succ_edge(), split_edge(), split_edge_bb_loc(), stmt_ends_bb_p(), and update_ssa().
Referenced by transform_to_exit_first_loop().
bool gimple_empty_block_p | ( | ) |
Return TRUE if block BB has no executable statements, otherwise return FALSE.
References walk_stmt_info::gsi, gsi_after_labels(), gsi_end_p(), gsi_next_nondebug(), gsi_stmt(), is_gimple_debug(), and phi_nodes().
|
static |
This function is called whenever a new edge is created or redirected.
References edge_def::dest, gimple_seq_empty_p(), phi_nodes(), and reserve_phi_args_for_new_edge().
|
static |
This function is called immediately before edge E is removed from the edge vector E->dest->preds.
References edge_def::dest, gimple_seq_empty_p(), phi_nodes(), and remove_phi_args().
|
static |
Add fake edges to the function exit for any non constant and non noreturn calls (or noreturn calls with EH/abnormal edges), 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 bitmap_bit_p(), find_edge(), gimple_build_nop(), gsi_commit_edge_inserts(), gsi_end_p(), gsi_insert_on_edge(), gsi_last_nondebug_bb(), gsi_prev(), gsi_stmt(), last_bb, last_stmt(), make_edge(), need_fake_edge_p(), basic_block_def::prev_bb, split_block(), and verify_flow_info().
|
static |
Adds a if else statement to COND_BB with condition COND_EXPR. SECOND_HEAD is the destination of the THEN and FIRST_HEAD is the destination of the ELSE part.
References edge_def::flags, gimple_build_cond_from_tree(), gsi_insert_after(), gsi_last_bb(), GSI_NEW_STMT, and single_succ_edge().
|
static |
Adjust phi nodes for 'first' basic block. 'second' basic block is a copy of 'first'. Both of them are dominated by 'new_head' basic block. When 'new_head' was created by 'second's incoming edge it received phi arguments on the edge by split_edge(). Later, additional edge 'e' was created to connect 'new_head' and 'first'. Now this routine adds phi args on this additional edge 'e' that new_head to second edge received as part of edge splitting.
References add_phi_arg(), edge_def::dest_idx, find_edge(), gimple_phi_arg_location_from_edge(), gsi_end_p(), gsi_next(), gsi_start_phis(), and gsi_stmt().
|
static |
|
static |
Updates phi nodes after creating a forwarder block joined by edge FALLTHRU.
References add_phi_arg(), copy_ssa_name(), create_phi_node(), edge_def::dest, flush_pending_stmts(), gimple_phi_result(), gimple_phi_set_result(), walk_stmt_info::gsi, gsi_end_p(), gsi_next(), gsi_start_phis(), gsi_stmt(), basic_block_def::preds, single_pred_p(), and edge_def::src.
|
static |
Flowgraph optimization and cleanup.
|
static |
Merge block B into block A.
References bb_seq(), bitmap_set_bit(), cfgcleanup_altered_bbs, copy(), dump_file, get_eh_landing_pad_from_number(), gimple_debug_bind_reset_value(), gimple_label_label(), gimple_phi_arg_def(), gimple_phi_result(), gimple_set_bb(), gsi_end_p(), gsi_insert_after(), gsi_insert_before(), gsi_insert_seq_after(), gsi_last_bb(), GSI_NEW_STMT, gsi_next(), gsi_remove(), GSI_SAME_STMT, gsi_start_bb(), gsi_start_phis(), gsi_stmt(), basic_block_def::index, last, last_stmt(), LOOP_CLOSED_SSA, basic_block_def::loop_father, loops_state_satisfies_p(), may_propagate_copy(), move_block_after(), eh_landing_pad_d::post_landing_pad, remove_phi_node(), replace_uses_by(), set_bb_seq(), single_succ_edge(), stmt_ends_bb_p(), and virtual_operand_p().
|
static |
Moves basic block BB after block AFTER.
References link_block(), basic_block_def::prev_bb, and unlink_block().
bool gimple_purge_all_dead_abnormal_call_edges | ( | ) |
Purge dead abnormal call edges from basic block listed in BLOCKS.
References changed, and gimple_purge_dead_abnormal_call_edges().
Referenced by fini_eliminate().
bool gimple_purge_all_dead_eh_edges | ( | ) |
Purge dead EH edges from basic block listed in BLOCKS.
References changed, and gimple_purge_dead_eh_edges().
Referenced by eliminate_degenerate_phis(), fini_eliminate(), tree_ssa_dominator_optimize(), and tree_ssa_dse().
bool gimple_purge_dead_abnormal_call_edges | ( | ) |
Purge dead abnormal call edges from basic block BB.
References function::calls_setjmp, cfun, changed, ei_next(), ei_safe_edge(), edge_def::flags, function::has_nonlocal_label, last_stmt(), remove_edge_and_dominated_blocks(), stmt_can_make_abnormal_goto(), and basic_block_def::succs.
Referenced by execute_fixup_cfg(), expand_call_inline(), and gimple_purge_all_dead_abnormal_call_edges().
bool gimple_purge_dead_eh_edges | ( | ) |
Purge dead EH edges from basic block BB.
References changed, ei_next(), ei_safe_edge(), edge_def::flags, last_stmt(), remove_edge_and_dominated_blocks(), stmt_can_throw_internal(), and basic_block_def::succs.
Referenced by associate_plusminus(), cleanup_control_flow_bb(), execute_cse_sincos(), execute_cse_sincos_1(), execute_fixup_cfg(), execute_fold_all_builtins(), execute_optimize_widening_mul(), expand_call_inline(), expand_complex_libcall(), expand_omp_taskreg(), expand_vector_operations(), fold_marked_statements(), gimple_purge_all_dead_eh_edges(), ipa_sra_modify_function_body(), ipcp_transform_function(), remove_prop_source_from_use(), replace_uses_by(), sra_modify_function_body(), substitute_and_fold(), tidy_after_forward_propagate_addr(), update_complex_assignment(), and vectorizable_call().
|
static |
Referenced by gimple_redirect_edge_and_branch_force().
|
static |
Redirect E to DEST. Return NULL on failure. Otherwise, return the edge representing the redirected branch.
References bitmap_set_bit(), edge_def::dest, find_edge(), first, edge_def::flags, get_cases_for_edge(), gimple_asm_label_op(), gimple_asm_nlabels(), gimple_block_label(), gimple_switch_label(), gimple_switch_num_labels(), gimple_transaction_set_label(), gimple_try_redirect_by_replacing_jump(), walk_stmt_info::gsi, gsi_end_p(), gsi_last_bb(), gsi_remove(), gsi_stmt(), last, redirect_eh_dispatch_edge(), redirect_eh_edge(), edge_def::src, and ssa_redirect_edge().
|
static |
Simple wrapper, as we can always redirect fallthru edges.
References gimple_redirect_edge_and_branch().
|
static |
Splits basic block BB after statement STMT (but at least after the labels). If STMT is NULL, BB is split just after the labels.
References create_empty_bb(), gimple_set_bb(), walk_stmt_info::gsi, gsi_end_p(), gsi_next(), gsi_split_seq_before(), gsi_start_bb(), gsi_stmt(), set_bb_seq(), edge_def::src, and basic_block_def::succs.
|
static |
Split a basic block if it ends with a conditional branch and if the other part of the block is not empty.
References edge_def::dest, walk_stmt_info::gsi, gsi_end_p(), gsi_last_nondebug_bb(), gsi_prev_nondebug(), gsi_stmt(), last, and split_block().
|
static |
Split a (typically critical) edge EDGE_IN. Return the new block. Abort on abnormal edges.
References edge_def::count, basic_block_def::count, create_empty_bb(), edge_def::dest, edge_def::flags, basic_block_def::frequency, make_edge(), edge_def::probability, redirect_edge_and_branch(), reinstall_phi_args(), and split_edge_bb_loc().
|
static |
Referenced by gimple_redirect_edge_and_branch().
|
static |
Attempt to perform edge redirection by replacing a possibly complex jump instruction by a goto or by removing the jump completely. This can apply only if all edges now point to the same block. The parameters and return values are equivalent to redirect_edge_and_branch.
References edge_def::flags, gsi_end_p(), gsi_last_bb(), gsi_remove(), gsi_stmt(), edge_def::src, ssa_redirect_edge(), and basic_block_def::succs.
|
static |
Verifies that the flow information is OK.
References basic_block_def::aux, CDI_DOMINATORS, current_function_decl, decl_function_context(), edge_def::dest, dom_info_state(), DOM_NO_FAST_QUERY, error(), extract_true_false_edges_from_block(), edge_def::flags, gimple_call_builtin_p(), gimple_label_label(), gimple_switch_label(), gimple_switch_num_labels(), walk_stmt_info::gsi, gsi_end_p(), gsi_last_bb(), gsi_next(), gsi_start_bb(), gsi_stmt(), basic_block_def::index, is_ctrl_stmt(), print_generic_expr(), simple_goto_p(), single_succ(), single_succ_edge(), single_succ_p(), edge_def::src, stmt_ends_bb_p(), basic_block_def::succs, tree_int_cst_lt(), verify_dominators(), verify_eh_dispatch_edge(), and verify_eh_edges().
tree gimplify_build1 | ( | gimple_stmt_iterator * | gsi, |
enum tree_code | code, | ||
tree | type, | ||
tree | a | ||
) |
Build a unary operation and gimplify it. Emit code before GSI. Return the gimple_val holding the result.
References force_gimple_operand_gsi(), gimple_location(), GSI_SAME_STMT, and gsi_stmt().
Referenced by do_negate(), do_plus_minus(), do_unop(), expand_complex_conjugate(), expand_complex_div_wide(), expand_complex_division(), expand_complex_multiplication(), expand_complex_negation(), expand_vector_divmod(), expand_vector_operations_1(), and tree_vec_extract().
Build a binary operation and gimplify it. Emit code before GSI. Return the gimple_val holding the result.
References force_gimple_operand_gsi(), gimple_location(), GSI_SAME_STMT, and gsi_stmt().
Referenced by add_rshift(), do_binop(), do_negate(), do_plus_minus(), expand_complex_addition(), expand_complex_comparison(), expand_complex_div_straight(), expand_complex_div_wide(), expand_complex_division(), expand_complex_multiplication(), and expand_vector_divmod().
tree gimplify_build3 | ( | gimple_stmt_iterator * | gsi, |
enum tree_code | code, | ||
tree | type, | ||
tree | a, | ||
tree | b, | ||
tree | c | ||
) |
Build a ternary operation and gimplify it. Emit code before GSI. Return the gimple_val holding the result.
References force_gimple_operand_gsi(), gimple_location(), GSI_SAME_STMT, and gsi_stmt().
Referenced by do_compare(), expand_vector_condition(), and tree_vec_extract().
void group_case_labels | ( | void | ) |
Look for blocks ending in a multiway branch (a GIMPLE_SWITCH), and scan the sorted vector of cases. Combine the ones jumping to the same label.
References group_case_labels_stmt(), and last_stmt().
Referenced by build_gimple_cfg(), and execute_cleanup_cfg_post_optimizing().
void group_case_labels_stmt | ( | ) |
Scan the sorted vector of cases in STMT (a GIMPLE_SWITCH) and combine the ones jumping to the same label. Eg. three separate entries 1: 2: 3: become one entry 1..3:
References gimple_switch_default_label(), gimple_switch_label(), gimple_switch_num_labels(), gimple_switch_set_label(), gimple_switch_set_num_labels(), and tree_to_double_int().
Referenced by end_recording_case_labels(), group_case_labels(), and process_switch().
void gt_ggc_mx | ( | tree & | ) |
Garbage collection support for edge_def.
void gt_ggc_mx | ( | rtx & | ) |
void gt_ggc_mx | ( | basic_block & | ) |
void gt_ggc_mx | ( | ) |
void gt_pch_nx | ( | tree & | ) |
PCH support for edge_def.
void gt_pch_nx | ( | rtx & | ) |
void gt_pch_nx | ( | basic_block & | ) |
void gt_pch_nx | ( | ) |
bool has_zero_uses_1 | ( | ) |
Return true if the var whose chain of uses starts at PTR has no nondebug uses.
References is_gimple_debug(), and ssa_use_operand_d::next.
Referenced by has_zero_uses().
void init_empty_tree_cfg | ( | void | ) |
References cfun, and init_empty_tree_cfg_for_function().
Referenced by build_gimple_cfg(), init_lowered_empty_function(), initialize_cfun(), and move_sese_region_to_fn().
void init_empty_tree_cfg_for_function | ( | ) |
References init_flow(), initial_cfg_capacity, PROFILE_ABSENT, vec_alloc(), and vec_safe_grow_cleared().
Referenced by init_empty_tree_cfg(), and input_cfg().
bool is_ctrl_altering_stmt | ( | ) |
Return true if T is a statement that may alter the flow of control (e.g., a call to a non-returning function).
References call_can_make_abnormal_goto(), edge_def::flags, gimple_asm_nlabels(), gimple_call_builtin_p(), gimple_call_flags(), gimple_call_fndecl(), is_tm_ending_fndecl(), and stmt_can_throw_internal().
Referenced by expand_complex_move(), instrument_expr(), make_edges(), mark_stmt_if_obviously_necessary(), and stmt_ends_bb_p().
bool is_ctrl_stmt | ( | ) |
Return true if T represents a stmt that always transfers control.
Referenced by create_add_on_incoming_edge(), execute_fixup_cfg(), find_taken_edge(), gimple_verify_flow_info(), gsi_move_to_bb_end(), insert_initializers(), mark_last_stmt_necessary(), remove_dead_stmt(), stmt_ends_bb_p(), and vect_stmt_relevant_p().
basic_block label_to_block_fn | ( | ) |
Return the basic block holding label DEST.
References gimple_build_label(), gsi_insert_before(), GSI_NEW_STMT, gsi_start_bb(), seen_error(), and vec_safe_length().
gimple last_and_only_stmt | ( | ) |
Return the last statement of an otherwise empty block. Return NULL if the block is totally empty, or if it contains more than one statement.
References gsi_end_p(), gsi_last_nondebug_bb(), gsi_prev_nondebug(), gsi_stmt(), and last.
Referenced by abs_replacement(), cond_if_else_store_replacement(), cond_store_replacement(), determine_parallel_type(), do_while_loop_p(), and minmax_replacement().
gimple last_stmt | ( | ) |
Return the last statement in basic block BB.
References gsi_end_p(), gsi_last_bb(), gsi_prev(), gsi_stmt(), and is_gimple_debug().
Referenced by abs_replacement(), apply_return_prediction(), assign_discriminators(), bound_difference(), canonicalize_loop_induction_variables(), canonicalize_loop_ivs(), cleanup_dead_labels(), cleanup_empty_eh(), collect_condition_stmts(), compute_complex_ancestor_jump_func(), cond_arg_set_in_bb(), conditional_replacement(), create_canonical_iv(), create_parallel_loop(), determine_parallel_type(), do_switchconv(), do_warn_aggressive_loop_optimizations(), do_while_loop_p(), dom_opt_leave_block(), dump_implicit_edges(), end_recording_case_labels(), estimate_numbers_of_iterations_loop(), execute_fixup_cfg(), execute_lower_eh_dispatch(), execute_lower_resx(), execute_warn_function_return(), expand_omp(), expand_omp_atomic(), expand_omp_atomic_fetch_op(), expand_omp_for(), expand_omp_for_static_chunk(), expand_omp_sections(), expand_omp_simd(), expand_omp_taskreg(), find_assert_locations_1(), find_taken_edge(), find_taken_edge_switch_expr(), fold_cond_expr_cond(), gen_parallel_loop(), get_loop_exit_condition(), gimple_block_ends_with_condjump_p(), gimple_can_merge_blocks_p(), gimple_duplicate_sese_tail(), gimple_flow_call_edges_add(), gimple_merge_blocks(), gimple_purge_dead_abnormal_call_edges(), gimple_purge_dead_eh_edges(), group_case_labels(), ifcombine_ifandif(), ignore_bb_p(), ip_normal_pos(), ipa_analyze_indirect_call_uses(), loop_niter_by_eval(), make_cond_expr_edges(), make_edges(), make_gimple_asm_edges(), make_gimple_switch_edges(), mark_last_stmt_necessary(), may_eliminate_iv(), maybe_optimize_range_tests(), minmax_replacement(), no_side_effect_bb(), number_of_iterations_exit(), optimize_range_tests(), phi_result_unknown_predicate(), predict_extra_loop_exits(), predict_iv_comparison(), predict_loops(), reassociate_bb(), redirect_eh_edge_1(), remove_exit_barrier(), set_cond_stmt_execution_predicate(), set_ifsese_condition(), set_switch_stmt_execution_predicate(), should_duplicate_loop_header_p(), simplify_using_entry_checks(), simplify_using_initial_conditions(), single_pred_cond_non_loop_exit(), split_function(), standard_iv_increment_position(), stmt_after_ip_normal_pos(), suitable_cond_bb(), tm_region_init(), transform_to_exit_first_loop(), tree_estimate_loop_size(), tree_estimate_probability_bb(), tree_may_unswitch_on(), tree_optimize_tail_calls_1(), tree_predict_by_opcode(), tree_ssa_ifcombine(), tree_ssa_iv_optimize_loop(), tree_ssa_phiopt_worker(), tree_unswitch_single_loop(), try_unroll_loop_completely(), update_range_test(), value_replacement(), vect_recog_bool_pattern(), vect_recog_divmod_pattern(), vect_recog_dot_prod_pattern(), vect_recog_mixed_size_cond_pattern(), vect_recog_pow_pattern(), vect_recog_rotate_pattern(), vect_recog_vector_vector_shift_pattern(), vect_recog_widen_mult_pattern(), vect_recog_widen_shift_pattern(), vect_recog_widen_sum_pattern(), and workshare_safe_to_combine_p().
|
static |
Given LABEL return the first label in the same basic block.
References basic_block_def::index, label_record::label, label_for_bb, and label_record::used.
Referenced by cleanup_dead_labels(), and cleanup_dead_labels_eh().
void make_abnormal_goto_edges | ( | ) |
Create edges for an abnormal goto statement at block BB. If FOR_CALL is true, the source statement is a CALL_EXPR instead of a GOTO_EXPR.
References gimple_call_flags(), gimple_label_label(), gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_stmt(), is_gimple_call(), make_edge(), and target_bb.
Referenced by copy_edges_for_bb(), make_edges(), and make_goto_expr_edges().
|
static |
Basic blocks and flowgraphs.
Referenced by build_gimple_cfg().
|
static |
Build a flowgraph for the sequence of stmts SEQ.
References computed_goto_p(), create_basic_block(), create_tmp_var(), found_computed_goto, gimple_block(), gimple_get_lhs(), gimple_has_lhs(), gimple_location(), gimple_set_bb(), gimple_set_block(), gimple_set_lhs(), gimple_set_location(), gsi_end_p(), gsi_insert_after(), gsi_next(), GSI_SAME_STMT, gsi_split_seq_before(), gsi_stmt(), is_gimple_reg_type(), stmt_can_make_abnormal_goto(), stmt_ends_bb_p(), and stmt_starts_bb_p().
|
static |
Referenced by make_edges().
|
static |
Create the edges for a GIMPLE_COND starting at block BB.
References first_stmt(), gimple_cond_false_label(), gimple_cond_set_false_label(), gimple_cond_set_true_label(), gimple_cond_true_label(), gimple_location(), edge_def::goto_locus, last_stmt(), and make_edge().
|
static |
Edges.
Join all the blocks in the flowgraph.
References omp_region::cont, omp_region::entry, omp_region::exit, edge_def::flags, fold_cond_expr_cond(), free_omp_regions(), gimple_call_builtin_p(), gimple_call_flags(), gimple_transaction_label(), omp_region::inner, is_ctrl_altering_stmt(), last, last_stmt(), make_abnormal_goto_edges(), make_cond_expr_edges(), make_edge(), make_eh_dispatch_edges(), make_eh_edges(), make_gimple_asm_edges(), make_gimple_switch_edges(), make_goto_expr_edges(), new_omp_region(), omp_region::next, basic_block_def::next_bb, omp_region::outer, root_omp_region, single_succ(), single_succ_edge(), stmt_can_make_abnormal_goto(), stmt_ends_bb_p(), and omp_region::type.
Referenced by build_gimple_cfg().
|
static |
Referenced by make_edges().
|
static |
Create edges for an asm statement with labels at block BB.
References gimple_asm_label_op(), gimple_asm_nlabels(), last_stmt(), and make_edge().
|
static |
Referenced by make_edges().
|
static |
Create the edges for a GIMPLE_SWITCH starting at block BB.
References gimple_switch_label(), gimple_switch_num_labels(), last_stmt(), and make_edge().
|
static |
Referenced by make_edges().
|
static |
Create edges for a goto statement at block BB.
References gimple_goto_dest(), gimple_location(), edge_def::goto_locus, gsi_last_bb(), gsi_remove(), gsi_stmt(), last, make_abnormal_goto_edges(), make_edge(), and simple_goto_p().
gimple_opt_pass* make_pass_build_cfg | ( | ) |
gimple_opt_pass* make_pass_split_crit_edges | ( | ) |
gimple_opt_pass* make_pass_warn_function_noreturn | ( | ) |
gimple_opt_pass* make_pass_warn_function_return | ( | ) |
gimple_opt_pass* make_pass_warn_unused_result | ( | ) |
|
static |
Move basic block BB from function CFUN to function DEST_FN. The block is moved out of the original linked list and placed after block AFTER in the new list. Also, the block is removed from the original array of blocks and placed in DEST_FN's array of blocks. If UPDATE_EDGE_COUNT_P is true, the edge counts on both CFGs is updated to reflect the moved edges. The local variables are remapped to new instances, VARS_MAP is used to record the mapping.
References loop::aux, CDI_DOMINATORS, function::cfg, cfun, delete_from_dominance_info(), move_stmt_d::eh_map, free_stmt_operands(), gimple_duplicate_stmt_histograms(), gimple_label_label(), gimple_phi_arg_location(), gimple_phi_arg_set_location(), gimple_remove_stmt_histograms(), edge_def::goto_locus, gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_start_phis(), gsi_stmt(), basic_block_def::index, walk_stmt_info::info, line_table, basic_block_def::loop_father, maybe_duplicate_eh_stmt_fn(), memset(), move_block_after(), move_stmt_op(), move_stmt_r(), move_stmt_d::new_block, move_stmt_d::orig_block, pop_cfun(), basic_block_def::preds, push_cfun(), remove_phi_node(), remove_stmt_from_eh_lp_fn(), replace_ssa_name(), si, basic_block_def::succs, update_stmt(), move_stmt_d::vars_map, vec_safe_grow_cleared(), vec_safe_length(), virtual_operand_p(), walk_gimple_stmt(), control_flow_graph::x_basic_block_info, control_flow_graph::x_label_to_block_map, control_flow_graph::x_last_basic_block, control_flow_graph::x_n_basic_blocks, and control_flow_graph::x_n_edges.
Referenced by move_sese_region_to_fn().
basic_block move_sese_region_to_fn | ( | struct function * | dest_cfun, |
basic_block | entry_bb, | ||
basic_block | exit_bb, | ||
tree | orig_block | ||
) |
Move a single-entry, single-exit region delimited by ENTRY_BB and EXIT_BB to function DEST_CFUN. The whole region is replaced by a single basic block in the original CFG and the new basic block is returned. DEST_CFUN must not have a CFG yet. Note that the region need not be a pure SESE region. Blocks inside the region may contain calls to abort/exit. The only restriction is that ENTRY_BB should be the only entry point and it must dominate EXIT_BB. Change TREE_BLOCK of all statements in ORIG_BLOCK to the new functions outermost BLOCK, move all subblocks of ORIG_BLOCK to the new function. All local variables referenced in the region are assumed to be in the corresponding BLOCK_VARS and unexpanded variable lists associated with DEST_CFUN.
References add_bb_to_loop(), loop::aux, CDI_DOMINATORS, cfun, create_empty_bb(), function::decl, edge_def::dest, dominated_by_p(), duplicate_eh_regions(), function::eh, move_stmt_d::eh_map, ei_safe_edge(), loop::exits, find_outermost_region_in_block(), fixup_loop_arrays_after_move(), edge_def::flags, flow_loop_tree_node_add(), flow_loop_tree_node_remove(), free(), move_stmt_d::from_context, gather_blocks_in_sese_region(), get_dominated_by_region(), get_immediate_dominator(), get_loop(), loop::header, init_eh_for_function(), init_empty_tree_cfg(), init_loops_structure(), basic_block_def::loop_father, loop_outer(), loops_for_fn(), LOOPS_MAY_HAVE_MULTIPLE_LATCHES, make_edge(), memset(), move_block_to_fn(), move_stmt_d::new_block, move_stmt_d::new_label_map, new_label_mapper(), loop::num_nodes, move_stmt_d::orig_block, pointer_map_create(), pointer_map_destroy(), pop_cfun(), basic_block_def::preds, edge_def::probability, push_cfun(), move_stmt_d::remap_decls_p, remove_edge(), replace_block_vars_by_duplicates(), set_immediate_dominator(), set_loops_for_fn(), edge_def::src, loops::state, basic_block_def::succs, move_stmt_d::to_context, tree_map_hash(), and move_stmt_d::vars_map.
Referenced by expand_omp_taskreg().
|
static |
Helper for move_stmt_r. Given an EH region number for the source function, map that to the duplicate EH regio number in the dest.
References move_stmt_d::eh_map, get_eh_region_from_number(), eh_region_d::index, and pointer_map_contains().
Referenced by move_stmt_eh_region_tree_nr(), and move_stmt_r().
|
static |
Similar, but operate on INTEGER_CSTs.
References build_int_cst(), move_stmt_eh_region_nr(), and tree_low_cst().
Referenced by move_stmt_r().
|
static |
Helper for move_block_to_fn. Set TREE_BLOCK in every expression contained in *TP if it has been ORIG_BLOCK previously and change the DECL_CONTEXT of every local variable referenced in *TP.
References tree_map::base, tree_map_base::from, walk_stmt_info::info, is_global_var(), move_stmt_d::new_block, move_stmt_d::new_label_map, move_stmt_d::orig_block, move_stmt_d::remap_decls_p, replace_by_duplicate_decl(), replace_ssa_name(), tree_map::to, move_stmt_d::to_context, and move_stmt_d::vars_map.
Referenced by move_block_to_fn(), and move_stmt_r().
|
static |
Like move_stmt_op, but for gimple statements. Helper for move_block_to_fn. Set GIMPLE_BLOCK in every expression contained in the current statement in *GSI_P and change the DECL_CONTEXT of every local variable referenced in the current statement.
References BUILT_IN_NORMAL, gimple_block(), gimple_call_arg(), gimple_call_fndecl(), gimple_call_set_arg(), gimple_eh_dispatch_region(), gimple_eh_dispatch_set_region(), gimple_omp_body_ptr(), gimple_resx_region(), gimple_resx_set_region(), gimple_set_block(), gsi_stmt(), walk_stmt_info::info, is_gimple_omp(), move_stmt_eh_region_nr(), move_stmt_eh_region_tree_nr(), move_stmt_op(), move_stmt_d::new_block, move_stmt_d::orig_block, move_stmt_d::remap_decls_p, and walk_gimple_seq_mod().
Referenced by move_block_to_fn().
|
static |
Return true if we need to add fake edge to exit at statement T. Helper function for gimple_flow_call_edges_add.
References BUILT_IN_NORMAL, edge_def::flags, gimple_asm_input_p(), gimple_asm_volatile_p(), gimple_bb(), gimple_call_flags(), gimple_call_fndecl(), is_gimple_call(), and basic_block_def::succs.
Referenced by gimple_flow_call_edges_add().
|
static |
References tree_map::base, function::cfg, cfun, create_artificial_label(), tree_map_base::from, tree_map::hash, control_flow_graph::last_label_uid, and tree_map::to.
Referenced by move_sese_region_to_fn().
|
static |
Find the next available discriminator value for LOCUS. The discriminator distinguishes among several basic blocks that share a common locus, allowing for more accurate sample-based profiling.
References locus_discrim_map::discriminator, hash_table< Descriptor, Allocator >::find_slot_with_hash(), and locus_discrim_map::locus.
Referenced by assign_discriminators().
void notice_special_calls | ( | ) |
T is CALL_EXPR. Set current_function_calls_* flags.
References function::calls_alloca, function::calls_setjmp, cfun, and gimple_call_flags().
Referenced by eliminate_unnecessary_stmts(), gimplify_call_expr(), and gimplify_modify_expr().
|
static |
Returns true if there is one pointer type in TYPE_POINTER_TO (SRC_OBJ) list of pointer-to types that is trivially convertible to DEST.
References edge_def::src, and useless_type_conversion_p().
Referenced by verify_gimple_assign_single().
|
static |
Pretty print LOOP on FILE, indented INDENT spaces. Following VERBOSITY level this outputs the contents of the loop, or just its structure.
References loop::any_estimate, loop::any_upper_bound, dump_double_int(), loop::header, indent, basic_block_def::index, loop::inner, loop::latch, basic_block_def::loop_father, memset(), loop::nb_iterations, loop::nb_iterations_estimate, loop::nb_iterations_upper_bound, loop::num, print_generic_expr(), print_loop_and_siblings(), and print_loops_bb().
Referenced by debug(), debug_loop(), debug_verbose(), and print_loop_and_siblings().
|
static |
Print the LOOP and its sibling loops on FILE, indented INDENT spaces. Following VERBOSITY level this outputs the contents of the loop, or just its structure.
References loop::next, and print_loop().
Referenced by print_loop(), and print_loops().
void print_loops | ( | ) |
Follow a CFG edge from the entry point of the program, and on entry of a loop, pretty print the loop structure on FILE.
References basic_block_def::loop_father, and print_loop_and_siblings().
Referenced by debug_loops(), and graphite_finalize().
void print_loops_bb | ( | ) |
Print to FILE the basic block BB following the VERBOSITY level.
References dump_bb(), indent, basic_block_def::index, memset(), print_pred_bbs(), and print_succ_bbs().
Referenced by print_loop().
|
static |
Print on FILE the indexes for the predecessors of basic_block BB.
References basic_block_def::index, basic_block_def::preds, and edge_def::src.
Referenced by print_loops_bb().
|
static |
Print on FILE the indexes for the successors of basic_block BB.
References edge_def::dest, basic_block_def::index, and basic_block_def::succs.
Referenced by print_loops_bb().
|
static |
Return nonzero if we are recording information for case labels.
Referenced by get_cases_for_edge().
|
static |
Reinstall those PHI arguments queued in OLD_EDGE to NEW_EDGE.
References add_phi_arg(), edge_def::dest, gimple_phi_result(), gsi_end_p(), gsi_next(), gsi_start_phis(), gsi_stmt(), phis, redirect_edge_var_map_clear(), redirect_edge_var_map_def(), redirect_edge_var_map_location(), redirect_edge_var_map_result(), and redirect_edge_var_map_vector().
Referenced by gimple_split_edge().
|
static |
|
static |
Remove statements of basic block BB.
References bb_seq(), cfun, dump_bb(), dump_file, dump_flags, free_numbers_of_iterations_estimates_loop(), basic_block_def::basic_block_il_dependent::gimple, gimple_in_ssa_p(), gimple_label_label(), gsi_end_p(), gsi_insert_before(), gsi_last_bb(), GSI_NEW_STMT, gsi_prev(), gsi_remove(), gsi_start_bb(), gsi_stmt(), loop::header, basic_block_def::il, basic_block_def::index, loop::latch, basic_block_def::loop_father, gimple_bb_info::phi_nodes, basic_block_def::prev_bb, release_defs(), remove_phi_nodes_and_edges_for_unreachable_block(), and gimple_bb_info::seq.
void remove_edge_and_dominated_blocks | ( | ) |
Removes edge E and all the blocks dominated by it, and updates dominance information. The IL in E->src needs to be updated separately. If dominance info is not available, only the edge E is removed.
References bitmap_clear_bit(), bitmap_ior_into(), bitmap_set_bit(), CDI_DOMINATORS, cfgcleanup_altered_bbs, delete_basic_block(), edge_def::dest, df, dom_info_available_p(), dominated_by_p(), first_dom_son(), get_all_dominated_blocks(), get_immediate_dominator(), basic_block_def::index, iterate_fix_dominators(), next_dom_son(), basic_block_def::preds, remove_edge(), edge_def::src, basic_block_def::succs, and vNULL.
Referenced by cleanup_control_expr_graph(), cleanup_control_flow_bb(), expand_omp_taskreg(), gimple_purge_dead_abnormal_call_edges(), gimple_purge_dead_eh_edges(), and remove_fallthru_edge().
|
static |
Remove PHI nodes associated with basic block BB and all edges out of BB.
References remove_edge(), remove_phi_nodes(), and basic_block_def::succs.
Referenced by remove_bb().
|
static |
Change DECL_CONTEXT of all BLOCK_VARS in block, including subblocks.
References replace_by_duplicate_decl().
Referenced by move_sese_region_to_fn().
|
static |
Replaces *TP with a duplicate (belonging to function TO_CONTEXT). The duplicates are recorded in VARS_MAP.
References add_local_decl(), copy_node(), copy_var_decl(), pointer_map_contains(), and pointer_map_insert().
Referenced by move_stmt_op(), replace_block_vars_by_duplicates(), and replace_ssa_name().
|
static |
Creates an ssa name in TO_CONTEXT equivalent to NAME. VARS_MAP maps old ssa names and var_decls to the new ones.
References copy_ssa_name_fn(), make_ssa_name_fn(), pointer_map_contains(), pointer_map_insert(), replace_by_duplicate_decl(), set_ssa_default_def(), and virtual_operand_p().
Referenced by move_block_to_fn(), and move_stmt_op().
void replace_uses_by | ( | ) |
Replaces all uses of NAME by VAL.
References bitmap_set_bit(), cfgcleanup_altered_bbs, edge_def::flags, fold_stmt(), gimple_num_ops(), gimple_op(), gimple_phi_arg_edge(), gimple_purge_dead_eh_edges(), gsi_for_stmt(), gsi_stmt(), has_zero_uses(), is_gimple_min_invariant(), maybe_clean_or_replace_eh_stmt(), recompute_tree_invariant_for_addr_expr(), replace_exp(), stmt_ends_bb_p(), substitute_in_loop_info(), update_stmt(), and virtual_operand_p().
Referenced by gimple_merge_blocks(), replace_removed_params_ssa_names(), and scev_const_prop().
|
static |
References current_function_decl, do_warn_unused_result(), and gimple_body().
|
static |
Return TRUE if LOCUS1 and LOCUS2 refer to the same source line.
References expand_location().
Referenced by assign_discriminators().
bool simple_goto_p | ( | ) |
Return true if T is a simple local goto.
References gimple_goto_dest().
Referenced by gimple_verify_flow_info(), make_goto_expr_edges(), and mark_stmt_if_obviously_necessary().
bool single_imm_use_1 | ( | const ssa_use_operand_t * | head, |
use_operand_p * | use_p, | ||
gimple * | stmt | ||
) |
Return true if the var whose chain of uses starts at PTR has a single nondebug use. Set USE_P and STMT to that single nondebug use, if so, or to NULL otherwise.
References is_gimple_debug(), ssa_use_operand_d::loc, ssa_use_operand_d::next, and ssa_use_operand_d::stmt.
Referenced by has_single_use(), and single_imm_use().
basic_block single_noncomplex_succ | ( | ) |
Return the one of two successors of BB that is not reachable by a complex edge, if there is one. Else, return BB. We use this in optimizations that use post-dominators for their heuristics, to catch the cases in C++ where function calls are involved.
References edge_def::dest, edge_def::flags, and basic_block_def::succs.
Referenced by compute_merit().
|
static |
Split all critical edges.
References edge_def::dest, end_recording_case_labels(), edge_def::flags, gimple_call_builtin_p(), gimple_seq_empty_p(), gsi_end_p(), gsi_last_bb(), gsi_stmt(), phi_nodes(), single_pred_p(), split_edge(), edge_def::src, start_recording_case_labels(), stmt_ends_bb_p(), and basic_block_def::succs.
|
static |
Returns the basic block after which the new basic block created by splitting edge EDGE_IN should be placed. Tries to keep the new block near its "logical" location. This is of most help to humans looking at debugging dumps.
References edge_def::dest, find_edge(), edge_def::flags, basic_block_def::prev_bb, and edge_def::src.
Referenced by gimple_duplicate_sese_region(), gimple_duplicate_sese_tail(), and gimple_split_edge().
void start_recording_case_labels | ( | void | ) |
Start recording information mapping edges to case labels.
References pointer_map_create().
Referenced by cleanup_tree_cfg_1(), and split_critical_edges().
bool stmt_can_make_abnormal_goto | ( | ) |
Return true if T can make an abnormal transfer of control flow. Transfers of control flow associated with EH are excluded.
References call_can_make_abnormal_goto(), computed_goto_p(), and is_gimple_call().
Referenced by copy_cfg_body(), copy_edges_for_bb(), eliminate_bb(), gimple_purge_dead_abnormal_call_edges(), make_blocks(), make_edges(), and maybe_move_debug_stmts_to_successors().
bool stmt_ends_bb_p | ( | ) |
Return true if T should end a basic block.
References is_ctrl_altering_stmt(), and is_ctrl_stmt().
Referenced by build_and_add_sum(), ccp_initialize(), compute_avail(), disqualify_ops_if_throwing_stmt(), gimple_can_merge_blocks_p(), gimple_duplicate_sese_tail(), gimple_find_edge_insert_loc(), gimple_ic(), gimple_merge_blocks(), gimple_verify_flow_info(), if_convertible_gimple_assign_stmt_p(), infer_value_range(), init_copy_prop(), init_dont_simulate_again(), insert_backedge_copies(), insert_gimplified_predicates(), insert_stmt_after(), make_blocks(), make_edges(), maybe_register_def(), mf_build_check_statement_for(), movement_possibility(), process_assert_insertions_for(), replace_uses_by(), shrink_wrap_one_built_in_call(), simulate_stmt(), split_critical_edges(), statement_sink_location(), vrp_initialize(), and vrp_visit_stmt().
Various helpers.
Referenced by make_blocks().
|
inlinestatic |
Return true if STMT should start a new basic block. PREV_STMT is the statement preceding STMT. It is used when STMT is a label or a case label. Labels should only start a new basic block if their previous statement wasn't a label. Otherwise, sequence of labels would generate unnecessary basic blocks that only contain a single label.
References cfg_stats, gimple_call_flags(), gimple_label_label(), and cfg_stats_d::num_merged_labels.
bool tree_node_can_be_shared | ( | ) |
Return true when the T can be shared.
References is_gimple_min_invariant().
Referenced by verify_node_sharing_1().
|
static |
Return true if TYPE1 is a fixed-point type and if conversions to and from TYPE2 can be handled by FIXED_CONVERT_EXPR.
Referenced by verify_gimple_assign_unary().
|
static |
Verify properties of the address expression T with base object BASE.
References error(), and recompute_tree_invariant_for_addr_expr().
Referenced by verify_expr().
|
static |
References debug_gimple_stmt(), error(), pointer_set_contains(), throw_stmt_node::stmt, and visited.
Referenced by verify_gimple_in_cfg().
|
static |
Callback for walk_tree, check that all elements with address taken are properly noticed as such. The DATA is an int* that is 1 if TP was seen inside a PHI node.
References error(), fold(), handled_component_p(), host_integerp(), is_gimple_address(), is_gimple_condexpr(), is_gimple_lvalue(), is_gimple_mem_ref_addr(), is_gimple_min_invariant(), is_gimple_reg_type(), ptrofftype_p(), and verify_address().
Referenced by verify_gimple_in_cfg().
|
static |
Called via walk_gimple_op. Verify locations of expressions.
References walk_stmt_info::info, and verify_expr_location_1().
Referenced by verify_gimple_in_cfg().
|
static |
Called via walk_tree. Verify locations of expressions.
References verify_expr_no_block(), and verify_location().
Referenced by verify_expr_location(), and verify_gimple_in_cfg().
|
static |
Called via walk_tree. Verify that expressions have no blocks.
Referenced by verify_expr_location_1().
|
static |
Verify the contents of a GIMPLE_ASSIGN STMT. Returns true when there is a problem, otherwise false.
References gimple_assign_rhs_class(), GIMPLE_BINARY_RHS, GIMPLE_SINGLE_RHS, GIMPLE_TERNARY_RHS, GIMPLE_UNARY_RHS, verify_gimple_assign_binary(), verify_gimple_assign_single(), verify_gimple_assign_ternary(), and verify_gimple_assign_unary().
Referenced by verify_gimple_stmt().
|
static |
Verify a gimple assignment statement STMT with a binary rhs. Returns true if anything is wrong.
References debug_generic_expr(), debug_generic_stmt(), div_if_zero_remainder(), error(), gimple_assign_lhs(), gimple_assign_rhs1(), gimple_assign_rhs2(), gimple_assign_rhs_code(), is_gimple_reg(), is_gimple_val(), ptrofftype_p(), useless_type_conversion_p(), and verify_gimple_comparison().
Referenced by verify_gimple_assign().
|
static |
Verify a gimple assignment statement STMT with a single rhs. Returns true if anything is wrong.
References compare_tree_int(), debug_generic_expr(), debug_generic_stmt(), error(), gimple_assign_lhs(), gimple_assign_rhs1(), gimple_assign_rhs_code(), gimple_clobber_p(), handled_component_p(), is_gimple_addressable(), is_gimple_reg(), is_gimple_reg_type(), one_pointer_to_useless_type_conversion_p(), types_compatible_p(), useless_type_conversion_p(), and verify_types_in_gimple_reference().
Referenced by verify_gimple_assign().
|
static |
Verify a gimple assignment statement STMT with a ternary rhs. Returns true if anything is wrong.
References debug_generic_expr(), error(), gimple_assign_lhs(), gimple_assign_rhs1(), gimple_assign_rhs2(), gimple_assign_rhs3(), gimple_assign_rhs_code(), is_gimple_condexpr(), is_gimple_reg(), is_gimple_val(), and useless_type_conversion_p().
Referenced by verify_gimple_assign().
|
static |
Verify a gimple assignment statement STMT with an unary rhs. Returns true if anything is wrong.
References debug_generic_expr(), error(), gimple_assign_lhs(), gimple_assign_rhs1(), gimple_assign_rhs_code(), is_gimple_reg(), is_gimple_val(), ptrofftype_p(), useless_type_conversion_p(), and valid_fixed_convert_types_p().
Referenced by verify_gimple_assign().
|
static |
Verify the contents of a GIMPLE_CALL STMT. Returns true when there is a problem, otherwise false.
References debug_generic_expr(), debug_generic_stmt(), error(), gimple_call_arg(), gimple_call_chain(), gimple_call_fn(), gimple_call_fndecl(), gimple_call_fntype(), gimple_call_internal_p(), gimple_call_lhs(), gimple_call_noreturn_p(), gimple_call_num_args(), is_gimple_call_addr(), is_gimple_lvalue(), is_gimple_reg_type(), is_gimple_val(), useless_type_conversion_p(), and verify_types_in_gimple_reference().
Referenced by verify_gimple_stmt().
|
static |
Verifies the gimple comparison with the result type TYPE and the operands OP0 and OP1.
References debug_generic_expr(), error(), is_gimple_val(), and useless_type_conversion_p().
Referenced by verify_gimple_assign_binary(), and verify_gimple_stmt().
|
static |
Verify a gimple debug statement STMT. Returns true if anything is wrong.
Referenced by verify_gimple_stmt().
|
static |
Verify the contents of a GIMPLE_GOTO STMT. Returns true when there is a problem, otherwise false.
References edge_def::dest, error(), gimple_goto_dest(), and is_gimple_val().
Referenced by verify_gimple_stmt().
DEBUG_FUNCTION void verify_gimple_in_cfg | ( | ) |
Verify the GIMPLE statements in the CFG of FN.
References cfun, collect_subblocks(), debug_generic_expr(), debug_gimple_stmt(), error(), get_eh_throw_stmt_table(), gimple_location(), gimple_phi_arg_def(), gimple_phi_arg_location(), gimple_phi_num_args(), gimple_phi_result(), gsi_end_p(), gsi_next(), gsi_one_before_end_p(), gsi_start_bb(), gsi_start_phis(), gsi_stmt(), walk_stmt_info::info, inform(), internal_error(), is_gimple_debug(), is_gimple_omp(), lookup_stmt_eh_lp(), memset(), pointer_set_create(), pointer_set_destroy(), pointer_set_insert(), stmt_can_throw_internal(), stmt_could_throw_p(), timevar_pop(), timevar_push(), verify_eh_throw_stmt_node(), verify_expr(), verify_expr_location(), verify_expr_location_1(), verify_gimple_phi(), verify_gimple_stmt(), verify_histograms(), verify_location(), verify_node_sharing(), verify_node_sharing_1(), virtual_operand_p(), visited, and walk_gimple_op().
Referenced by execute_function_todo().
DEBUG_FUNCTION void verify_gimple_in_seq | ( | ) |
Verify the GIMPLE statements inside the statement list STMTS.
References internal_error(), timevar_pop(), timevar_push(), and verify_gimple_in_seq_2().
Referenced by gimplify_body().
|
static |
Verify the GIMPLE statements inside the sequence STMTS.
References debug_gimple_stmt(), gimple_bind_body(), gimple_catch_handler(), gimple_eh_else_e_body(), gimple_eh_else_n_body(), gimple_eh_filter_failure(), gimple_try_cleanup(), gimple_try_eval(), gsi_end_p(), gsi_next(), gsi_stmt(), verify_gimple_stmt(), and verify_gimple_transaction().
Referenced by verify_gimple_in_seq(), and verify_gimple_transaction().
|
static |
Verify a gimple label statement STMT. Returns true if anything is wrong.
References function::cfg, cfun, error(), get_eh_landing_pad_from_number(), gimple_label_label(), and eh_landing_pad_d::post_landing_pad.
Referenced by verify_gimple_stmt().
|
static |
Verify the contents of a GIMPLE_PHI. Returns true if there is a problem, and false otherwise.
References cfun, debug_generic_expr(), debug_generic_stmt(), error(), gimple_phi_arg_def(), gimple_phi_num_args(), gimple_phi_result(), gimple_vop(), is_gimple_val(), useless_type_conversion_p(), and virtual_operand_p().
Referenced by verify_gimple_in_cfg().
|
static |
Verify the contents of a GIMPLE_RETURN STMT. Returns true when there is a problem, otherwise false.
References cfun, debug_generic_stmt(), function::decl, error(), gimple_return_retval(), is_gimple_val(), and useless_type_conversion_p().
Referenced by verify_gimple_stmt().
|
static |
Verify the GIMPLE statement STMT. Returns true if there is an error, otherwise false.
References error(), gimple_cond_code(), gimple_cond_false_label(), gimple_cond_lhs(), gimple_cond_rhs(), gimple_cond_true_label(), tcc_comparison, verify_gimple_assign(), verify_gimple_call(), verify_gimple_comparison(), verify_gimple_debug(), verify_gimple_goto(), verify_gimple_label(), verify_gimple_return(), verify_gimple_switch(), and verify_gimple_transaction().
Referenced by verify_gimple_in_cfg(), and verify_gimple_in_seq_2().
|
static |
Verify the contents of a GIMPLE_SWITCH STMT. Returns true when there is a problem, otherwise false.
References debug_generic_expr(), debug_generic_stmt(), error(), gimple_switch_index(), gimple_switch_label(), gimple_switch_num_labels(), is_gimple_val(), and tree_int_cst_lt().
Referenced by verify_gimple_stmt().
|
static |
Referenced by verify_gimple_in_seq_2(), and verify_gimple_stmt().
|
static |
Verify the contents of a GIMPLE_TRANSACTION. Returns true if there is a problem, otherwise false.
References gimple_transaction_body(), gimple_transaction_label(), and verify_gimple_in_seq_2().
|
static |
Verify if the location LOCs block is in BLOCKS.
References error(), and pointer_set_contains().
Referenced by verify_expr_location_1(), and verify_gimple_in_cfg().
|
static |
Called via walk_gimple_stmt. Verify tree sharing.
References walk_stmt_info::info, and verify_node_sharing_1().
Referenced by verify_gimple_in_cfg().
|
static |
Called via walk_tree. Verify tree sharing.
References pointer_set_insert(), tree_node_can_be_shared(), and visited.
Referenced by verify_gimple_in_cfg(), and verify_node_sharing().
|
static |
Verify if EXPR is either a GIMPLE ID or a GIMPLE indirect reference. Returns true if there is an error, otherwise false.
References debug_generic_stmt(), error(), is_gimple_id(), and is_gimple_val().
Referenced by verify_types_in_gimple_reference().
|
static |
Verify if EXPR is a valid GIMPLE reference expression. If REQUIRE_LVALUE is true verifies it is an lvalue. Returns true if there is an error, otherwise false.
References debug_generic_stmt(), error(), handled_component_p(), is_gimple_mem_ref_addr(), is_gimple_min_invariant(), is_gimple_val(), useless_type_conversion_p(), and verify_types_in_gimple_min_lval().
Referenced by verify_gimple_assign_single(), and verify_gimple_call().
|
static |
Referenced by build_gimple_cfg(), dump_cfg_stats(), and stmt_starts_bb_p().
|
static |
|
static |
This hash table allows us to efficiently lookup all CASE_LABEL_EXPRs which use a particular edge. The CASE_LABEL_EXPRs are chained together via their CASE_CHAIN field, which we clear after we're done with the hash table to prevent problems with duplication of GIMPLE_SWITCHes. Access to this list of CASE_LABEL_EXPRs allows us to efficiently update the case vector in response to edge redirections. Right now this table is set up and torn down at key points in the compilation process. It would be nice if we could make the table more persistent. The key is getting notification of changes to the CFG (particularly edge removal, creation and redirection).
|
static |
|
static |
Nonzero if we found a computed goto while building basic blocks.
Referenced by build_gimple_cfg(), and make_blocks().
struct cfg_hooks gimple_cfg_hooks |
Hooks containers.
Referenced by current_ir_type(), and gimple_register_cfg_hooks().
|
static |
@verbatim Control flow functions for trees.
Copyright (C) 2001-2013 Free Software Foundation, Inc. Contributed by Diego Novillo dnovi llo@ redha t.co m
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/.
This file contains functions for building the Control Flow Graph (CFG) for a function tree.
Local declarations.
Initial capacity for the basic block array.
Referenced by init_empty_tree_cfg_for_function().
|
static |
Referenced by cleanup_dead_labels(), fixup_reorder_chain(), and main_block_label().
|
static |
If we record edge_to_cases, this bitmap will hold indexes of basic blocks that end in a GIMPLE_SWITCH which we touched due to edge manipulations.