GCC Middle and Back End API Reference
|
Variables | |
static struct pointer_set_t * | mfb_reis_set |
void add_bb_to_loop | ( | ) |
Adds basic block BB to LOOP.
References loop_exit::e, basic_block_def::loop_father, loop::num_nodes, basic_block_def::preds, rescan_loop_exit(), basic_block_def::succs, and loop::superloops.
Referenced by add_loop(), construct_exit_block(), construct_init_block(), create_cond_insert_point(), duplicate_block(), dw2_build_landing_pads(), execute_sm_if_changed(), expand_complex_div_wide(), expand_gimple_cond(), expand_omp_for_generic(), expand_omp_for_init_counts(), expand_omp_sections(), expand_parallel_call(), expand_thunk(), expand_transaction(), extract_omp_for_update_vars(), fix_bb_placement(), force_nonfallthru(), init_before_recovery(), init_lowered_empty_function(), loopify(), lower_resx(), make_forwarder_block(), merge_blocks(), mf_build_check_statement_for(), move_sese_region_to_fn(), redirect_edge_and_branch_force(), sjlj_emit_dispatch_table(), split_block(), split_edge(), split_function(), thread_through_loop_header(), and unloop().
|
read |
Allocates and returns new loop structure.
References loop::can_be_parallel, loop::exits, loop_exit::next, and loop_exit::prev.
Referenced by copy_loops(), create_empty_loop_on_edge(), duplicate_loop(), expand_omp_atomic_pipeline(), expand_omp_for_generic(), expand_omp_for_static_chunk(), expand_omp_for_static_nochunk(), expand_omp_simd(), flow_loops_find(), form_subloop(), init_loops_structure(), input_cfg(), and loopify().
bool bb_loop_header_p | ( | ) |
Returns whether HEADER is a loop header.
References bb_has_abnormal_pred(), CDI_DOMINATORS, dominated_by_p(), loop::latch, basic_block_def::preds, and edge_def::src.
Referenced by fix_loop_structure(), flow_loops_find(), and verify_loop_structure().
|
static |
Cancels the LOOP; it must be innermost one.
References delete_loop(), free(), get_loop_body(), loop::inner, loop_outer(), and loop::num_nodes.
Referenced by cancel_loop_tree().
void cancel_loop_tree | ( | ) |
Cancels LOOP and all its subloops.
References cancel_loop(), and loop::inner.
Referenced by destroy_loop(), gen_parallel_loop(), and remove_path().
void delete_loop | ( | ) |
Removes LOOP from structures and frees its data.
References flow_loop_free(), flow_loop_tree_node_remove(), and loop::num.
Referenced by cancel_loop(), and unloop().
void disambiguate_loops_with_multiple_latches | ( | void | ) |
Split loops with multiple latch edges.
References disambiguate_multiple_latches(), and loop::latch.
Referenced by apply_loop_flags().
|
static |
LOOP may have several latch edges. Transform it into (possibly several) loops with single latch edge.
References dump_file, find_edge(), find_subloop_latch_edge(), form_subloop(), loop::header, merge_latch_edges(), loop::num, and split_edge().
Referenced by disambiguate_loops_with_multiple_latches().
|
static |
Dumps information about the exit in *SLOT to FILE. Callback for htab_traverse.
References edge_def::dest, loop_exit::e, basic_block_def::index, loop_exit::next_e, and edge_def::src.
Referenced by dump_recorded_exits().
void dump_recorded_exits | ( | FILE * | ) |
Dumps the recorded exits of loops to FILE.
void dump_recorded_exits | ( | ) |
References dump_recorded_exit().
|
static |
Records the vector of superloops of the loop LOOP, whose immediate superloop is FATHER.
References loop::inner, loop_depth(), loop::next, loop::superloops, and vec_alloc().
Referenced by flow_loop_tree_node_add().
|
static |
Fills dominance descendants inside LOOP of the basic block BB into array TOVISIT from index *TV.
References CDI_DOMINATORS, dominated_by_p(), first_dom_son(), flow_bb_inside_loop_p(), loop::latch, and next_dom_son().
Referenced by get_loop_body_in_dom_order().
|
read |
Finds nearest common ancestor in loop tree for given loops.
References loop_depth(), loop_outer(), and loop::superloops.
Referenced by add_exit_phi(), analyze_scalar_evolution_1(), find_exits(), fix_bb_placements(), fix_loop_placement(), force_nonfallthru(), instantiate_scev_name(), make_forwarder_block(), mark_irreducible_loops(), nb_common_loops(), outermost_invariant_loop(), redirect_edge_and_branch_force(), rescan_loop_exit(), scopdet_basic_block_info(), set_level(), and split_edge().
|
static |
If we can determine that one of the several latch edges of LOOP behaves as a latch edge of a separate subloop, returns this edge. Otherwise returns NULL.
References current_ir_type(), find_subloop_latch_edge_by_ivs(), find_subloop_latch_edge_by_profile(), get_loop_latch_edges(), IR_GIMPLE, and loop::latch.
Referenced by disambiguate_multiple_latches().
|
static |
Among LATCHES, guesses a latch edge of LOOP corresponding to subloop, based on the structure of induction variables. Returns this edge, or NULL if we do not find any. We are quite conservative, and look just for an obvious simple innermost loop (which is the case where we would lose the most performance by not disambiguating the loop). More precisely, we look for the following situation: The source of the chosen latch edge dominates sources of all the other latch edges. Additionally, the header does not contain a phi node such that the argument from the chosen edge is equal to the argument from another edge.
References CDI_DOMINATORS, edge_def::dest, dominated_by_p(), dump_file, flow_bb_inside_loop_p(), gimple_bb(), gsi_end_p(), gsi_next(), gsi_start_phis(), gsi_stmt(), loop::header, basic_block_def::index, loop::latch, and edge_def::src.
Referenced by find_subloop_latch_edge().
|
static |
If the profile info is available, finds an edge in LATCHES that much more frequent than the remaining edges. Returns such an edge, or NULL if we do not find one. We do not use guessed profile here, only the measured one. The guessed profile is usually too flat and unreliable for this (and it is mostly based on the loop structure of the program, so it does not make much sense to derive the loop structure from it).
References edge_def::count, edge_def::dest, dump_file, basic_block_def::index, and edge_def::src.
Referenced by find_subloop_latch_edge().
bool flow_bb_inside_loop_p | ( | ) |
Return nonzero if basic block BB belongs to LOOP.
References flow_loop_nested_p(), and basic_block_def::loop_father.
Referenced by add_exit_phi(), add_to_dst_predicate_list(), analyze_evolution_in_loop(), analyze_initial_condition(), analyze_scalar_evolution_1(), base_names_in_chain_on(), bb_in_loop_p(), chain_of_csts_start(), check_loop_closed_ssa_use(), classify_partition(), copy_loop_headers(), duplicate_loop_to_header_edge(), expr_invariant_in_loop_p(), fill_always_executed_in_1(), fill_sons_in_loop(), final_range_test_p(), find_exits(), find_interesting_uses(), find_simple_exit(), find_subloop_latch_edge_by_ivs(), find_uses_to_rename_use(), flow_loops_find(), follow_ssa_edge_inner_loop_phi(), get_initial_def_for_induction(), get_initial_def_for_reduction(), get_iv(), get_loop_body_in_bfs_order(), get_loop_exit_edges(), inhibit_phi_insertion(), inner_loop_header_p(), insert_into_preds_of_block(), ip_normal_pos(), is_reassociable_op(), iv_elimination_compare(), loop_exit_edge_p(), loop_to_lst(), mark_irreducible_loops(), may_eliminate_iv(), may_unswitch_on(), outermost_invariant_loop_for_expr(), phi_arg_in_outermost_loop(), predict_loops(), process_use(), record_invariant(), rename_variables_in_bb(), rescan_loop_exit(), scale_dominated_blocks_in_loop(), should_duplicate_loop_header_p(), tree_may_unswitch_on(), tree_unswitch_loop(), try_create_reduction_list(), unroll_loop_runtime_iterations(), unswitch_loop(), used_outside_reduction(), vect_analyze_loop_operations(), vect_create_epilog_for_reduction(), vect_detect_hybrid_slp_stmts(), vect_get_and_check_slp_defs(), vect_is_simple_iv_evolution(), vect_is_simple_reduction_1(), vect_is_simple_use(), vect_is_slp_reduction(), vect_loop_kill_debug_uses(), vect_mark_relevant(), vect_recog_dot_prod_pattern(), vect_same_loop_or_bb_p(), vect_stmt_relevant_p(), vect_transform_stmt(), vectorizable_induction(), vectorizable_reduction(), and verify_loop_structure().
void flow_loop_dump | ( | const struct loop * | loop, |
FILE * | file, | ||
void(*)(const struct loop *, FILE *, int) | loop_dump_aux, | ||
int | verbose | ||
) |
Dump the loop information specified by LOOP to the stream FILE using auxiliary dump callback function LOOP_DUMP_AUX if non null.
References free(), get_loop_body(), get_loop_latch_edges(), loop::header, basic_block_def::index, loop::latch, loop_depth(), loop_outer(), loop::num, loop::num_nodes, and edge_def::src.
Referenced by flow_loops_dump(), and tree_ssa_iv_optimize().
void flow_loop_free | ( | ) |
Free data allocated for LOOP.
References loop::exits, ggc_free(), loop_exit::next, loop_exit::prev, loop::superloops, and vec_free().
Referenced by delete_loop(), fix_loop_structure(), and flow_loops_free().
bool flow_loop_nested_p | ( | ) |
Return nonzero if the nodes of LOOP are a subset of OUTER.
References loop_depth(), and loop::superloops.
Referenced by add_dependency(), add_to_evolution_1(), chrec_component_in_loop_num(), chrec_contains_symbols_defined_in_loop(), chrec_evaluate(), chrec_fold_multiply_poly_poly(), chrec_fold_plus_poly_poly(), compute_live_loop_exits(), compute_overall_effect_of_inner_loop(), evolution_function_is_invariant_rec_p(), find_exits(), fix_bb_placement(), fix_bb_placements(), fix_loop_placement(), flow_bb_inside_loop_p(), follow_ssa_edge(), hide_evolution_in_other_loops_than_loop(), instantiate_scev_name(), ref_always_accessed::operator()(), process_use(), reset_evolution_in_loop(), set_level(), vect_enhance_data_refs_alignment(), and vect_is_simple_reduction_1().
int flow_loop_nodes_find | ( | ) |
Find the nodes contained within the LOOP with header HEADER. Return the number of nodes within the loop.
References CDI_DOMINATORS, dominated_by_p(), loop_exit::e, loop::header, basic_block_def::loop_father, basic_block_def::preds, edge_def::src, stack, and vNULL.
Referenced by flow_loops_find().
void flow_loop_tree_node_add | ( | ) |
Add LOOP to the loop hierarchy tree where FATHER is father of the added loop. If LOOP has some children, take care of that their pred field will be initialized correctly.
References establish_preds(), loop::inner, and loop::next.
Referenced by add_loop(), copy_loops(), duplicate_loop(), fix_loop_placement(), fix_loop_structure(), flow_loops_find(), input_cfg(), move_sese_region_to_fn(), and unloop().
void flow_loop_tree_node_remove | ( | ) |
Remove LOOP from the loop hierarchy tree.
References loop::inner, loop_outer(), loop::next, and loop::superloops.
Referenced by add_loop(), delete_loop(), fix_loop_placement(), fix_loop_structure(), flow_loops_find(), move_sese_region_to_fn(), and unloop().
|
static |
@verbatim Natural loop discovery code for GNU compiler.
Copyright (C) 2000-2013 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see http://www.gnu.org/licenses/.
Referenced by flow_loops_dump().
|
static |
Dump loop related CFG information.
References edge_def::dest, basic_block_def::index, and basic_block_def::succs.
void flow_loops_dump | ( | FILE * | file, |
void(*)(const struct loop *, FILE *, int) | loop_dump_aux, | ||
int | verbose | ||
) |
Dump the loop information about loops to the stream FILE, using auxiliary dump callback function LOOP_DUMP_AUX if non null.
References cfun, flow_loop_dump(), flow_loops_cfg_dump(), LI_INCLUDE_ROOT, and number_of_loops().
Referenced by analyze_function(), compute_alignments(), estimate_function_body_sizes(), loop_optimizer_init(), and tree_estimate_probability_driver().
|
read |
Find all the natural loops in the function and save in LOOPS structure and recalculate loop_father information in basic block structures. If LOOPS is non-NULL then the loop structures for already recorded loops will be re-used and their number will not change. We assume that no stale loops exist in LOOPS. When LOOPS is NULL it is allocated and re-built from scratch. Return the built LOOPS structure.
References alloc_loop(), bb_loop_header_p(), calculate_dominance_info(), CDI_DOMINATORS, cfun, dump_file, dump_flags, loops::exits, flow_bb_inside_loop_p(), flow_loop_nodes_find(), flow_loop_tree_node_add(), flow_loop_tree_node_remove(), free(), loop::header, basic_block_def::index, init_loops_structure(), loops::larray, loop::latch, basic_block_def::loop_father, loop::num, loop::num_nodes, pre_and_rev_post_order_compute(), basic_block_def::preds, edge_def::src, loops::tree_root, and vec_safe_push().
Referenced by fix_loop_structure(), input_cfg(), and loop_optimizer_init().
void flow_loops_free | ( | ) |
Free all the memory allocated for LOOPS.
References flow_loop_free(), loops::larray, and vec_free().
Referenced by loop_optimizer_finalize().
|
static |
Creates a subloop of LOOP with latch edge LATCH.
References add_loop(), alloc_loop(), edge_def::dest, loop::header, loop::latch, make_forwarder_block(), mfb_redirect_edges_in_set(), pointer_set_create(), pointer_set_destroy(), pointer_set_insert(), basic_block_def::preds, and edge_def::src.
Referenced by disambiguate_multiple_latches().
|
staticread |
Returns the list of records for E as an exit of a loop.
Referenced by verify_loop_structure().
basic_block* get_loop_body | ( | ) |
Gets basic blocks of a LOOP. Header is the 0-th block, rest is in dfs order against direction of edges from latch. Specially, if header != latch, latch is the 1-st block.
References get_loop_body_with_size(), loop::header, loop::latch, and loop::num_nodes.
Referenced by analyze_insns_in_loop(), average_num_loop_insns(), can_duplicate_loop_p(), cancel_loop(), doloop_valid_p(), draw_cfg_nodes_for_loop(), estimate_function_body_sizes(), estimate_loops_at_level(), find_interesting_uses(), find_simple_exit(), flow_loop_dump(), get_loop_body_in_custom_order(), get_loop_exit_edges(), infer_loop_bounds_from_undefined(), loop_only_exit_p(), loop_single_full_bb_p(), mark_loop_unsched(), new_loop_vec_info(), num_loop_branches(), num_loop_insns(), predict_loops(), referenced_in_one_insn_in_loop_p(), reset_debug_uses_in_loop(), scale_loop_frequencies(), tree_estimate_loop_size(), tree_num_loop_insns(), tree_ssa_iv_optimize_loop(), tree_unswitch_single_loop(), unloop(), unroll_loop_runtime_iterations(), unswitch_single_loop(), and update_dominators_in_loop().
basic_block* get_loop_body_in_bfs_order | ( | ) |
Get body of a LOOP in breadth first sort order.
References bitmap_set_bit(), edge_def::dest, flow_bb_inside_loop_p(), loop::header, basic_block_def::index, loop::latch, loop::num_nodes, basic_block_def::succs, and visited.
Referenced by draw_cfg_nodes_for_loop(), and get_loop_body_in_if_conv_order().
basic_block* get_loop_body_in_custom_order | ( | const struct loop * | loop, |
int(*)(const void *, const void *) | bb_comparator | ||
) |
Gets body of a LOOP sorted via provided BB_COMPARATOR.
References get_loop_body(), and loop::num_nodes.
basic_block* get_loop_body_in_dom_order | ( | ) |
Gets body of a LOOP (that must be different from the outermost loop) sorted by dominance relation. Additionally, if a basic block s dominates the latch, then only blocks dominated by s are be after it.
References fill_sons_in_loop(), loop::header, loop::latch, and loop::num_nodes.
Referenced by destroy_loop(), duplicate_loop_to_header_edge(), fill_always_executed_in_1(), find_data_references_in_loop(), find_givs(), find_invariants(), gather_memory_references(), generate_loops_for_partition(), get_loop_body_pbbs(), iv_analysis_loop_init(), loop_has_blocks_with_irreducible_flag(), loop_has_vector_phi_nodes(), loop_version(), rewrite_all_phi_nodes_with_iv(), stmts_from_loop(), transform_to_exit_first_loop(), tree_loop_distribution(), and tree_unroll_loops_completely().
unsigned get_loop_body_with_size | ( | const struct loop * | loop, |
basic_block * | body, | ||
unsigned | max_size | ||
) |
Gets basic blocks of a LOOP. Header is the 0-th block, rest is in dfs order against direction of edges from latch. Specially, if header != latch, latch is the 1-st block. LOOP cannot be the fake loop tree root, and its size must be at most MAX_SIZE. The blocks in the LOOP body are stored to BODY, and the size of the LOOP is returned.
References dfs_enumerate_from(), glb_enum_p(), and loop::header.
Referenced by add_loop(), get_loop_body(), slpeel_tree_duplicate_loop_to_edge_cfg(), and verify_loop_structure().
Returns the list of the exit edges of a LOOP.
References edge_def::dest, loop_exit::e, loop::exits, flow_bb_inside_loop_p(), free(), get_loop_body(), loop::latch, LOOPS_HAVE_RECORDED_EXITS, loops_state_satisfies_p(), loop_exit::next, loop::num_nodes, and vNULL.
Referenced by analyze_insns_in_loop(), collect_condition_stmts(), create_loop_tree_node_allocnos(), create_loop_tree_nodes(), emit_mfence_after_loop(), estimate_function_body_sizes(), estimate_numbers_of_iterations_loop(), find_loop_niter(), find_loop_niter_by_eval(), fix_loop_placement(), get_loops_exits(), ira_loop_edge_freq(), last_always_executed_block(), loop_edge_to_cancel(), may_use_storent_in_loop_p(), predict_loops(), scopdet_basic_block_info(), single_likely_exit(), and store_motion_loop().
Returns the list of the latch edges of LOOP.
References CDI_DOMINATORS, dominated_by_p(), loop::header, basic_block_def::preds, edge_def::src, and vNULL.
Referenced by find_subloop_latch_edge(), flow_loop_dump(), and merge_latch_edges().
location_t get_loop_location | ( | ) |
Return location corresponding to the loop control condition if possible.
References current_function_decl, get_simple_loop_desc(), loop::header, niter_desc::in_edge, loop::latch, single_exit(), and edge_def::src.
Referenced by decide_unrolling_and_peeling(), and peel_loops_completely().
|
static |
Enumeration predicate for get_loop_body_with_size.
References CDI_DOMINATORS, dominated_by_p(), and loop::header.
Referenced by get_loop_body_with_size().
Initializes loops structure LOOPS, reserving place for NUM_LOOPS loops (including the root of the loop tree).
References alloc_loop(), loop::header, loops::larray, loop::latch, memset(), loop::num_nodes, loops::tree_root, and vec_alloc().
Referenced by flow_loops_find(), init_lowered_empty_function(), input_cfg(), and move_sese_region_to_fn().
bool loop_exit_edge_p | ( | ) |
Returns true if E is an exit of LOOP.
References edge_def::dest, flow_bb_inside_loop_p(), and edge_def::src.
Referenced by bb_with_exit_edge_p(), combine_blocks(), copy_prop_visit_phi_node(), discover_iteration_bound_by_body_walk(), get_loop_hot_path(), if_convertible_loop_p(), loop_exits_from_bb_p(), loop_exits_to_bb_p(), mark_loop_exit_edges(), maybe_lower_iteration_bound(), remove_exits_and_undefined_stmts(), remove_redundant_iv_tests(), and thread_block().
|
static |
Equality function for struct loop_exit. Compares with edge.
References loop_exit::e.
Referenced by record_loop_exits().
|
static |
Frees the list of loop exit descriptions EX.
References ggc_free(), loop_exit::next, loop_exit::next_e, and loop_exit::prev.
Referenced by record_loop_exits(), and rescan_loop_exit().
|
static |
bool loop_exits_from_bb_p | ( | ) |
Returns true when BB has an outgoing edge exiting LOOP.
References loop_exit::e, loop_exit_edge_p(), and basic_block_def::succs.
bool loop_exits_to_bb_p | ( | ) |
Returns true when BB has an incoming edge exiting LOOP.
References loop_exit::e, loop_exit_edge_p(), and basic_block_def::preds.
Referenced by scopdet_basic_block_info().
edge loop_latch_edge | ( | ) |
Returns latch edge of LOOP.
References find_edge(), loop::header, and loop::latch.
Referenced by add_old_iv_candidates(), copy_loop_headers(), create_iv(), create_parallel_loop(), create_preheader(), create_single_entry_edge(), discover_iteration_bound_by_body_walk(), duplicate_loop_to_header_edge(), eliminate_temp_copies(), estimate_loops_at_level(), find_looparound_phi(), get_base_for(), get_initial_def_for_induction(), initialize_root_vars(), initialize_root_vars_lm(), loop_niter_by_eval(), mark_bivs(), maybe_lower_iteration_bound(), schedule_expr_on_boundary(), setup_current_loop_nest(), sms_schedule(), thread_block(), thread_through_loop_header(), tree_transform_and_unroll_loop(), unloop_loops(), unroll_loop_constant_iterations(), unroll_loop_runtime_iterations(), unroll_loop_stupid(), vect_create_epilog_for_reduction(), vect_is_simple_reduction_1(), vectorizable_induction(), vectorizable_load(), and verify_loop_structure().
edge loop_preheader_edge | ( | ) |
Returns preheader edge of LOOP.
References loop_exit::e, loop::header, loop::latch, LOOPS_HAVE_PREHEADERS, loops_state_satisfies_p(), basic_block_def::preds, and edge_def::src.
Referenced by analyze_insns_in_loop(), block_before_loop(), canonicalize_loop_ivs(), copy_loop_before(), copy_loop_headers(), create_empty_loop_on_edge(), create_iv(), create_parallel_loop(), destroy_loop(), determine_exit_conditions(), doloop_modify(), execute_sm(), find_bivs(), find_looparound_phi(), fix_loop_placements(), gen_parallel_loop(), generate_memcpy_builtin(), generate_memset_builtin(), generate_prolog_epilog(), get_base_for(), get_initial_def_for_induction(), initialize_reductions(), initialize_root_vars(), initialize_root_vars_lm(), loop_niter_by_eval(), loop_version(), move_computations_stmt(), move_invariant_reg(), parallelize_loops(), peel_loop_completely(), peel_loop_simple(), prepare_initializers_chain(), rewrite_use_compare(), simplify_using_entry_checks(), simplify_using_initial_values(), slpeel_can_duplicate_loop_p(), slpeel_tree_duplicate_loop_to_edge_cfg(), slpeel_tree_peel_loop_to_edge(), slpeel_update_phi_nodes_for_guard1(), slpeel_verify_cfg_after_peeling(), sms_schedule(), tree_transform_and_unroll_loop(), try_unroll_loop_completely(), unloop(), unroll_loop_constant_iterations(), unroll_loop_runtime_iterations(), unswitch_loop(), vect_build_loop_niters(), vect_create_data_ref_ptr(), vect_create_epilog_for_reduction(), vect_do_peeling_for_alignment(), vect_do_peeling_for_loop_bound(), vect_gen_niters_for_prolog_loop(), vect_generate_tmps_on_preheader(), vect_get_constant_vectors(), vect_get_vec_def_for_operand(), vect_init_vector_1(), vect_recog_rotate_pattern(), vect_setup_realignment(), vect_transform_loop(), vect_update_ivs_after_vectorizer(), vectorizable_load(), and vectorizable_reduction().
|
static |
Make all the latch edges of LOOP to go to a single forwarder block -- a new latch of LOOP.
References edge_def::dest, dump_file, get_loop_latch_edges(), loop::header, loop::latch, make_forwarder_block(), mfb_redirect_edges_in_set(), loop::num, pointer_set_create(), pointer_set_destroy(), pointer_set_insert(), and edge_def::src.
Referenced by disambiguate_multiple_latches().
|
static |
References pointer_set_contains().
Referenced by form_subloop(), and merge_latch_edges().
unsigned num_loop_branches | ( | ) |
Counts the number of conditional branches inside LOOP.
References free(), get_loop_body(), loop::latch, and loop::num_nodes.
Referenced by decide_peel_simple(), and decide_unroll_stupid().
void record_loop_exits | ( | void | ) |
For each loop, record list of exit edges, and start maintaining these lists.
References cfun, loop_exit_eq(), loop_exit_free(), loop_exit_hash(), LOOPS_HAVE_RECORDED_EXITS, loops_state_satisfies_p(), loops_state_set(), number_of_loops(), rescan_loop_exit(), and basic_block_def::succs.
Referenced by apply_loop_flags(), and tree_estimate_probability().
void release_recorded_exits | ( | void | ) |
Releases lists of loop exits.
References LOOPS_HAVE_RECORDED_EXITS, loops_state_clear(), and loops_state_satisfies_p().
Referenced by fix_loop_structure(), graphite_finalize(), loop_optimizer_finalize(), and loop_optimizer_init().
void remove_bb_from_loops | ( | ) |
Remove basic block BB from loops.
References basic_block_def::loop_father, loop::num_nodes, basic_block_def::preds, rescan_loop_exit(), basic_block_def::succs, and loop::superloops.
Referenced by add_loop(), delete_basic_block(), fix_bb_placement(), loopify(), make_forwarder_block(), merge_blocks(), thread_through_loop_header(), and unloop().
void rescan_loop_exit | ( | ) |
Updates the lists of loop exits in that E appears. If REMOVED is true, E is being removed, and we just remove it from the lists of exits. If NEW_EDGE is true and E is not a loop exit, we do not try to remove it from loop exit lists.
References edge_def::dest, loop::exits, find_common_loop(), flow_bb_inside_loop_p(), loop_exit_free(), basic_block_def::loop_father, loop_outer(), LOOPS_HAVE_RECORDED_EXITS, loops_state_satisfies_p(), loop_exit::next, loop_exit::next_e, loop_exit::prev, and edge_def::src.
Referenced by add_bb_to_loop(), add_loop(), create_edge_and_update_destination_phis(), destroy_loop(), fix_loop_placement(), force_nonfallthru(), gimple_duplicate_sese_tail(), merge_blocks(), record_loop_exits(), redirect_edge_and_branch(), redirect_edge_and_branch_force(), remove_bb_from_loops(), remove_edge(), split_edge(), and tree_transform_and_unroll_loop().
edge single_exit | ( | ) |
Returns the single exit edge of LOOP, or NULL if LOOP has either no exit or more than one exit. If loops do not have the exits recorded, NULL is returned always.
References loop_exit::e, loop::exits, LOOPS_HAVE_RECORDED_EXITS, loops_state_satisfies_p(), and loop_exit::next.
Referenced by canonicalize_loop_closed_ssa(), canonicalize_loop_induction_variables(), create_bb_after_loop(), create_empty_loop_on_edge(), destroy_loop(), do_warn_aggressive_loop_optimizations(), gen_parallel_loop(), generate_prolog_epilog(), get_bb_type(), get_loop_exit_condition(), get_loop_location(), graphite_can_represent_loop(), if_convertible_loop_p(), limit_scops(), loop_canon_p(), loop_closed_phi_def(), loop_only_exit_p(), number_of_iterations_exit(), number_of_latch_executions(), rewrite_commutative_reductions_out_of_ssa_loop(), scale_loop_profile(), scev_const_prop(), scopdet_basic_block_info(), single_dom_exit(), single_likely_exit(), slpeel_can_duplicate_loop_p(), slpeel_make_loop_iterate_ntimes(), slpeel_tree_duplicate_loop_to_edge_cfg(), slpeel_tree_peel_loop_to_edge(), slpeel_update_phi_nodes_for_guard1(), slpeel_update_phi_nodes_for_guard2(), slpeel_verify_cfg_after_peeling(), sms_schedule(), translate_clast_for_loop(), tree_loop_distribution(), vect_analyze_loop_form(), vect_analyze_loop_operations(), vect_create_epilog_for_reduction(), vect_do_peeling_for_loop_bound(), vect_enhance_data_refs_alignment(), vect_loop_versioning(), vect_stmt_relevant_p(), vect_update_ivs_after_vectorizer(), and vectorizable_live_operation().
|
read |
Returns the loop such that LOOP is nested DEPTH (indexed from zero) loops within LOOP.
References loop_depth(), and loop::superloops.
Referenced by compute_live_loop_exits(), compute_scalar_evolution_in_loop(), determine_max_movement(), find_sibling_superloop(), interpret_loop_phi(), outermost_indep_loop(), outermost_invariant_loop(), outermost_invariant_loop_for_expr(), scalar_evolution_in_region(), and scev_const_prop().
DEBUG_FUNCTION void verify_loop_structure | ( | void | ) |
Checks that information about loops is correct -- sizes of loops are all right -- results of get_loop_body really belong to the loop -- loop header have just single entry edge and single latch edge -- loop latches have only single successor that is header of their loop -- irreducible loops are correctly marked -- the cached loop depth and loop father of each bb is correct
References bb_loop_header_p(), bitmap_bit_p(), bitmap_clear(), bitmap_clear_bit(), bitmap_set_bit(), calculate_dominance_info(), CDI_DOMINATORS, cfun, edge_def::dest, dom_info_available_p(), dominated_by_p(), loop_exit::e, error(), loop::exits, find_edge(), edge_def::flags, basic_block_def::flags, flow_bb_inside_loop_p(), free(), free_dominance_info(), get_exit_descriptions(), get_loop_body_with_size(), loop::header, basic_block_def::index, loop::latch, LI_FROM_INNERMOST, basic_block_def::loop_father, loop_latch_edge(), loop_outer(), LOOPS_HAVE_MARKED_IRREDUCIBLE_REGIONS, LOOPS_HAVE_PREHEADERS, LOOPS_HAVE_RECORDED_EXITS, LOOPS_HAVE_SIMPLE_LATCHES, LOOPS_NEED_FIXUP, loops_state_satisfies_p(), mark_irreducible_loops(), memset(), loop_exit::next, loop_exit::next_e, loop::num, loop::num_nodes, number_of_loops(), basic_block_def::preds, sbitmap_alloc(), sbitmap_free(), single_succ(), single_succ_p(), edge_def::src, basic_block_def::succs, verify_dominators(), and visited.
Referenced by create_sese_edges(), doloop_optimize_loops(), fix_loop_structure(), graphite_verify(), loop_optimizer_init(), repair_loop_structures(), tree_loop_distribution(), and tree_transform_and_unroll_loop().
|
static |
Callback for make_forwarder_block. Returns true if the edge E is marked in the set MFB_REIS_SET.