GCC Middle and Back End API Reference
|
Functions | |
bool | just_once_each_iteration_p () |
bool | mark_irreducible_loops () |
int | num_loop_insns () |
int | average_num_loop_insns () |
gcov_type | expected_loop_iterations_unbounded () |
unsigned | expected_loop_iterations () |
unsigned | get_loop_level () |
static unsigned | seq_cost () |
void | init_set_costs () |
unsigned | estimate_reg_pressure_cost (unsigned n_new, unsigned n_old, bool speed, bool call_p) |
void | mark_loop_exit_edges () |
edge | single_likely_exit () |
vec< basic_block > | get_loop_hot_path () |
Variables | |
struct target_cfgloop | default_target_cfgloop |
struct target_cfgloop * | this_target_cfgloop = &default_target_cfgloop |
int average_num_loop_insns | ( | ) |
Counts number of insns executed on average per iteration LOOP.
References free(), basic_block_def::frequency, get_loop_body(), loop::header, loop::ninsns, and loop::num_nodes.
unsigned estimate_reg_pressure_cost | ( | unsigned | n_new, |
unsigned | n_old, | ||
bool | speed, | ||
bool | call_p | ||
) |
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, and number_of_loops().
Referenced by gain_for_invariant(), and ivopts_global_cost_for_size().
unsigned expected_loop_iterations | ( | ) |
Returns expected number of LOOP iterations. The returned value is bounded by REG_BR_PROB_BASE.
References expected_loop_iterations_unbounded().
gcov_type expected_loop_iterations_unbounded | ( | ) |
Returns expected number of iterations of LOOP, according to measured or guessed profile. No bounding is done on the value.
References edge_def::count, basic_block_def::count, loop::header, loop::latch, basic_block_def::preds, and edge_def::src.
vec<basic_block> get_loop_hot_path | ( | ) |
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_bit_p(), bitmap_set_bit(), edge_def::dest, loop::header, basic_block_def::index, loop_exit_edge_p(), path, edge_def::probability, basic_block_def::succs, visited, and vNULL.
unsigned get_loop_level | ( | ) |
Returns the maximum level of nesting of subloops of LOOP.
References get_loop_level(), loop::inner, and loop::next.
void init_set_costs | ( | void | ) |
Initialize the constants for computing set costs.
References default_rtl_profile(), emit_move_insn(), end_sequence(), gen_raw_REG(), gen_rtx_MEM(), get_insns(), seq_cost(), start_sequence(), and validize_mem().
Referenced by lang_dependent_init_target().
bool just_once_each_iteration_p | ( | ) |
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.
bool mark_irreducible_loops | ( | void | ) |
References add_edge(), cfun, vertex::component, graph_edge::data, graph_edge::dest, edge_def::dest, find_common_loop(), edge_def::flags, basic_block_def::flags, flow_bb_inside_loop_p(), free_graph(), g, graphds_scc(), loop::header, loop::latch, loop_depth(), basic_block_def::loop_father, LOOPS_HAVE_MARKED_IRREDUCIBLE_REGIONS, loops_state_set(), graph::n_vertices, new_graph(), number_of_loops(), graph_edge::src, edge_def::src, vertex::succ, graph_edge::succ_next, basic_block_def::succs, loop::superloops, and graph::vertices.
Referenced by analyze_function(), apply_loop_flags(), canonicalize_induction_variables(), find_obviously_necessary_stmts(), rebuild_frequencies(), recompute_all_dominators(), remove_path(), tree_estimate_probability_driver(), tree_unroll_loops_completely(), and verify_loop_structure().
void mark_loop_exit_edges | ( | void | ) |
Sets EDGE_LOOP_EXIT flag for all loop exits.
References cfun, edge_def::flags, loop_exit_edge_p(), basic_block_def::loop_father, loop_outer(), number_of_loops(), and basic_block_def::succs.
Referenced by if_convert().
int num_loop_insns | ( | ) |
Counts number of insns inside LOOP.
References free(), get_loop_body(), loop::ninsns, and loop::num_nodes.
|
static |
Returns estimate on cost of computing SEQ.
References set_rtx_cost().
Referenced by init_set_costs().
edge single_likely_exit | ( | ) |
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 edge_def::count, loop::exits, edge_def::flags, get_loop_exit_edges(), edge_def::probability, PROFILE_ABSENT, and single_exit().
struct target_cfgloop default_target_cfgloop |
@verbatim Natural loop analysis code for GNU compiler.
Copyright (C) 2002-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/.
struct target_cfgloop* this_target_cfgloop = &default_target_cfgloop |