GCC Middle and Back End API Reference
|
#include "cfgloopmanip.h"
Go to the source code of this file.
Data Structures | |
struct | lpt_decision |
class | nb_iter_bound |
struct | loop_exit |
struct | loop_exit_hasher |
struct | control_iv |
class | loop |
struct | loops |
class | rtx_iv |
class | niter_desc |
class | loops_list |
class | loops_list::Iter< T > |
struct | target_cfgloop |
Macros | |
#define | LOOP_C_INFINITE (1 << 0) |
#define | LOOP_C_FINITE (1 << 1) |
#define | LOOPS_NORMAL |
#define | AVOID_CFG_MODIFICATIONS (LOOPS_MAY_HAVE_MULTIPLE_LATCHES) |
#define | this_target_cfgloop (&default_target_cfgloop) |
#define | target_avail_regs (this_target_cfgloop->x_target_avail_regs) |
#define | target_clobbered_regs (this_target_cfgloop->x_target_clobbered_regs) |
#define | target_res_regs (this_target_cfgloop->x_target_res_regs) |
#define | target_reg_cost (this_target_cfgloop->x_target_reg_cost) |
#define | target_spill_cost (this_target_cfgloop->x_target_spill_cost) |
Typedefs | |
typedef generic_wide_int< fixed_wide_int_storage< WIDE_INT_MAX_INL_PRECISION > > | bound_wide_int |
typedef class loop * | loop_p |
Enumerations | |
enum | lpt_dec { LPT_NONE , LPT_UNROLL_CONSTANT , LPT_UNROLL_RUNTIME , LPT_UNROLL_STUPID } |
enum | iv_extend_code { IV_SIGN_EXTEND , IV_ZERO_EXTEND , IV_UNKNOWN_EXTEND } |
enum | loop_estimation { EST_NOT_COMPUTED , EST_AVAILABLE , EST_LAST } |
enum | { LOOPS_HAVE_PREHEADERS = 1 , LOOPS_HAVE_SIMPLE_LATCHES = 2 , LOOPS_HAVE_MARKED_IRREDUCIBLE_REGIONS = 4 , LOOPS_HAVE_RECORDED_EXITS = 8 , LOOPS_MAY_HAVE_MULTIPLE_LATCHES = 16 , LOOP_CLOSED_SSA = 32 , LOOPS_NEED_FIXUP = 64 , LOOPS_HAVE_FALLTHRU_PREHEADERS = 128 } |
enum | li_flags { LI_INCLUDE_ROOT = 1 , LI_FROM_INNERMOST = 2 , LI_ONLY_INNERMOST = 4 } |
enum | { UAP_UNROLL = 1 , UAP_UNROLL_ALL = 2 } |
Variables | |
struct target_cfgloop | default_target_cfgloop |
#define AVOID_CFG_MODIFICATIONS (LOOPS_MAY_HAVE_MULTIPLE_LATCHES) |
#define LOOP_C_FINITE (1 << 1) |
Set if the loop is known to be finite without any assumptions.
Referenced by number_of_iterations_exit_assumptions(), try_vectorize_loop_1(), vect_analyze_loop(), vect_free_loop_info_assumptions(), and vect_loop_versioning().
#define LOOP_C_INFINITE (1 << 0) |
Set if the loop is known to be infinite.
Referenced by number_of_iterations_exit_assumptions(), and vect_do_peeling().
#define LOOPS_NORMAL |
Referenced by analyze_function_body(), execute_ranger_vrp(), perform_tree_ssa_dce(), report_predictor_hitrates(), rtl_loop_init(), scev_initialize(), and split_paths().
#define target_avail_regs (this_target_cfgloop->x_target_avail_regs) |
Referenced by determine_set_costs(), estimate_reg_pressure_cost(), init_set_costs(), and ivopts_estimate_reg_pressure().
#define target_clobbered_regs (this_target_cfgloop->x_target_clobbered_regs) |
Referenced by determine_set_costs(), estimate_reg_pressure_cost(), init_set_costs(), and ivopts_estimate_reg_pressure().
#define target_reg_cost (this_target_cfgloop->x_target_reg_cost) |
Referenced by determine_set_costs(), estimate_reg_pressure_cost(), init_set_costs(), and ivopts_estimate_reg_pressure().
#define target_res_regs (this_target_cfgloop->x_target_res_regs) |
Referenced by estimate_reg_pressure_cost(), init_set_costs(), and ivopts_estimate_reg_pressure().
#define target_spill_cost (this_target_cfgloop->x_target_spill_cost) |
#define this_target_cfgloop (&default_target_cfgloop) |
anonymous enum |
enum iv_extend_code |
enum li_flags |
enum loop_estimation |
enum lpt_dec |
Natural loop functions Copyright (C) 1987-2024 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>.
Structure to hold decision about unrolling/peeling.
Enumerator | |
---|---|
LPT_NONE | |
LPT_UNROLL_CONSTANT | |
LPT_UNROLL_RUNTIME | |
LPT_UNROLL_STUPID |
|
extern |
Adds basic block BB to LOOP.
References loop_exit::e, FOR_EACH_EDGE, FOR_EACH_VEC_SAFE_ELT, gcc_assert, i, basic_block_def::loop_father, NULL, loop::num_nodes, basic_block_def::preds, rescan_loop_exit(), basic_block_def::succs, and loop::superloops.
Referenced by add_loop(), rt_bb_visited::check(), cleanup_tree_cfg_noloop(), 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_for_init_vars(), expand_omp_sections(), expand_omp_simd(), expand_omp_target(), expand_parallel_call(), expand_thunk(), expand_transaction(), extract_omp_for_update_vars(), fix_bb_placement(), force_nonfallthru(), gimple_find_sub_bbs(), gsi_insert_finally_seq_after_call(), init_lowered_empty_function(), insert_check_and_trap(), insert_cond_bb(), rt_bb_visited::insert_exit_check_on_edge(), loop_version(), lower_resx(), make_forwarder_block(), merge_blocks(), merge_loop_tree(), move_sese_region_to_fn(), optimize_mask_stores(), redirect_edge_and_branch_force(), simd_clone_adjust(), sjlj_emit_dispatch_table(), split_block_1(), split_edge(), split_function(), ubsan_expand_null_ifn(), ubsan_expand_ptr_ifn(), unloop(), and unloop_loops().
class loop * alloc_loop | ( | void | ) |
Allocates and returns new loop structure.
References loop::can_be_parallel, loop::constraints, loop::exits, ggc_cleared_alloc(), loop::nb_iterations_estimate, loop::nb_iterations_likely_upper_bound, loop::nb_iterations_upper_bound, loop_exit::next, and loop_exit::prev.
Referenced by copy_loops(), create_empty_loop_on_edge(), duplicate_loop(), eliminate_tail_call(), expand_oacc_for(), expand_omp_atomic_pipeline(), expand_omp_for_generic(), expand_omp_for_ordered_loops(), expand_omp_for_static_chunk(), expand_omp_for_static_nochunk(), expand_omp_simd(), expand_omp_taskloop_for_inner(), flow_loops_find(), form_subloop(), init_loops_structure(), input_cfg(), loop_version(), and simd_clone_adjust().
Provide the functionality of std::as_const to support range-based for to use const iterator. (We can't use std::as_const itself because it's a C++17 feature.)
|
extern |
Counts number of insns executed on average per iteration LOOP.
References basic_block_def::count, FOR_BB_INSNS, free(), get_loop_body(), loop::header, i, loop::ninsns, NONDEBUG_INSN_P, loop::num_nodes, and profile_count::to_sreal_scale().
Referenced by decide_unrolling().
|
extern |
Returns the loop depth of the loop BB belongs to.
References loop_depth(), and basic_block_def::loop_father.
Referenced by analyze_function_body(), combine_and_move_insns(), compute_alignments(), dump_bb_info(), get_value_locus_in_path(), insert_into_preds_of_block(), select_best_block(), split_live_ranges_for_shrink_wrap(), update_equiv_regs(), and vect_loop_versioning().
bool bb_loop_header_p | ( | basic_block | header | ) |
Loop recognition.
Returns whether HEADER is a loop header.
References bb_has_abnormal_pred(), CDI_DOMINATORS, cfun, dominated_by_p(), ENTRY_BLOCK_PTR_FOR_FN, FOR_EACH_EDGE, header, and loop::latch.
Referenced by crc_optimization::cond_depends_on_crc(), crc_optimization::find_shift_after_xor(), fix_loop_structure(), flow_loops_find(), vect_optimize_slp_pass::is_cfg_latch_edge(), remove_forwarder_block_with_phi(), crc_optimization::set_crc_and_data_phi(), crc_optimization::set_defs(), tree_forwarder_block_p(), and verify_loop_structure().
|
extern |
Checks whether definition of register REG in INSN is a basic induction variable. MODE is the mode of REG. IV analysis must have been initialized (via a call to iv_analysis_loop_init) for this function to produce a result.
References const0_rtx, df_find_def(), gcc_assert, iv_analyze_biv(), latch_dominating_def(), rtx_iv::mode, NULL, simple_reg_p(), and iv::step.
Referenced by analyze_iv_to_split_insn().
|
extern |
Cancels LOOP and all its subloops.
References cancel_loop(), cancel_loop_tree(), and loop::inner.
Referenced by cancel_loop_tree(), destroy_loop(), and remove_path().
|
inline |
Check loop structure invariants, if internal consistency checks are enabled.
References LOOPS_NEED_FIXUP, loops_state_clear(), and verify_loop_structure().
Referenced by doloop_optimize_loops(), loop_distribution::execute(), fix_loop_structure(), loop_optimizer_init(), repair_loop_structures(), and tree_transform_and_unroll_loop().
|
extern |
Removes LOOP from structures and frees its data.
References current_loops, flow_loop_free(), flow_loop_tree_node_remove(), NULL, and loop::num.
Referenced by cancel_loop(), fuse_loops(), and unloop().
|
extern |
Split loops with multiple latch edges.
References cfun, disambiguate_multiple_latches(), and loop::latch.
Referenced by apply_loop_flags().
Perform doloop optimizations Copyright (C) 2004-2024 Free Software Foundation, Inc. Based on code by Michael P. Hayes (m.hayes@elec.canterbury.ac.nz) 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 module is used to modify loops with a determinable number of iterations to use special low-overhead looping instructions. It first validates whether the loop is well behaved and has a determinable number of iterations (either at compile or run-time). It then modifies the loop to use a low-overhead looping pattern as follows: 1. A pseudo register is allocated as the loop iteration counter. 2. The number of loop iterations is calculated and is stored in the loop counter. 3. At the end of the loop, the jump insn is replaced by the doloop_end pattern. The compare must remain because it might be used elsewhere. If the loop-variable or condition register are used elsewhere, they will be eliminated by flow. 4. An optional doloop_begin pattern is inserted at the top of the loop. TODO The optimization should only performed when either the biv used for exit condition is unused at all except for the exit test, or if we do not have to change its value, since otherwise we have to add a new induction variable, which usually will not pay up (unless the cost of the doloop pattern is somehow extremely lower than the cost of compare & jump, or unless the bct register cannot be used for anything else but doloop -- ??? detect these cases).
Return the loop termination condition for PATTERN or zero if it is not a decrement and branch jump insn.
References const0_rtx, const1_rtx, CONST_INT_P, GEN_INT, GET_CODE, INSN_P, INTVAL, NULL, NULL_RTX, PATTERN(), pc_rtx, prev_nondebug_insn(), REG_P, rtx_equal_p(), SET, SET_DEST, SET_SRC, XEXP, and XVECEXP.
Referenced by doloop_optimize().
|
extern |
This is the main entry point. Process all loops using doloop_optimize.
References can_use_doloop_if_innermost(), cfun, checking_verify_loop_structure(), df_analyze(), df_live, df_live_add_problem(), df_live_set_all_dirty(), df_remove_problem(), doloop_optimize(), iv_analysis_done(), LI_FROM_INNERMOST, LI_ONLY_INNERMOST, and targetm.
|
extern |
Register pressure estimation for induction variable optimizations & loop invariant motion.
Estimates cost of increased register pressure caused by making N_NEW new registers live around the loop. N_OLD is the number of registers live around the loop. If CALL_P is true, also take into account that call-used registers may be clobbered in the loop body, reducing the number of available registers before we spill.
References cfun, IRA_REGION_ALL, IRA_REGION_MIXED, number_of_loops(), target_avail_regs, target_clobbered_regs, target_reg_cost, target_res_regs, and target_spill_cost.
Referenced by gain_for_invariant().
|
extern |
Returns expected number of LOOP iterations. The returned value is bounded by REG_BR_PROB_BASE.
References expected_loop_iterations_unbounded(), and REG_BR_PROB_BASE.
Referenced by determine_loop_nest_reuse().
|
extern |
Return true if BB profile can be used to determine the expected number of iterations (that is number of executions of latch edge(s) for each entry of the loop. If this is the case initialize RET with the number of iterations. RELIABLE is set if profile indiates that the returned value should be realistic estimate. (This is the case if we read profile and did not messed it up yet and not the case of guessed profiles.) This function uses only CFG profile. We track more reliable info in loop_info structure and for loop optimization heuristics more relevant is get_estimated_loop_iterations API.
References basic_block_def::count, profile_count::differs_from_p(), dump_file, dump_flags, loop::header, profile_count::initialized_p(), loop_count_in(), profile_count::nonzero_p(), loop::num, profile_count::reliable_p(), and TDF_DETAILS.
Referenced by branch_prob(), estimate_numbers_of_iterations(), expected_loop_iterations_unbounded(), get_estimated_loop_iterations(), maybe_flat_loop_profile(), print_loop_info(), and scale_loop_profile().
Returns expected number of iterations of LOOP, according to measured or guessed profile. This functions attempts to return "sane" value even if profile information is not good enough to derive osmething.
References expected_loop_iterations_by_profile(), get_max_loop_iterations_int(), and sreal::to_nearest_int().
Referenced by expected_loop_iterations().
Finds nearest common ancestor in loop tree for given loops.
References loop_depth(), loop_outer(), and loop::superloops.
Referenced by add_exit_phi(), cleanup_tree_cfg_noloop(), expand_gimple_cond(), find_exits(), fix_bb_placements(), fix_loop_placement(), force_nonfallthru(), get_minimal_bb(), instantiate_scev_name(), make_forwarder_block(), mark_irreducible_loops(), nb_common_loops(), outermost_invariant_loop(), loop_distribution::pg_add_dependence_edges(), redirect_edge_and_branch_force(), rescan_loop_exit(), set_level(), and split_edge().
unsigned fix_loop_structure | ( | bitmap | changed_bbs | ) |
The structure of loops might have changed. Some loops might get removed (and their headers and latches were set to NULL), loop exists might get removed (thus the loop nesting may be wrong), and some blocks and edges were changed (so the information about bb --> loop mapping does not have to be correct). But still for the remaining loops the header dominates the latch, and loops did not get new subloops (new loops might possibly get created, but we are not interested in them). Fix up the mess. If CHANGED_BBS is not NULL, basic blocks whose loop depth has changed are marked in it. Returns the number of new discovered plus the number of removed loops.
References apply_loop_flags(), basic_block_def::aux, BASIC_BLOCK_FOR_FN, basic_block_info_for_fn, bb_loop_header_p(), bitmap_set_bit, CDI_DOMINATORS, cfun, checking_verify_loop_structure(), current_loops, dom_info_state(), DOM_OK, dump_file, dump_flags, flow_loop_free(), flow_loop_tree_node_add(), flow_loop_tree_node_remove(), flow_loops_find(), FOR_EACH_BB_FN, FOR_EACH_VEC_ELT, loop::former_header, gcc_assert, get_loops(), loop::header, i, basic_block_def::index, loop::inner, LI_FROM_INNERMOST, loop_depth(), basic_block_def::loop_father, loop_outer(), LOOPS_HAVE_RECORDED_EXITS, LOOPS_NEED_FIXUP, loops_state_clear(), loops_state_satisfies_p(), NULL, loop::num, number_of_loops(), release_recorded_exits(), scev_initialized_p(), scev_reset_htab(), TDF_DETAILS, timevar_pop(), and timevar_push().
Referenced by cleanup_cfg(), loop_optimizer_init(), repair_loop_structures(), tree_function_versioning(), and unroll_loops().
|
extern |
Return nonzero if basic block BB belongs to LOOP.
References cfun, ENTRY_BLOCK_PTR_FOR_FN, EXIT_BLOCK_PTR_FOR_FN, flow_loop_nested_p(), and basic_block_def::loop_father.
Referenced by add_exit_phi(), add_to_dst_predicate_list(), add_to_predicate_list(), analyze_evolution_in_loop(), loop_cand::analyze_iloop_reduction_var(), analyze_initial_condition(), loop_cand::analyze_oloop_reduction_var(), analyze_scalar_evolution_1(), base_names_in_chain_on(), bb_in_loop_p(), can_move_invariant_reg(), chain_of_csts_start(), check_exit_phi(), check_loop_closed_ssa_def(), check_reduction_path(), classify_builtin_st(), compute_access_stride(), compute_added_num_insns(), create_rdg_cd_edges(), duplicate_loop_body_to_header_edge(), rpo_elim::eliminate_avail(), eliminate_dom_walker::eliminate_stmt(), evaluate_bbs(), crc_symbolic_execution::execute_crc_loop(), expr_invariant_in_loop_p(), fill_always_executed_in_1(), fill_sons_in_loop(), final_range_test_p(), find_exits(), find_interesting_uses(), find_inv_vars_cb(), find_loop_guard(), crc_optimization::find_shift_after_xor(), find_simple_exit(), find_subloop_latch_edge_by_ivs(), find_unswitching_predicates_for_bb(), find_uses_to_rename_use(), find_vdef_in_loop(), flow_loops_find(), scev_dfs::follow_ssa_edge_inner_loop_phi(), for_all_locs_in_loop(), get_cond_invariant_branch(), get_control_equiv_head_block(), get_iv(), get_loop_body_in_bfs_order(), get_loop_exit_edges(), hoist_defs_of_uses(), hoist_guard(), init_loop_unswitch_info(), inner_loop_header_p(), insert_into_preds_of_block(), ip_normal_pos(), is_cond_scalar_reduction(), is_inv_store_elimination_chain(), is_reassociable_op(), crc_symbolic_execution::is_used_outside_the_loop(), iv_elimination_compare(), loop_combined_static_and_iv_p(), loop_count_in(), loop_exit_edge_p(), loop_invariant_op_p(), loop_inverted_rev_post_order_compute(), loop_iter_phi_semi_invariant_p(), loop_rev_post_order_compute(), loop_static_op_p(), mark_irreducible_loops(), may_eliminate_iv(), tree_loop_interchange::move_code_to_inner_loop(), outermost_invariant_loop_for_expr(), parloops_is_simple_reduction(), parloops_is_slp_reduction(), crc_optimization::passes_checks_for_def_chain(), predict_loops(), predict_paths_for_bb(), record_invariant(), rename_variables_in_bb(), rescan_loop_exit(), scale_dominated_blocks_in_loop(), should_duplicate_loop_header_p(), single_use_in_loop(), slpeel_tree_duplicate_loop_to_edge_cfg(), ssa_name_has_uses_outside_loop_p(), ssa_semi_invariant_p(), crc_symbolic_execution::symb_execute_crc_loop(), tree_unswitch_loop(), try_create_reduction_list(), unroll_jam_possible_p(), unroll_loop_runtime_iterations(), used_outside_loop_p(), vect_create_epilog_for_reduction(), vect_do_peeling(), vect_is_simple_iv_evolution(), vect_is_simple_reduction(), vect_loop_dist_alias_call(), vect_loop_kill_debug_uses(), vect_loop_versioning(), vect_phi_first_order_recurrence_p(), vect_stmt_relevant_p(), vectorizable_early_exit(), vectorizable_induction(), vectorizable_live_operation(), and verify_loop_structure().
|
extern |
Dump the loop information specified by LOOP to the stream FILE using auxiliary dump callback function LOOP_DUMP_AUX if non null.
References FOR_EACH_VEC_ELT, free(), get_loop_body(), get_loop_latch_edges(), loop::header, i, basic_block_def::index, loop::latch, loop_depth(), loop_outer(), loop::num, loop::num_nodes, print_loop_info(), and verbose.
Referenced by analyze_and_mark_doloop_use(), flow_loops_dump(), and tree_ssa_iv_optimize().
|
extern |
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().
Return nonzero if the nodes of LOOP are a subset of OUTER.
References loop_depth(), and loop::superloops.
Referenced by add_dependency(), add_other_self_distances(), scev_dfs::add_to_evolution_1(), build_classic_dist_vector_1(), jt_path_registry::cancel_invalid_paths(), chrec_component_in_loop_num(), chrec_contains_symbols(), chrec_contains_symbols_defined_in_loop(), chrec_evaluate(), chrec_fold_multiply_poly_poly(), chrec_fold_plus_poly_poly(), compute_access_strides(), compute_live_loop_exits(), compute_overall_effect_of_inner_loop(), evolution_function_is_invariant_rec_p(), evolution_function_is_univariate_p(), find_exits(), find_ref_loc_in_loop_cmp(), fix_bb_placement(), fix_bb_placements(), fix_loop_placement(), flow_bb_inside_loop_p(), scev_dfs::follow_ssa_edge_expr(), forward_propagate_into(), get_coldest_out_loop(), hide_evolution_in_other_loops_than_loop(), instantiate_scev_name(), fwd_jt_path_registry::mark_threaded_blocks(), move_computations_worker(), ref_always_accessed::operator()(), optimize_mask_stores(), parloops_is_simple_reduction(), process_bb(), process_use(), remove_edge_and_dominated_blocks(), reset_evolution_in_loop(), set_level(), fwd_jt_path_registry::thread_block_1(), vect_do_peeling(), vect_enhance_data_refs_alignment(), vect_is_simple_reduction(), vect_loop_versioning(), vect_slp_function(), and vectorizable_live_operation().
int flow_loop_nodes_find | ( | basic_block | header, |
class loop * | loop ) |
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, FOR_EACH_EDGE, header, loop::header, basic_block_def::loop_father, basic_block_def::preds, and vNULL.
Referenced by flow_loops_find().
Loop data structure manipulation/querying.
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. If AFTER is non-null then it's expected it's a pointer into FATHERs inner sibling list and LOOP is added behind AFTER, otherwise it's added in front of FATHERs siblings.
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(), merge_loop_tree(), move_sese_region_to_fn(), and unloop().
|
extern |
Remove LOOP from the loop hierarchy tree.
References loop::inner, loop_outer(), loop::next, NULL, and loop::superloops.
Referenced by add_loop(), delete_loop(), fix_loop_placement(), fix_loop_structure(), flow_loops_find(), merge_loop_tree(), move_sese_region_to_fn(), and unloop().
|
extern |
Dump the loop information about loops to the stream FILE, using auxiliary dump callback function LOOP_DUMP_AUX if non null.
References cfun, current_loops, flow_loop_dump(), flow_loops_cfg_dump(), LI_INCLUDE_ROOT, number_of_loops(), and verbose.
Referenced by analyze_function_body(), compute_alignments(), finite_function_p(), loop_optimizer_init(), and report_predictor_hitrates().
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(), b, BASIC_BLOCK_FOR_FN, 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(), FOR_EACH_EDGE, free(), gcc_assert, ggc_cleared_alloc(), header, loop::header, i, init_loops_structure(), loops::larray, loop::latch, n_basic_blocks_for_fn, NULL, loop::num, NUM_FIXED_BLOCKS, loop::num_nodes, pre_and_rev_post_order_compute(), TDF_DETAILS, loops::tree_root, and vec_safe_push().
Referenced by fix_loop_structure(), input_cfg(), and loop_optimizer_init().
|
extern |
Free all the memory allocated for LOOPS.
References flow_loop_free(), FOR_EACH_VEC_SAFE_ELT, i, loops::larray, and vec_free().
Referenced by loop_optimizer_finalize().
|
extern |
Releases simple loop description for LOOP.
References ggc_free(), NULL, loop::simple_loop_desc, and simple_loop_desc().
Referenced by loop_optimizer_finalize().
|
inline |
Converts VAL to widest_int.
References a, and HOST_BITS_PER_WIDE_INT.
|
extern |
Sets NIT to the estimated number of executions of the latch of the LOOP. If we have no reliable estimate, the function returns false, otherwise returns true.
References loop::any_estimate, expected_loop_iterations_by_profile(), loop::nb_iterations_estimate, SIGNED, and sreal::to_nearest_int().
Referenced by decide_unroll_constant_iterations(), decide_unroll_runtime_iterations(), decide_unroll_stupid(), estimated_loop_iterations(), and get_estimated_loop_iterations_int().
|
extern |
Similar to get_estimated_loop_iterations, but returns the estimate only if it fits to HOST_WIDE_INT. If this is not the case, or the estimate on the number of iterations of LOOP could not be derived, returns -1.
References wi::fits_shwi_p(), get_estimated_loop_iterations(), and generic_wide_int< storage >::to_shwi().
Referenced by doloop_optimize(), find_simple_exit(), and generic_predict_doloop_p().
Calculates value of IV at ITERATION-th iteration.
References iv::base, const0_rtx, gcc_assert, iv_extend_to_rtx_code(), IV_UNKNOWN_EXTEND, lowpart_subreg(), simplify_gen_binary(), simplify_gen_unary(), and iv::step.
Referenced by iv_extend(), and iv_subreg().
|
extern |
Sets NIT to an upper bound for the maximum number of executions of the latch of the LOOP. If we have no reliable estimate, the function returns false, otherwise returns true.
References loop::any_likely_upper_bound, loop::nb_iterations_likely_upper_bound, and SIGNED.
Referenced by decide_unroll_constant_iterations(), decide_unroll_runtime_iterations(), decide_unroll_stupid(), get_likely_max_loop_iterations_int(), and likely_max_loop_iterations().
|
extern |
Similar to get_max_loop_iterations, but returns the estimate only if it fits to HOST_WIDE_INT. If this is not the case, or the estimate on the number of iterations of LOOP could not be derived, returns -1.
References wi::fits_shwi_p(), get_likely_max_loop_iterations(), and generic_wide_int< storage >::to_shwi().
Referenced by doloop_optimize(), find_simple_exit(), generic_predict_doloop_p(), likely_max_stmt_executions_int(), parallelize_loops(), and scale_profile_for_vect_loop().
Accessors for the loop structures.
Returns the loop with index NUM from FNs loop tree.
References loops_for_fn(), and loop::num.
Referenced by add_exit_phis(), add_other_self_distances(), build_classic_dist_vector_1(), chrec_component_in_loop_num(), chrec_contains_symbols_defined_in_loop(), chrec_evaluate(), copy_cfg_body(), debug_loop_num(), draw_cfg_nodes(), evolution_function_is_invariant_rec_p(), evolution_function_is_univariate_p(), loops_list::Iter< T >::fill_curr_loop(), get_chrec_loop(), get_loop_copy(), hide_evolution_in_other_loops_than_loop(), move_sese_region_to_fn(), output_cfg(), reset_evolution_in_loop(), set_uid_loop_bbs(), tree_unroll_loops_completely(), try_vectorize_loop_1(), vect_analyze_loop_form(), vect_is_simple_iv_evolution(), and vect_loop_dist_alias_call().
|
extern |
Loops & cfg manipulation.
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 cfun, EXIT_BLOCK_PTR_FOR_FN, FOR_EACH_BB_FN, gcc_assert, get_loop_body_with_size(), loop::header, loop::latch, n_basic_blocks_for_fn, and loop::num_nodes.
Referenced by analyze_function_body(), analyze_insns_in_loop(), average_num_loop_insns(), can_duplicate_loop_p(), cancel_loop(), determine_reduction_stmt(), doloop_valid_p(), draw_cfg_nodes_for_loop(), estimate_loops_at_level(), estimate_numbers_of_iterations(), find_loop_guard(), find_simple_exit(), fix_bb_placements(), fix_loop_bb_probability(), flow_loop_dump(), free_rdg(), get_loop_body_in_custom_order(), get_loop_body_in_custom_order(), get_loop_exit_edges(), hoist_guard(), ifcvt_split_critical_edges(), init_loop_unswitch_info(), loop_has_phi_with_address_arg(), loop_nest_has_data_refs(), num_loop_branches(), num_loop_insns(), number_of_iterations_exit_assumptions(), optimize_mask_stores(), predict_loops(), referenced_in_one_insn_in_loop_p(), reset_debug_uses_in_loop(), scale_loop_frequencies(), set_uid_loop_bbs(), simplify_loop_version(), split_loop(), split_loop_on_cond(), tree_estimate_loop_size(), tree_num_loop_insns(), tree_ssa_iv_optimize_loop(), tree_unswitch_single_loop(), unloop(), unroll_loop_runtime_iterations(), update_dominators_in_loop(), update_epilogue_loop_vinfo(), vect_analyze_loop_form(), vect_do_peeling(), and verify_loop_closed_ssa().
|
extern |
Get body of a LOOP in breadth first sort order.
References bitmap_set_bit, cfun, EXIT_BLOCK_PTR_FOR_FN, flow_bb_inside_loop_p(), FOR_EACH_EDGE, gcc_assert, loop::header, i, 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().
|
extern |
Gets body of a LOOP sorted via provided BB_COMPARATOR.
References get_loop_body(), loop::num_nodes, and qsort.
Referenced by loop_distribution::stmts_from_loop().
|
extern |
Same as above, but use gcc_sort_r instead of qsort.
References gcc_sort_r(), get_loop_body(), and loop::num_nodes.
|
extern |
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 cfun, EXIT_BLOCK_PTR_FOR_FN, fill_sons_in_loop(), gcc_assert, loop::header, loop::latch, and loop::num_nodes.
Referenced by destroy_loop(), duplicate_loop_body_to_header_edge(), find_data_references_in_loop(), find_invariants(), find_seed_stmts_for_distribution(), gather_memory_references(), generate_loops_for_partition(), init_var_map(), loop_has_blocks_with_irreducible_flag(), loop_has_vector_phi_nodes(), crc_optimization::loop_may_calculate_crc(), loop_version(), oacc_entry_exit_ok(), rewrite_all_phi_nodes_with_iv(), transform_to_exit_first_loop(), and pcom_worker::try_combine_chains().
|
extern |
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(), merge_loop_tree(), slpeel_can_duplicate_loop_p(), slpeel_tree_duplicate_loop_to_edge_cfg(), unroll_jam_possible_p(), and verify_loop_structure().
|
extern |
Returns the list of the exit edges of a LOOP.
References cfun, loop_exit::e, EXIT_BLOCK_PTR_FOR_FN, loop::exits, flow_bb_inside_loop_p(), FOR_EACH_EDGE, free(), gcc_assert, get_loop_body(), i, loop::latch, LOOPS_HAVE_RECORDED_EXITS, loops_state_satisfies_p(), loop_exit::next, and loop::num_nodes.
Referenced by analyze_function_body(), analyze_insns_in_loop(), canonicalize_loop_induction_variables(), clean_up_loop_closed_phi(), create_loop_tree_node_allocnos(), create_loop_tree_nodes(), duplicate_loop_body_to_header_edge(), emit_mfence_after_loop(), estimate_numbers_of_iterations(), find_loop_location(), find_loop_niter(), find_loop_niter_by_eval(), finite_loop_p(), fix_loop_placement(), ira_loop_edge_freq(), last_always_executed_block(), loop_edge_to_cancel(), loop_exit_for_scaling(), may_use_storent_in_loop_p(), move_early_exit_stmts(), predict_loops(), replace_loop_annotate(), slpeel_tree_duplicate_loop_to_edge_cfg(), store_motion_loop(), tree_if_conversion(), vec_init_loop_exit_info(), vect_analyze_loop_form(), vect_analyze_slp(), vect_do_peeling(), vect_get_loop_niters(), and vectorizable_live_operation().
|
extern |
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 BITMAP_ALLOC, bitmap_bit_p, BITMAP_FREE, bitmap_set_bit, FOR_EACH_EDGE, loop::header, basic_block_def::index, loop_exit_edge_p(), NULL, path, basic_block_def::succs, and visited.
Referenced by tree_estimate_loop_size().
|
extern |
Returns the maximum level of nesting of subloops of LOOP.
References get_loop_level(), loop::inner, and loop::next.
Referenced by doloop_optimize(), and get_loop_level().
|
extern |
Return location corresponding to the loop control condition if possible.
References current_function_decl, FOR_BB_INSNS, FOR_BB_INSNS_REVERSE, dump_user_location_t::from_function_decl(), get_simple_loop_desc(), loop::header, niter_desc::in_edge, INSN_HAS_LOCATION(), INSN_P, loop::latch, NULL, and single_exit().
Referenced by decide_unrolling().
Returns the list of loops in FN.
References loops::larray, loops_for_fn(), and NULL.
Referenced by cleanup_tree_cfg_noloop(), create_loop_tree_nodes(), fix_loop_structure(), fixup_loop_arrays_after_move(), mark_all_loops_for_removal(), mark_loops_for_removal(), more_one_region_p(), move_sese_region_to_fn(), rebuild_regno_allocno_maps(), and setup_entered_from_non_parent_p().
|
extern |
Sets NIT to an upper bound for the maximum number of executions of the latch of the LOOP. If we have no reliable estimate, the function returns false, otherwise returns true.
References loop::any_upper_bound, loop::nb_iterations_upper_bound, and SIGNED.
Referenced by doloop_modify(), doloop_optimize(), doloop_simplify_count(), get_max_loop_iterations_int(), iv_can_overflow_p(), loop_niters_no_overflow(), and max_loop_iterations().
|
extern |
Similar to get_max_loop_iterations, but returns the estimate only if it fits to HOST_WIDE_INT. If this is not the case, or the estimate on the number of iterations of LOOP could not be derived, returns -1.
References wi::fits_shwi_p(), get_max_loop_iterations(), and generic_wide_int< storage >::to_shwi().
Referenced by expected_loop_iterations_unbounded(), find_simple_exit(), max_stmt_executions_int(), and pcom_worker::tree_predictive_commoning_loop().
|
extern |
Creates a simple loop description of LOOP if it was not computed already.
References find_simple_exit(), ggc_cleared_alloc(), iv_analysis_loop_init(), loop::simple_loop_desc, and simple_loop_desc().
Referenced by decide_unroll_constant_iterations(), decide_unroll_runtime_iterations(), decide_unroll_stupid(), doloop_optimize(), get_loop_location(), loop_exit_at_end_p(), unroll_loop_constant_iterations(), unroll_loop_runtime_iterations(), and unroll_loop_stupid().
Initializes loops structure LOOPS, reserving place for NUM_LOOPS loops (including the root of the loop tree).
References alloc_loop(), ENTRY_BLOCK_PTR_FOR_FN, EXIT_BLOCK_PTR_FOR_FN, loop::header, loops::larray, loop::latch, n_basic_blocks_for_fn, 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().
|
extern |
Initialize the constants for computing set costs.
References crtl, default_function_abi, default_rtl_profile(), emit_move_insn(), end_sequence(), fixed_regs, gen_raw_REG(), gen_rtx_MEM(), get_insns(), i, LAST_VIRTUAL_REGISTER, reg_class_contents, seq_cost(), start_sequence(), target_avail_regs, target_clobbered_regs, target_reg_cost, target_res_regs, target_spill_cost, TEST_HARD_REG_BIT, and validize_mem().
Referenced by backend_init_target().
|
extern |
Free the data for an induction variable analysis.
References bivs, clean_slate, clear_iv_info(), df_finish_pass(), free(), iv_ref_table, iv_ref_table_size, and NULL.
Referenced by doloop_optimize_loops(), and unroll_loops().
|
extern |
Prepare the data for an induction variable analysis of a LOOP.
References bivs, check_iv_ref_table_size(), clean_slate, clear_iv_info(), current_loop, df_analyze_loop(), df_chain, df_chain_add_problem(), DF_DEFER_INSN_RESCAN, df_dump_region(), DF_EQ_NOTES, df_note_add_problem(), df_process_deferred_rescans(), DF_RD_PRUNE_DEAD_DEFS, df_remove_problem(), df_set_flags(), DF_UD_CHAIN, and dump_file.
Referenced by analyze_insns_in_loop(), doloop_optimize(), and get_simple_loop_desc().
|
extern |
Analyzes value VAL at INSN and stores the result to *IV. MODE is the mode of VAL.
References df_find_use(), GET_CODE, iv_analyze_op(), rtx_iv::mode, NEXT_INSN(), simple_reg_p(), and SUBREG_REG.
Referenced by iv_number_of_iterations().
|
extern |
Analyzes expression RHS used at INSN and stores the result to *IV. The mode of the induction variable is MODE.
References iv::base, CONSTANT_P, gcc_assert, GET_CODE, GET_MODE, is_a(), iv_add(), iv_analyze_expr(), iv_analyze_op(), iv_extend(), iv_mult(), iv_neg(), iv_shift(), IV_SIGN_EXTEND, IV_ZERO_EXTEND, rtx_iv::mode, NULL_RTX, REG_P, iv::step, and XEXP.
Referenced by iv_analyze_def(), and iv_analyze_expr().
Analyzes definition of DEF in INSN and stores the result to IV.
References df_find_def(), and iv_analyze_def().
Referenced by analyze_iv_to_split_insn().
|
extern |
Loop analysis.
Checks whether BB is executed exactly once in each LOOP iteration.
References CDI_DOMINATORS, dominated_by_p(), basic_block_def::flags, loop::latch, and basic_block_def::loop_father.
Referenced by canonicalize_loop_induction_variables(), find_loop_guard(), find_loop_niter_by_eval(), iv_get_reaching_def(), latch_dominating_def(), single_dom_exit(), pcom_worker::suitable_component_p(), and update_loop_exit_probability_scale_dom_bbs().
|
inline |
Clear C from the LOOP constraint.
References loop::constraints.
Referenced by vect_do_peeling(), and vect_free_loop_info_assumptions().
|
inline |
Check if C is set in the LOOP constraint.
References loop::constraints.
Referenced by number_of_iterations_exit_assumptions(), try_vectorize_loop_1(), and vect_loop_versioning().
|
extern |
Compute how many times loop is entered.
References flow_bb_inside_loop_p(), FOR_EACH_EDGE, gcc_checking_assert, loop::header, loop::latch, LOOPS_MAY_HAVE_MULTIPLE_LATCHES, loops_state_satisfies_p(), basic_block_def::preds, and profile_count::zero().
Referenced by expected_loop_iterations_by_profile(), print_loop_info(), scale_loop_profile(), and update_loop_exit_probability_scale_dom_bbs().
|
inline |
Returns the number of superloops of LOOP.
References loop::superloops, and vec_safe_length().
Referenced by add_subscript_strides(), analyze_scalar_evolution_1(), bb_loop_depth(), calculate_loop_reg_pressure(), can_use_doloop_if_innermost(), compute_access_strides(), compute_invariantness(), compute_live_loop_exits(), dependence_distance_ge_vf(), do_rpo_vn_1(), draw_cfg_nodes_for_loop(), equiv_init_movable_p(), establish_preds(), expr_invariant_in_loop_p(), final_value_replacement_loop(), find_common_loop(), find_sibling_superloop(), find_unswitching_predicates_for_bb(), fix_loop_structure(), flow_loop_dump(), flow_loop_nested_p(), get_all_loop_exits(), get_coldest_out_loop(), inner_loop_header_p(), instantiate_scev_name(), loop_compare_func(), mark_all_loops_for_removal(), mark_irreducible_loops(), mark_loops_for_removal(), merge_loop_tree(), outermost_indep_loop(), outermost_invariant_loop(), outermost_invariant_loop_for_expr(), print_loop_title(), prune_access_strides_not_in_loop(), superloop_at_depth(), tree_loop_unroll_and_jam(), update_equiv_regs(), vect_analyze_data_ref_dependence(), vect_analyze_possibly_independent_ddr(), and vect_prune_runtime_alias_test_list().
|
extern |
Returns true if E is an exit of LOOP.
References loop_exit::e, and flow_bb_inside_loop_p().
Referenced by bb_with_exit_edge_p(), build_region(), combine_blocks(), dfs_find_deadend(), discover_iteration_bound_by_body_walk(), do_hoist_insertion(), get_loop_hot_path(), if_convertible_loop_p(), loop_exits_from_bb_p(), loop_exits_to_bb_p(), make_forwarders_with_degenerate_phis(), mark_loop_exit_edges(), maybe_lower_iteration_bound(), predict_paths_for_bb(), remove_ctrl_stmt_and_useless_edges(), remove_dead_stmt(), remove_exits_and_undefined_stmts(), remove_redundant_iv_tests(), should_duplicate_loop_header_p(), static_loop_exit(), fwd_jt_path_registry::thread_block_1(), update_loop_exit_probability_scale_dom_bbs(), update_profile_after_ch(), vectorizable_live_operation(), and copy_prop::visit_phi().
|
extern |
Returns true when BB has an outgoing edge exiting LOOP.
References loop_exit::e, FOR_EACH_EDGE, loop_exit_edge_p(), and basic_block_def::succs.
Referenced by do_while_loop_p(), replace_phi_edge_with_variable(), split_at_bb_p(), fwd_jt_path_registry::thread_block_1(), unroll_jam_possible_p(), and vect_analyze_loop_form().
|
extern |
Returns true when BB has an incoming edge exiting LOOP.
References loop_exit::e, FOR_EACH_EDGE, loop_exit_edge_p(), and basic_block_def::preds.
Returns true if LOOP has at least one exit edge.
References loop_exit::e, loop::exits, loop_exit::next, and NULL.
Returns latch edge of LOOP.
References find_edge(), loop::header, and loop::latch.
Referenced by add_iv_candidate_for_biv(), analyze_and_compute_bitop_with_inv_effect(), analyze_and_compute_bitwise_induction_effect(), loop_cand::analyze_iloop_reduction_var(), loop_cand::analyze_oloop_reduction_var(), assign_calc_vals_to_header_phis(), connect_loop_phis(), constant_after_peeling(), create_iv(), create_parallel_loop(), create_preheader(), discover_iteration_bound_by_body_walk(), do_split_loop_on_cond(), duplicate_loop_body_to_header_edge(), easy_exit_values(), eliminate_temp_copies(), estimate_loops_at_level(), crc_optimization::execute(), pcom_worker::find_looparound_phi(), find_vdef_in_loop(), fuse_loops(), get_base_for(), ifcvt_local_dce(), initialize_root_vars(), initialize_root_vars_lm(), initialize_root_vars_store_elim_2(), is_cond_scalar_reduction(), crc_optimization::is_output_crc(), loop_iter_phi_semi_invariant_p(), loop_niter_by_eval(), mark_bivs(), maybe_lower_iteration_bound(), maybe_set_vectorized_backedge_value(), number_of_iterations_cltz(), number_of_iterations_cltz_complement(), number_of_iterations_popcount(), parloops_is_simple_reduction(), process_use(), slpeel_tree_duplicate_loop_to_edge_cfg(), split_loop(), crc_optimization::swap_crc_and_data_if_needed(), fwd_jt_path_registry::thread_through_loop_header(), tree_transform_and_unroll_loop(), unloop_loops(), unroll_loop_constant_iterations(), unroll_loop_runtime_iterations(), unroll_loop_stupid(), vect_analyze_slp(), vect_build_slp_instance(), vect_build_slp_tree_2(), vect_create_epilog_for_reduction(), vect_is_nonlinear_iv_evolution(), vect_is_simple_reduction(), vect_phi_first_order_recurrence_p(), vect_set_loop_control(), vectorizable_induction(), vectorizable_load(), vectorizable_nonlinear_induction(), vectorizable_recurr(), vectorizable_reduction(), and vectorizable_simd_clone_call().
|
inline |
References cfun, and loop_optimizer_finalize().
Referenced by autofdo::afdo_calculate_branch_prob(), analyze_function_body(), compute_alignments(), do_reload(), execute_ranger_vrp(), fini_reassoc(), finite_function_p(), fwprop_done(), if_convert(), ira(), loop_optimizer_finalize(), lto_prepare_function_for_streaming(), perform_tree_ssa_dce(), rebuild_frequencies(), release_function_body(), report_predictor_hitrates(), split_live_ranges_for_shrink_wrap(), split_paths(), tree_ssa_loop_done(), and back_threader::~back_threader().
Finalize loop structures.
References clean_up_loop_closed_phi(), function::curr_properties, flow_loops_free(), FOR_ALL_BB_FN, free_numbers_of_iterations_estimates(), free_simple_loop_desc(), ggc_free(), LOOP_CLOSED_SSA, basic_block_def::loop_father, loops_for_fn(), LOOPS_HAVE_FALLTHRU_PREHEADERS, LOOPS_HAVE_MARKED_IRREDUCIBLE_REGIONS, LOOPS_HAVE_PREHEADERS, LOOPS_HAVE_RECORDED_EXITS, LOOPS_HAVE_SIMPLE_LATCHES, LOOPS_MAY_HAVE_MULTIPLE_LATCHES, loops_state_clear(), loops_state_satisfies_p(), loops_state_set(), NULL, PROP_loops, release_recorded_exits(), set_loops_for_fn(), timevar_pop(), and timevar_push().
|
extern |
Loop optimizer initialization.
Initialize loop structures. This is used by the tree and RTL loop optimizers. FLAGS specify what properties to compute and/or ensure for loops.
References apply_loop_flags(), calculate_dominance_info(), CDI_DOMINATORS, cfun, checking_verify_loop_structure(), current_loops, dump_file, fix_loop_structure(), flow_loops_dump(), flow_loops_find(), gcc_assert, LOOPS_HAVE_RECORDED_EXITS, LOOPS_MAY_HAVE_MULTIPLE_LATCHES, LOOPS_NEED_FIXUP, loops_state_clear(), loops_state_satisfies_p(), loops_state_set(), NULL, PROP_loops, release_recorded_exits(), timevar_pop(), and timevar_push().
Referenced by autofdo::afdo_calculate_branch_prob(), analyze_function_body(), back_threader::back_threader(), compute_alignments(), execute_build_cfg(), execute_ranger_vrp(), finite_function_p(), fwprop_init(), if_convert(), init_reassoc(), ira(), lto_prepare_function_for_streaming(), perform_tree_ssa_dce(), rebuild_frequencies(), report_predictor_hitrates(), rtl_loop_init(), split_live_ranges_for_shrink_wrap(), split_paths(), and tree_function_versioning().
Returns the immediate superloop of LOOP, or NULL if LOOP is the outermost loop.
References NULL, loop::superloops, and vec_safe_length().
Referenced by add_exit_phis(), add_loop(), add_loop_to_tree(), analyze_memory_references(), analyze_scalar_evolution_in_loop(), calculate_loop_reg_pressure(), cancel_loop(), compute_access_range(), compute_access_stride(), compute_invariantness(), create_loop_tree_nodes(), determine_loop_nest_reuse(), dfs_find_deadend(), do_not_sink(), duplicate_block(), dw2_build_landing_pads(), eliminate_dom_walker::eliminate_stmt(), fill_coldest_and_hotter_out_loop(), find_common_loop(), find_loop_location(), find_sibling_superloop(), find_uses_to_rename_use(), fix_bb_placement(), fix_bb_placements(), fix_loop_placement(), fix_loop_placements(), fix_loop_structure(), flow_loop_dump(), flow_loop_tree_node_remove(), form_loop_tree(), fwprop_insn(), gbb_loop_at_index(), get_all_loop_exits(), gimple_duplicate_seme_region(), init_loop_unswitch_info(), tree_loop_interchange::interchange_loops(), loop_preheader_edge(), loop_version(), make_forwarder_block(), mark_loop_exit_edges(), mark_loops_in_oacc_kernels_region(), mark_ref_loaded(), mark_ref_regs(), mark_ref_stored(), mark_regno_live(), merge_loop_tree(), move_computations_worker(), move_sese_region_to_fn(), optimize_loop_nest_for_size_p(), optimize_loop_nest_for_speed_p(), outermost_invariant_loop(), outermost_loop_in_sese_1(), predict_loops(), prepare_perfect_loop_nest(), fold_using_range::range_of_phi(), remove_ctrl_stmt_and_useless_edges(), remove_edge_and_dominated_blocks(), remove_path(), rename_variables_in_bb(), rescan_loop_exit(), sese_loop_depth(), set_level(), sjlj_emit_dispatch_table(), slpeel_can_duplicate_loop_p(), slpeel_tree_duplicate_loop_to_edge_cfg(), fwd_jt_path_registry::thread_block_1(), fwd_jt_path_registry::thread_through_loop_header(), tree_forwarder_block_p(), tree_if_conversion(), tree_loop_unroll_and_jam(), tree_ssa_split_loops(), tree_unroll_loops_completely(), tree_unroll_loops_completely_1(), unloop(), vect_analyze_early_break_dependences(), vect_analyze_loop(), vect_loop_versioning(), verify_loop_structure(), versionable_outer_loop_p(), and loops_list::walk_loop_tree().
Returns the outermost loop of the loop nest that contains LOOP.
References loop::superloops, and vec_safe_length().
Referenced by gather_memory_references_ref().
Returns preheader edge of LOOP.
References cfun, loop_exit::e, ENTRY_BLOCK_PTR_FOR_FN, FOR_EACH_EDGE, gcc_assert, loop::header, loop::latch, loop_outer(), LOOPS_HAVE_PREHEADERS, LOOPS_MAY_HAVE_MULTIPLE_LATCHES, loops_state_satisfies_p(), basic_block_def::preds, and single_succ_edge().
Referenced by add_preheader_seq(), analyze_and_compute_bitop_with_inv_effect(), analyze_and_compute_bitwise_induction_effect(), loop_cand::analyze_carried_vars(), analyze_function_body(), loop_cand::analyze_iloop_reduction_var(), loop_cand::analyze_induction_var(), analyze_insns_in_loop(), loop_cand::analyze_oloop_reduction_var(), assign_calc_vals_to_header_phis(), assign_known_vals_to_header_phis(), assign_vals_to_header_phis(), bb_colder_than_loop_preheader(), block_before_loop(), build_region(), canonicalize_loop_ivs(), check_exit_phi(), compute_access_stride(), connect_loop_phis(), connect_loops(), constant_after_peeling(), copy_loop_before(), create_empty_loop_on_edge(), create_iv(), create_parallel_loop(), cse_and_gimplify_to_preheader(), destroy_loop(), determine_exit_conditions(), determine_loop_nest_reuse(), determine_value_range(), do_split_loop_on_cond(), doloop_modify(), execute_sm(), execute_sm_exit(), fill_coldest_and_hotter_out_loop(), find_bivs(), find_data_references_in_stmt(), find_invariants_bb(), pcom_worker::find_looparound_phi(), find_reduc_addr(), fix_loop_placements(), gen_parallel_loop(), generate_memcpy_builtin(), generate_memset_builtin(), generate_reduction_builtin_1(), get_base_for(), get_range_query(), get_vop_from_header(), hoist_guard(), hoist_memory_references(), ifcvt_can_hoist(), initialize_data_dependence_relation(), initialize_reductions(), initialize_root_vars(), initialize_root_vars_lm(), initialize_root_vars_store_elim_2(), insert_init_seqs(), vec_info::insert_seq_on_entry(), instantiate_parameters(), tree_loop_interchange::interchange_loops(), loop_niter_by_eval(), loop_rev_post_order_compute(), loop_version(), move_computations_worker(), move_invariant_reg(), number_of_iterations_cltz(), number_of_iterations_cltz_complement(), number_of_iterations_popcount(), parallelize_loops(), predict_loops(), pcom_worker::prepare_initializers_chain(), resolve_mixers(), rewrite_use_compare(), scale_profile_for_vect_loop(), simplify_using_initial_values(), slpeel_can_duplicate_loop_p(), slpeel_tree_duplicate_loop_to_edge_cfg(), slpeel_update_phi_nodes_for_guard1(), split_loop(), stmt_semi_invariant_p_1(), transform_to_exit_first_loop_alt(), tree_if_conversion(), tree_loop_unroll_and_jam(), tree_transform_and_unroll_loop(), tree_unroll_loops_completely(), try_peel_loop(), try_transform_to_exit_first_loop_alt(), try_unroll_loop_completely(), unloop(), unroll_loop_constant_iterations(), unroll_loop_runtime_iterations(), crc_optimization::validate_crc_and_data(), vect_analyze_loop_form(), vect_build_loop_niters(), vect_build_slp_tree_2(), vect_create_data_ref_ptr(), vect_create_epilog_for_reduction(), vect_do_peeling(), vect_emit_reduction_init_stmts(), vect_enhance_data_refs_alignment(), vect_gen_vector_loop_niters(), vect_get_external_def_edge(), vect_get_gather_scatter_ops(), vect_is_nonlinear_iv_evolution(), vect_loop_dist_alias_call(), vect_loop_vectorized_call(), vect_loop_versioning(), vect_phi_initial_value(), vect_prepare_for_masked_peels(), vect_set_loop_condition_normal(), vect_set_loop_control(), vect_setup_realignment(), vect_transform_cycle_phi(), vect_transform_loop(), vect_update_ivs_after_vectorizer(), vectorizable_induction(), vectorizable_load(), vectorizable_nonlinear_induction(), vectorizable_recurr(), and vectorizable_simd_clone_call().
|
inline |
Clears FLAGS from the loops state.
References loops_for_fn(), and loops::state.
Referenced by checking_verify_loop_structure(), do_ssa_ccp(), fix_loop_structure(), loop_optimizer_finalize(), loop_optimizer_init(), loops_state_clear(), oacc_do_neutering(), and release_recorded_exits().
|
inline |
References cfun, current_loops, and loops_state_clear().
Returns true if state of the loops satisfies all properties described by FLAGS.
References loops_for_fn().
Referenced by canonicalize_induction_variables(), chrec_fold_multiply_poly_poly(), chrec_fold_plus_poly_poly(), clean_up_loop_closed_phi(), cleanup_tree_cfg(), cleanup_tree_cfg_noloop(), clear_bb_flags(), do_rpo_vn_1(), rpo_elim::eliminate_avail(), execute_function_todo(), execute_update_addresses_taken(), expand_omp_target(), expand_omp_taskreg(), find_loop_location(), fix_loop_structure(), get_loop_exit_edges(), gimple_can_merge_blocks_p(), gimple_duplicate_loop_body_to_header_edge(), gimple_merge_blocks(), loop_count_in(), loop_optimizer_finalize(), loop_optimizer_init(), loop_preheader_edge(), loops_state_satisfies_p(), make_forwarders_with_degenerate_phis(), fwd_jt_path_registry::mark_threaded_blocks(), process_bb(), record_loop_exits(), release_recorded_exits(), remove_dead_phis(), remove_edge(), remove_path(), repair_loop_structures(), rescan_loop_exit(), rewrite_into_loop_closed_ssa_1(), scev_initialize(), single_exit(), tree_forwarder_block_p(), tree_function_versioning(), tree_unroll_loops_completely(), verify_loop_structure(), and copy_prop::visit_phi().
|
inline |
References cfun, and loops_state_satisfies_p().
|
inline |
Sets FLAGS to the loops state.
References loops_for_fn(), and loops::state.
Referenced by apply_loop_flags(), simplify_using_ranges::cleanup_edges_and_switches(), cleanup_empty_eh_merge_phis(), cleanup_tree_cfg_noloop(), copy_cfg_body(), create_cond_insert_point(), create_preheaders(), duplicate_block(), execute_fixup_cfg(), expand_omp_for(), force_single_succ_latches(), gimple_ssa_isolate_erroneous_paths(), loop_optimizer_finalize(), loop_optimizer_init(), loops_state_set(), mark_irreducible_loops(), mark_loop_for_removal(), record_loop_exits(), remove_ctrl_stmt_and_useless_edges(), remove_dead_stmt(), remove_edge(), remove_edge_and_dominated_blocks(), rewrite_into_loop_closed_ssa_1(), split_paths(), jt_path_registry::thread_through_all_blocks(), ubsan_expand_null_ifn(), and ubsan_expand_ptr_ifn().
|
inline |
References cfun, and loops_state_set().
bool mark_irreducible_loops | ( | void | ) |
References add_edge(), BB_REPR, CDI_DOMINATORS, cfun, current_loops, graph_edge::data, graph_edge::dest, dominated_by_p(), ENTRY_BLOCK_PTR_FOR_FN, EXIT_BLOCK_PTR_FOR_FN, find_common_loop(), basic_block_def::flags, flow_bb_inside_loop_p(), FOR_BB_BETWEEN, FOR_EACH_EDGE, free_graph(), g, gcc_assert, graphds_scc(), i, last_basic_block_for_fn, loop_depth(), basic_block_def::loop_father, LOOP_REPR, LOOPS_HAVE_MARKED_IRREDUCIBLE_REGIONS, loops_state_set(), new_graph(), NULL, loop::num, number_of_loops(), graph_edge::src, graph_edge::succ_next, basic_block_def::succs, and loop::superloops.
Referenced by apply_loop_flags(), canonicalize_induction_variables(), find_obviously_necessary_stmts(), finite_function_p(), remove_path(), tree_unroll_loops_completely(), and verify_loop_structure().
|
extern |
Sets EDGE_LOOP_EXIT flag for all loop exits.
References cfun, FOR_EACH_BB_FN, FOR_EACH_EDGE, loop_exit_edge_p(), basic_block_def::loop_father, loop_outer(), number_of_loops(), and basic_block_def::succs.
Referenced by if_convert().
void mark_loop_for_removal | ( | loop_p | loop | ) |
Marks LOOP for removal and sets LOOPS_NEED_FIXUP.
References loop::former_header, loop::header, loop::latch, LOOPS_NEED_FIXUP, loops_state_set(), and NULL.
Referenced by cleanup_empty_eh_merge_phis(), delete_basic_block(), duplicate_block(), back_jt_path_registry::duplicate_thread_path(), merge_blocks(), remove_edge_and_dominated_blocks(), sjlj_emit_dispatch_table(), and fwd_jt_path_registry::thread_through_loop_header().
Return true if loop CFG profile may be unrealistically flat. This is a common case, since average loops iterate only about 5 times. In the case we do not have profile feedback or do not know real number of iterations during profile estimation, we are likely going to predict it with similar low iteration count. For static loop profiles we also artificially cap profile of loops with known large iteration count so they do not appear significantly more hot than other loops with unknown iteration counts. For loop optimization heuristics we ignore CFG profile and instead use get_estimated_loop_iterations API which returns estimate only when it is realistic. For unknown counts some optimizations, like vectorizer or unroller make guess that iteration count will be large. In this case we need to avoid scaling down the profile after the loop transform.
References loop::any_estimate, loop::any_likely_upper_bound, loop::any_upper_bound, dump_file, dump_flags, expected_loop_iterations_by_profile(), wi::geu_p(), wi::gtu_p(), wi::ltu_p(), loop::nb_iterations_estimate, loop::nb_iterations_likely_upper_bound, loop::nb_iterations_upper_bound, loop::num, TDF_DETAILS, sreal::to_double(), sreal::to_nearest_int(), and generic_wide_int< storage >::to_shwi().
Referenced by print_loop_info(), tree_transform_and_unroll_loop(), unroll_loop_constant_iterations(), and vect_transform_loop().
|
extern |
Move the invariants out of the loops.
References calculate_loop_reg_pressure(), cfun, checking_verify_flow_info(), curr_loop, df_analyze(), DF_DEFER_INSN_RESCAN, DF_EQ_NOTES, df_live, df_live_add_problem(), df_live_set_all_dirty(), df_remove_problem(), df_set_flags(), dump_file, free(), free_loop_data(), free_reg_info(), invariant_table, invariant_table_size, ira_set_pseudo_classes(), LI_FROM_INNERMOST, move_single_loop_invariants(), NULL, loop::num_nodes, regstat_free_n_sets_and_refs(), and regstat_init_n_sets_and_refs().
|
extern |
Counts the number of conditional branches inside LOOP.
References cfun, EDGE_COUNT, EXIT_BLOCK_PTR_FOR_FN, free(), gcc_assert, get_loop_body(), i, loop::latch, and loop::num_nodes.
Referenced by decide_unroll_stupid().
|
extern |
Counts number of insns inside LOOP.
References FOR_BB_INSNS, free(), get_loop_body(), i, loop::ninsns, NONDEBUG_INSN_P, and loop::num_nodes.
Referenced by decide_unrolling(), unroll_loop_constant_iterations(), unroll_loop_runtime_iterations(), and unroll_loop_stupid().
|
inline |
Returns the number of loops in FN (including the removed ones and the fake loop that forms the root of the loop tree).
References loops::larray, loops_for_fn(), and vec_safe_length().
Referenced by canonicalize_induction_variables(), create_loop_tree_nodes(), estimate_loops(), estimate_reg_pressure_cost(), crc_optimization::execute(), loop_distribution::execute(), execute_update_addresses_taken(), fix_loop_structure(), fixup_loop_arrays_after_move(), flow_loops_dump(), gate_loop(), graphite_transforms(), ira_build(), loop_invariant_motion_in_fun(), loops_list::loops_list(), lto_prepare_function_for_streaming(), mark_irreducible_loops(), mark_loop_exit_edges(), mark_loops_for_removal(), output_cfg(), place_new_loop(), record_loop_exits(), remove_unnecessary_regions(), report_predictor_hitrates(), rewrite_into_loop_closed_ssa_1(), run_tree_predictive_commoning(), tree_estimate_probability(), tree_ssa_lim_initialize(), tree_unroll_loops_completely(), tree_unroll_loops_completely_1(), verify_loop_closed_ssa(), and verify_loop_structure().
void print_loop_info | ( | FILE * | file, |
const class loop * | loop, | ||
const char * | prefix ) |
Print loop information.
References loop::any_estimate, loop::any_likely_upper_bound, loop::any_upper_bound, loop::can_be_parallel, cfun, loop::dont_vectorize, profile_count::dump(), expected_loop_iterations_by_profile(), loop::finite_p, loop::force_vectorize, loop::in_oacc_kernels_region, loop_count_in(), maybe_flat_loop_profile(), loop::nb_iterations, loop::nb_iterations_estimate, loop::nb_iterations_likely_upper_bound, loop::nb_iterations_upper_bound, loop::num, print_decu(), print_generic_expr(), sreal::to_double(), loop::unroll, and loop::warned_aggressive_loop_optimizations.
Referenced by flow_loop_dump(), and print_loop().
void record_loop_exits | ( | void | ) |
For each loop, record list of exit edges, and start maintaining these lists.
References cfun, hash_table< Descriptor, Lazy, Allocator >::create_ggc(), current_loops, FOR_EACH_BB_FN, FOR_EACH_EDGE, gcc_assert, LOOPS_HAVE_RECORDED_EXITS, loops_state_satisfies_p(), loops_state_set(), NULL, number_of_loops(), rescan_loop_exit(), and basic_block_def::succs.
Referenced by apply_loop_flags(), rewrite_into_loop_closed_ssa_1(), and tree_estimate_probability().
|
extern |
Records that every statement in LOOP is executed I_BOUND times. REALISTIC is true if I_BOUND is expected to be close to the real number of iterations. UPPER is true if we are sure the loop iterates at most I_BOUND times.
References loop::any_estimate, loop::any_likely_upper_bound, loop::any_upper_bound, wi::ltu_p(), wi::min_precision(), loop::nb_iterations_estimate, loop::nb_iterations_likely_upper_bound, loop::nb_iterations_upper_bound, and SIGNED.
Referenced by branch_prob(), canonicalize_loop_induction_variables(), discover_iteration_bound_by_body_walk(), estimate_numbers_of_iterations(), iv_number_of_iterations(), maybe_lower_iteration_bound(), record_estimate(), and vect_do_peeling().
void release_recorded_exits | ( | function * | fn | ) |
Releases lists of loop exits.
References hash_table< Descriptor, Lazy, Allocator >::empty(), loops::exits, gcc_assert, loops_for_fn(), LOOPS_HAVE_RECORDED_EXITS, loops_state_clear(), loops_state_satisfies_p(), and NULL.
Referenced by fix_loop_structure(), loop_optimizer_finalize(), loop_optimizer_init(), and rewrite_into_loop_closed_ssa_1().
|
extern |
Remove basic block BB from loops.
References FOR_EACH_EDGE, FOR_EACH_VEC_SAFE_ELT, gcc_assert, i, basic_block_def::loop_father, NULL, loop::num_nodes, basic_block_def::preds, rescan_loop_exit(), basic_block_def::succs, and loop::superloops.
Referenced by add_loop(), cleanup_tree_cfg_noloop(), delete_basic_block(), expand_omp_for_generic(), fix_bb_placement(), loop_version(), make_forwarder_block(), merge_blocks(), merge_loop_tree(), and unloop().
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 current_loops, loop::exits, find_common_loop(), flow_bb_inside_loop_p(), ggc_alloc(), loop_outer(), LOOPS_HAVE_RECORDED_EXITS, loops_state_satisfies_p(), loop_exit::next, loop_exit::next_e, NULL, loop_exit::prev, and loop_exit_hasher::remove().
Referenced by add_bb_to_loop(), add_loop(), create_edge_and_update_destination_phis(), create_parallel_loop(), destroy_loop(), back_jt_path_registry::duplicate_thread_path(), fix_loop_placement(), force_nonfallthru(), gimple_duplicate_sese_tail(), merge_blocks(), merge_loop_tree(), 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().
|
inline |
References loop::simple_loop_desc.
Referenced by free_simple_loop_desc(), and get_simple_loop_desc().
The single loop exit if it dominates the latch, NULL otherwise.
References just_once_each_iteration_p(), NULL, and single_exit().
Referenced by can_unroll_loop_p(), canonicalize_loop_ivs(), create_parallel_loop(), gen_parallel_loop(), generic_predict_doloop_p(), niter_for_single_dom_exit(), parallelize_loops(), transform_to_exit_first_loop(), transform_to_exit_first_loop_alt(), tree_ssa_iv_optimize_loop(), tree_transform_and_unroll_loop(), try_create_reduction_list(), try_get_loop_niter(), and try_transform_to_exit_first_loop_alt().
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(), loop_exit::next, and NULL.
Referenced by canonicalize_loop_induction_variables(), check_exit_phi(), combine_blocks(), compute_access_range(), connect_loops(), copy_loop_before(), create_bb_after_loop(), create_empty_loop_on_edge(), destroy_loop(), do_warn_aggressive_loop_optimizations(), easy_exit_values(), empty_bb_without_guard_p(), loop_distribution::execute(), final_value_replacement_loop(), finalize_eliminated_stores(), find_simple_exit(), find_single_drs(), gen_parallel_loop(), generate_loops_for_partition(), get_loop_exit_condition(), get_loop_location(), crc_optimization::get_output_phi(), hoist_guard(), crc_optimization::is_output_crc(), latch_dominated_by_data_ref(), crc_optimization::loop_calculates_crc(), loop_closed_phi_def(), loop_exit_for_scaling(), loop_only_exit_p(), tree_loop_interchange::move_code_to_inner_loop(), number_of_latch_executions(), patch_loop_exit(), prepare_perfect_loop_nest(), single_dom_exit(), single_likely_exit(), pcom_worker::split_data_refs_to_components(), split_loop(), crc_optimization::swap_crc_and_data_if_needed(), loop_distribution::transform_reduction_loop(), tree_if_conversion(), tree_loop_unroll_and_jam(), tree_unswitch_outer_loop(), unroll_jam_possible_p(), vect_analyze_loop_form(), vect_loop_versioning(), and versionable_outer_loop_p().
Return exit edge if loop has only one exit that is likely to be executed on runtime (i.e. it is not EH or leading to noreturn call.
References cfun, loop::exits, FOR_EACH_VEC_ELT, i, NULL, probably_never_executed_edge_p(), single_exit(), and profile_probability::very_unlikely().
Referenced by canonicalize_loop_induction_variables(), estimate_numbers_of_iterations(), and loop_exit_for_scaling().
void sort_sibling_loops | ( | function * | fn | ) |
Sort sibling loops in RPO order.
References cfun, free(), i, loop::inner, last_basic_block_for_fn, LI_INCLUDE_ROOT, n_basic_blocks_for_fn, loop::next, NULL, NUM_FIXED_BLOCKS, pre_and_rev_post_order_compute_fn(), sort_sibling_loops_cmp(), and sort_sibling_loops_cmp_rpo.
Returns the loop such that LOOP is nested DEPTH (indexed from zero) loops within LOOP.
References gcc_assert, loop_depth(), and loop::superloops.
Referenced by analyze_scalar_evolution_1(), compute_access_strides(), compute_live_loop_exits(), determine_max_movement(), do_rpo_vn_1(), final_value_replacement_loop(), find_sibling_superloop(), find_unswitching_predicates_for_bb(), outermost_indep_loop(), outermost_invariant_loop(), outermost_invariant_loop_for_expr(), and vect_loop_versioning().
|
extern |
Disable warnings about missing quoting in GCC diagnostics for the verification errors. Their format strings don't follow GCC diagnostic conventions and the calls are ultimately followed by a deliberate ICE triggered by a failed assertion.
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_set_bit, calculate_dominance_info(), CDI_DOMINATORS, cfun, current_loops, dom_info_available_p(), dominated_by_p(), loop_exit::e, EDGE_COUNT, ENTRY_BLOCK_PTR_FOR_FN, error(), EXIT_BLOCK_PTR_FOR_FN, loop::exits, find_edge(), find_released_ssa_name(), basic_block_def::flags, flow_bb_inside_loop_p(), FOR_EACH_BB_FN, FOR_EACH_EDGE, free(), free_dominance_info(), gcc_assert, get_exit_descriptions(), get_loop_body_with_size(), loop::header, i, basic_block_def::index, last_basic_block_for_fn, loop::latch, LI_FROM_INNERMOST, basic_block_def::loop_father, 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(), n_basic_blocks_for_fn, loop::nb_iterations, loop_exit::next, loop_exit::next_e, NULL, loop::num, loop::num_nodes, number_of_loops(), basic_block_def::preds, single_succ(), single_succ_p(), basic_block_def::succs, verify_dominators(), visited, and walk_tree.
Referenced by checking_verify_loop_structure(), execute_function_todo(), expand_omp_target(), and expand_omp_taskreg().
|
extern |
Natural loop analysis code for GNU compiler. Copyright (C) 2002-2024 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>.