GCC Middle and Back End API Reference
basic-block.h File Reference
#include "predict.h"
#include "vec.h"
#include "function.h"
#include "cfg-flags.def"
#include "cfghooks.h"
Include dependency graph for basic-block.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  edge_def
union  edge_def::edge_def_insns
struct  profile_record
struct  rtl_bb_info
struct  gimple_bb_info
struct  basic_block_def
union  basic_block_def::basic_block_il_dependent
struct  control_flow_graph
struct  ce_if_block
struct  edge_list
class  control_dependences
struct  edge_iterator

Macros

#define DEF_EDGE_FLAG(NAME, IDX)   EDGE_##NAME = 1 << IDX ,
#define EDGE_ALL_FLAGS   ((LAST_CFG_EDGE_FLAG - 1) * 2 - 1)
#define EDGE_COMPLEX   (EDGE_ABNORMAL | EDGE_ABNORMAL_CALL | EDGE_EH | EDGE_PRESERVE)
#define BB_FREQ_MAX   10000
#define DEF_BASIC_BLOCK_FLAG(NAME, IDX)   BB_##NAME = 1 << IDX ,
#define BB_ALL_FLAGS   ((LAST_CFG_BB_FLAG - 1) * 2 - 1)
#define BB_FLAGS_TO_PRESERVE
#define BB_UNPARTITIONED   0
#define BB_PARTITION(bb)   ((bb)->flags & (BB_HOT_PARTITION|BB_COLD_PARTITION))
#define BB_SET_PARTITION(bb, part)
#define BB_COPY_PARTITION(dstbb, srcbb)   BB_SET_PARTITION (dstbb, BB_PARTITION (srcbb))
#define ENTRY_BLOCK_PTR_FOR_FUNCTION(FN)   ((FN)->cfg->x_entry_block_ptr)
#define EXIT_BLOCK_PTR_FOR_FUNCTION(FN)   ((FN)->cfg->x_exit_block_ptr)
#define basic_block_info_for_function(FN)   ((FN)->cfg->x_basic_block_info)
#define n_basic_blocks_for_function(FN)   ((FN)->cfg->x_n_basic_blocks)
#define n_edges_for_function(FN)   ((FN)->cfg->x_n_edges)
#define last_basic_block_for_function(FN)   ((FN)->cfg->x_last_basic_block)
#define label_to_block_map_for_function(FN)   ((FN)->cfg->x_label_to_block_map)
#define profile_status_for_function(FN)   ((FN)->cfg->x_profile_status)
#define BASIC_BLOCK_FOR_FUNCTION(FN, N)   ((*basic_block_info_for_function (FN))[(N)])
#define SET_BASIC_BLOCK_FOR_FUNCTION(FN, N, BB)   ((*basic_block_info_for_function (FN))[(N)] = (BB))
#define ENTRY_BLOCK_PTR   (cfun->cfg->x_entry_block_ptr)
#define EXIT_BLOCK_PTR   (cfun->cfg->x_exit_block_ptr)
#define basic_block_info   (cfun->cfg->x_basic_block_info)
#define n_basic_blocks   (cfun->cfg->x_n_basic_blocks)
#define n_edges   (cfun->cfg->x_n_edges)
#define last_basic_block   (cfun->cfg->x_last_basic_block)
#define label_to_block_map   (cfun->cfg->x_label_to_block_map)
#define profile_status   (cfun->cfg->x_profile_status)
#define BASIC_BLOCK(N)   ((*basic_block_info)[(N)])
#define SET_BASIC_BLOCK(N, BB)   ((*basic_block_info)[(N)] = (BB))
#define FOR_BB_BETWEEN(BB, FROM, TO, DIR)   for (BB = FROM; BB != TO; BB = BB->DIR)
#define FOR_EACH_BB_FN(BB, FN)   FOR_BB_BETWEEN (BB, (FN)->cfg->x_entry_block_ptr->next_bb, (FN)->cfg->x_exit_block_ptr, next_bb)
#define FOR_EACH_BB(BB)   FOR_EACH_BB_FN (BB, cfun)
#define FOR_EACH_BB_REVERSE_FN(BB, FN)   FOR_BB_BETWEEN (BB, (FN)->cfg->x_exit_block_ptr->prev_bb, (FN)->cfg->x_entry_block_ptr, prev_bb)
#define FOR_EACH_BB_REVERSE(BB)   FOR_EACH_BB_REVERSE_FN (BB, cfun)
#define FOR_BB_INSNS(BB, INSN)
#define FOR_BB_INSNS_SAFE(BB, INSN, CURR)
#define FOR_BB_INSNS_REVERSE(BB, INSN)
#define FOR_BB_INSNS_REVERSE_SAFE(BB, INSN, CURR)
#define FOR_ALL_BB(BB)   for (BB = ENTRY_BLOCK_PTR; BB; BB = BB->next_bb)
#define FOR_ALL_BB_FN(BB, FN)   for (BB = ENTRY_BLOCK_PTR_FOR_FUNCTION (FN); BB; BB = BB->next_bb)
#define BB_HEAD(B)   (B)->il.x.head_
#define BB_END(B)   (B)->il.x.rtl->end_
#define BB_HEADER(B)   (B)->il.x.rtl->header_
#define BB_FOOTER(B)   (B)->il.x.rtl->footer_
#define ENTRY_BLOCK   (0)
#define EXIT_BLOCK   (1)
#define NUM_FIXED_BLOCKS   (2)
#define set_block_for_insn(INSN, BB)   (BLOCK_FOR_INSN (INSN) = BB)
#define REG_BR_PROB_BASE   10000
#define EDGE_INDEX_NO_EDGE   -1
#define EDGE_INDEX(el, pred, succ)   (find_edge_index ((el), (pred), (succ)))
#define INDEX_EDGE_PRED_BB(el, index)   ((el)->index_to_edge[(index)]->src)
#define INDEX_EDGE_SUCC_BB(el, index)   ((el)->index_to_edge[(index)]->dest)
#define INDEX_EDGE(el, index)   ((el)->index_to_edge[(index)])
#define NUM_EDGES(el)   ((el)->num_edges)
#define FALLTHRU_EDGE(bb)
#define BRANCH_EDGE(bb)
#define RDIV(X, Y)   (((X) + (Y) / 2) / (Y))
#define EDGE_FREQUENCY(e)
#define GCOV_COMPUTE_SCALE(num, den)   ((den) ? RDIV ((num) * REG_BR_PROB_BASE, (den)) : REG_BR_PROB_BASE)
#define EDGE_CRITICAL_P(e)
#define EDGE_COUNT(ev)   vec_safe_length (ev)
#define EDGE_I(ev, i)   (*ev)[(i)]
#define EDGE_PRED(bb, i)   (*(bb)->preds)[(i)]
#define EDGE_SUCC(bb, i)   (*(bb)->succs)[(i)]
#define ei_start(iter)   ei_start_1 (&(iter))
#define ei_last(iter)   ei_last_1 (&(iter))
#define FOR_EACH_EDGE(EDGE, ITER, EDGE_VEC)
#define CLEANUP_EXPENSIVE
#define CLEANUP_CROSSJUMP   2 /* Do crossjumping. */
#define CLEANUP_POST_REGSTACK
#define CLEANUP_THREADING   8 /* Do jump threading. */
#define CLEANUP_NO_INSN_DEL
#define CLEANUP_CFGLAYOUT   32 /* Do cleanup in cfglayout mode. */
#define CLEANUP_CFG_CHANGED   64 /* The caller changed the CFG. */

Typedefs

typedef int __assert_gimple_bb_smaller_rtl_bb [(int) sizeof(struct rtl_bb_info)-(int) sizeof(struct gimple_bb_info)]
typedef struct ce_if_block ce_if_block_t
typedef struct
gcov_working_set_info 
gcov_working_set_t

Enumerations

enum  cfg_edge_flags { LAST_CFG_EDGE_FLAG }
enum  cfg_bb_flags { DEF_BASIC_BLOCK_FLAG }
enum  dom_state { DOM_NONE, DOM_NO_FAST_QUERY, DOM_OK }
enum  profile_status_d { PROFILE_ABSENT, PROFILE_GUESSED, PROFILE_READ, PROFILE_LAST }
enum  replace_direction { dir_none, dir_forward, dir_backward, dir_both }
enum  cdi_direction { CDI_DOMINATORS = 1, CDI_POST_DOMINATORS = 2 }

Functions

void gt_ggc_mx (edge_def *e)
void gt_pch_nx (edge_def *e)
void gt_pch_nx (edge_def *e, gt_pointer_operator, void *)
void compute_bb_for_insn (void)
unsigned int free_bb_for_insn (void)
void update_bb_for_insn (basic_block)
void insert_insn_on_edge (rtx, edge)
basic_block split_edge_and_insert (edge, rtx)
void commit_one_edge_insertion (edge e)
void commit_edge_insertions (void)
edge unchecked_make_edge (basic_block, basic_block, int)
edge cached_make_edge (sbitmap, basic_block, basic_block, int)
edge make_edge (basic_block, basic_block, int)
edge make_single_succ_edge (basic_block, basic_block, int)
void remove_edge_raw (edge)
void redirect_edge_succ (edge, basic_block)
edge redirect_edge_succ_nodup (edge, basic_block)
void redirect_edge_pred (edge, basic_block)
basic_block create_basic_block_structure (rtx, rtx, rtx, basic_block)
void clear_bb_flags (void)
void dump_bb_info (FILE *, basic_block, int, int, bool, bool)
void dump_edge_info (FILE *, edge, int, int)
void debug (edge_def &ref)
void debug (edge_def *ptr)
void brief_dump_cfg (FILE *, int)
void clear_edges (void)
void scale_bbs_frequencies_int (basic_block *, int, int, int)
void scale_bbs_frequencies_gcov_type (basic_block *, int, gcov_type, gcov_type)
static bool single_succ_p ()
static bool single_pred_p ()
static edge single_succ_edge ()
static edge single_pred_edge ()
static basic_block single_succ ()
static basic_block single_pred ()
static vec< edge, va_gc > * ei_container ()
static edge_iterator ei_start_1 ()
static edge_iterator ei_last_1 ()
static bool ei_end_p ()
static bool ei_one_before_end_p ()
static void ei_next ()
static void ei_prev ()
static edge ei_edge ()
static edge ei_safe_edge ()
static bool ei_cond ()
void bitmap_intersection_of_succs (sbitmap, sbitmap *, basic_block)
void bitmap_intersection_of_preds (sbitmap, sbitmap *, basic_block)
void bitmap_union_of_succs (sbitmap, sbitmap *, basic_block)
void bitmap_union_of_preds (sbitmap, sbitmap *, basic_block)
struct edge_listpre_edge_lcm (int, sbitmap *, sbitmap *, sbitmap *, sbitmap *, sbitmap **, sbitmap **)
struct edge_listpre_edge_rev_lcm (int, sbitmap *, sbitmap *, sbitmap *, sbitmap *, sbitmap **, sbitmap **)
void compute_available (sbitmap *, sbitmap *, sbitmap *, sbitmap *)
bool maybe_hot_bb_p (struct function *, const_basic_block)
bool maybe_hot_edge_p (edge)
bool probably_never_executed_bb_p (struct function *, const_basic_block)
bool probably_never_executed_edge_p (struct function *, edge)
bool optimize_bb_for_size_p (const_basic_block)
bool optimize_bb_for_speed_p (const_basic_block)
bool optimize_edge_for_size_p (edge)
bool optimize_edge_for_speed_p (edge)
bool optimize_loop_for_size_p (struct loop *)
bool optimize_loop_for_speed_p (struct loop *)
bool optimize_loop_nest_for_size_p (struct loop *)
bool optimize_loop_nest_for_speed_p (struct loop *)
bool gimple_predicted_by_p (const_basic_block, enum br_predictor)
bool rtl_predicted_by_p (const_basic_block, enum br_predictor)
void gimple_predict_edge (edge, enum br_predictor, int)
void rtl_predict_edge (edge, enum br_predictor, int)
void predict_edge_def (edge, enum br_predictor, enum prediction)
void guess_outgoing_edge_probabilities (basic_block)
void remove_predictions_associated_with_edge (edge)
bool edge_probability_reliable_p (const_edge)
bool br_prob_note_reliable_p (const_rtx)
bool predictable_edge_p (edge)
void init_flow (struct function *)
void debug_bb (basic_block)
basic_block debug_bb_n (int)
void dump_flow_info (FILE *, int)
void expunge_block (basic_block)
void link_block (basic_block, basic_block)
void unlink_block (basic_block)
void compact_blocks (void)
basic_block alloc_block (void)
void alloc_aux_for_blocks (int)
void clear_aux_for_blocks (void)
void free_aux_for_blocks (void)
void alloc_aux_for_edge (edge, int)
void alloc_aux_for_edges (int)
void clear_aux_for_edges (void)
void free_aux_for_edges (void)
void find_unreachable_blocks (void)
bool mark_dfs_back_edges (void)
struct edge_listcreate_edge_list (void)
void free_edge_list (struct edge_list *)
void print_edge_list (FILE *, struct edge_list *)
void verify_edge_list (FILE *, struct edge_list *)
int find_edge_index (struct edge_list *, basic_block, basic_block)
edge find_edge (basic_block, basic_block)
void remove_fake_edges (void)
void remove_fake_exit_edges (void)
void add_noreturn_fake_exit_edges (void)
void connect_infinite_loops_to_exit (void)
int post_order_compute (int *, bool, bool)
basic_block dfs_find_deadend (basic_block)
int inverted_post_order_compute (int *)
int pre_and_rev_post_order_compute_fn (struct function *, int *, int *, bool)
int pre_and_rev_post_order_compute (int *, int *, bool)
int dfs_enumerate_from (basic_block, int, bool(*)(const_basic_block, const void *), basic_block *, int, const void *)
void compute_dominance_frontiers (struct bitmap_head_def *)
bitmap compute_idf (bitmap, struct bitmap_head_def *)
basic_blocksingle_pred_before_succ_order (void)
rtx block_label (basic_block)
rtx bb_note (basic_block)
bool purge_all_dead_edges (void)
bool purge_dead_edges (basic_block)
bool fixup_abnormal_edges (void)
basic_block force_nonfallthru_and_redirect (edge, basic_block, rtx)
bool contains_no_active_insn_p (const_basic_block)
bool forwarder_block_p (const_basic_block)
bool can_fallthru (basic_block, basic_block)
void emit_barrier_after_bb (basic_block bb)
void fixup_partitions (void)
void find_many_sub_basic_blocks (sbitmap)
void rtl_make_eh_edge (sbitmap, basic_block, rtx)
bool cleanup_cfg (int)
int flow_find_cross_jump (basic_block, basic_block, rtx *, rtx *, enum replace_direction *)
int flow_find_head_matching_sequence (basic_block, basic_block, rtx *, rtx *, int)
bool delete_unreachable_blocks (void)
void update_br_prob_note (basic_block)
bool inside_basic_block_p (const_rtx)
bool control_flow_insn_p (const_rtx)
rtx get_last_bb_insn (basic_block)
enum dom_state dom_info_state (enum cdi_direction)
void set_dom_info_availability (enum cdi_direction, enum dom_state)
bool dom_info_available_p (enum cdi_direction)
void calculate_dominance_info (enum cdi_direction)
void free_dominance_info (enum cdi_direction)
basic_block nearest_common_dominator (enum cdi_direction, basic_block, basic_block)
basic_block nearest_common_dominator_for_set (enum cdi_direction, bitmap)
void set_immediate_dominator (enum cdi_direction, basic_block, basic_block)
basic_block get_immediate_dominator (enum cdi_direction, basic_block)
bool dominated_by_p (enum cdi_direction, const_basic_block, const_basic_block)
vec< basic_blockget_dominated_by (enum cdi_direction, basic_block)
vec< basic_blockget_dominated_by_region (enum cdi_direction, basic_block *, unsigned)
vec< basic_blockget_dominated_to_depth (enum cdi_direction, basic_block, int)
vec< basic_blockget_all_dominated_blocks (enum cdi_direction, basic_block)
void add_to_dominance_info (enum cdi_direction, basic_block)
void delete_from_dominance_info (enum cdi_direction, basic_block)
basic_block recompute_dominator (enum cdi_direction, basic_block)
void redirect_immediate_dominators (enum cdi_direction, basic_block, basic_block)
void iterate_fix_dominators (enum cdi_direction, vec< basic_block >, bool)
void verify_dominators (enum cdi_direction)
basic_block first_dom_son (enum cdi_direction, basic_block)
basic_block next_dom_son (enum cdi_direction, basic_block)
unsigned bb_dom_dfs_in (enum cdi_direction, basic_block)
unsigned bb_dom_dfs_out (enum cdi_direction, basic_block)
edge try_redirect_by_replacing_jump (edge, basic_block, bool)
void break_superblocks (void)
void relink_block_chain (bool)
void update_bb_profile_for_threading (basic_block, int, gcov_type, edge)
void init_rtl_bb_info (basic_block)
void initialize_original_copy_tables (void)
void free_original_copy_tables (void)
void set_bb_original (basic_block, basic_block)
basic_block get_bb_original (basic_block)
void set_bb_copy (basic_block, basic_block)
basic_block get_bb_copy (basic_block)
void set_loop_copy (struct loop *, struct loop *)
struct loopget_loop_copy (struct loop *)
static bool bb_has_eh_pred ()
static bool bb_has_abnormal_pred ()
static edge find_fallthru_edge ()
bool mfb_keep_just (edge)
void rtl_profile_for_bb (basic_block)
void rtl_profile_for_edge (edge)
void default_rtl_profile (void)
gcov_working_set_tfind_working_set (unsigned pct_times_10)
static void check_probability ()
static int combine_probabilities ()
static gcov_type apply_scale ()
static gcov_type apply_probability ()
static int inverse_probability ()

Variables

struct gcov_ctr_summaryprofile_info
edge mfb_kj_edge

Macro Definition Documentation

#define BASIC_BLOCK_FOR_FUNCTION (   FN,
  N 
)    ((*basic_block_info_for_function (FN))[(N)])

Referenced by input_cfg(), and input_phi().

#define basic_block_info   (cfun->cfg->x_basic_block_info)
#define basic_block_info_for_function (   FN)    ((FN)->cfg->x_basic_block_info)
#define BB_ALL_FLAGS   ((LAST_CFG_BB_FLAG - 1) * 2 - 1)

Bit mask for all basic block flags.

#define BB_COPY_PARTITION (   dstbb,
  srcbb 
)    BB_SET_PARTITION (dstbb, BB_PARTITION (srcbb))
#define BB_FLAGS_TO_PRESERVE
Value:
(BB_DISABLE_SCHEDULE | BB_RTL | BB_NON_LOCAL_GOTO_TARGET \
| BB_HOT_PARTITION | BB_COLD_PARTITION)

Bit mask for all basic block flags that must be preserved. These are the bit masks that are not cleared by clear_bb_flags.

Referenced by redirect_edge_succ().

#define BB_FOOTER (   B)    (B)->il.x.rtl->footer_
#define BB_FREQ_MAX   10000

Referenced by find_clusters_1().

#define BB_HEADER (   B)    (B)->il.x.rtl->header_
#define BB_PARTITION (   bb)    ((bb)->flags & (BB_HOT_PARTITION|BB_COLD_PARTITION))

Partitions, to be used when partitioning hot and cold basic blocks into separate sections.

Referenced by find_traces_1_round(), fix_crossing_unconditional_branches(), get_uncond_jump_length(), merge_blocks_move_predecessor_nojumps(), merge_blocks_move_successor_nojumps(), and print_rtl_with_bb().

#define BB_SET_PARTITION (   bb,
  part 
)
Value:
do { \
basic_block bb_ = (bb); \
bb_->flags = ((bb_->flags & ~(BB_HOT_PARTITION|BB_COLD_PARTITION)) \
| (part)); \
} while (0)

Referenced by print_rtl_with_bb(), and sanitize_hot_paths().

#define BB_UNPARTITIONED   0

Dummy bitmask for convenience in the hot/cold partitioning code.

#define BRANCH_EDGE (   bb)
Value:
(EDGE_SUCC ((bb), 0)->flags & EDGE_FALLTHRU \
? EDGE_SUCC ((bb), 1) : EDGE_SUCC ((bb), 0))

BB is assumed to contain conditional jump. Return the branch edge.

Referenced by cse_process_notes_1(), and get_last_bb_insn().

#define CLEANUP_CFG_CHANGED   64 /* The caller changed the CFG. */
#define CLEANUP_CFGLAYOUT   32 /* Do cleanup in cfglayout mode. */
#define CLEANUP_CROSSJUMP   2 /* Do crossjumping. */
#define CLEANUP_EXPENSIVE
Value:
1 /* Do relatively expensive optimizations
except for edge forwarding */

Referenced by merge_blocks_move_successor_nojumps(), and migrate_btr_defs().

#define CLEANUP_NO_INSN_DEL
Value:
16 /* Do not try to delete trivially dead
insns. */
#define CLEANUP_POST_REGSTACK
Value:
4 /* We run after reg-stack and need
to care REG_DEAD notes. */
#define CLEANUP_THREADING   8 /* Do jump threading. */
#define DEF_BASIC_BLOCK_FLAG (   NAME,
  IDX 
)    BB_##NAME = 1 << IDX ,

Masks for basic_block.flags.

#define DEF_EDGE_FLAG (   NAME,
  IDX 
)    EDGE_##NAME = 1 << IDX ,

Masks for edge.flags.

#define EDGE_ALL_FLAGS   ((LAST_CFG_EDGE_FLAG - 1) * 2 - 1)

Bit mask for all edge flags.

#define EDGE_COMPLEX   (EDGE_ABNORMAL | EDGE_ABNORMAL_CALL | EDGE_EH | EDGE_PRESERVE)

The following four flags all indicate something special about an edge. Test the edge flags on EDGE_COMPLEX to detect all forms of "strange" control flow transfers.

Referenced by cond_move_convert_if_block(), count_reg_usage(), find_implicit_sets(), remove_fallthru_edge(), and simplify_cond_using_ranges().

#define EDGE_CRITICAL_P (   e)
Value:
(EDGE_COUNT ((e)->src->succs) >= 2 \
&& EDGE_COUNT ((e)->dest->preds) >= 2)

Return nonzero if edge is critical.

Referenced by coalesce_cost_bb(), compute_hash_table(), dump_value_range(), find_group(), instrument_edges(), and rtl_move_block_after().

#define EDGE_FREQUENCY (   e)
#define EDGE_I (   ev,
 
)    (*ev)[(i)]
#define EDGE_INDEX (   el,
  pred,
  succ 
)    (find_edge_index ((el), (pred), (succ)))

EDGE_INDEX returns an integer index for an edge, or EDGE_INDEX_NO_EDGE if there is no edge between the 2 basic blocks.

Referenced by insert_insn_start_basic_block(), print_edge_list(), and verify_edge_list().

#define EDGE_INDEX_NO_EDGE   -1

This is the value which indicates no edge is present.

Referenced by print_edge_list(), and verify_edge_list().

#define ei_last (   iter)    ei_last_1 (&(iter))
#define ENTRY_BLOCK   (0)

Special block numbers [markers] for entry and exit. Neither of them is supposed to hold actual statements.

Referenced by df_get_eh_block_artificial_uses(), df_grow_insn_info(), df_set_bb_dirty(), do_partial_partial_insertion(), same_succ_flush_bb(), and unlink_block().

#define ENTRY_BLOCK_PTR_FOR_FUNCTION (   FN)    ((FN)->cfg->x_entry_block_ptr)

Defines for accessing the fields of the CFG structure for function FN.

Referenced by alloc_loop().

#define EXIT_BLOCK_PTR_FOR_FUNCTION (   FN)    ((FN)->cfg->x_exit_block_ptr)

Referenced by alloc_loop().

#define FALLTHRU_EDGE (   bb)
Value:
(EDGE_SUCC ((bb), 0)->flags & EDGE_FALLTHRU \
? EDGE_SUCC ((bb), 0) : EDGE_SUCC ((bb), 1))

BB is assumed to contain conditional jump. Return the fallthru edge.

Referenced by create_call_for_reduction_1(), and execute_lower_tm().

#define FOR_ALL_BB (   BB)    for (BB = ENTRY_BLOCK_PTR; BB; BB = BB->next_bb)

Cycles through all basic blocks, even the fake ones (entry and exit block).

Referenced by alloc_aux_for_block(), df_live_finalize(), df_live_verify_solution_start(), df_lr_free(), draw_cfg_nodes(), dump_bb_for_graph(), and prescan_insns_for_dce().

#define FOR_ALL_BB_FN (   BB,
  FN 
)    for (BB = ENTRY_BLOCK_PTR_FOR_FUNCTION (FN); BB; BB = BB->next_bb)

Referenced by output_eh_regions().

#define FOR_BB_BETWEEN (   BB,
  FROM,
  TO,
  DIR 
)    for (BB = FROM; BB != TO; BB = BB->DIR)

For iterating over basic blocks.

Referenced by alloc_aux_for_edge(), find_max_flow(), find_working_set(), print_edge_list(), and redirect_edge_succ().

#define FOR_BB_INSNS (   BB,
  INSN 
)
#define FOR_BB_INSNS_REVERSE (   BB,
  INSN 
)
Value:
for ((INSN) = BB_END (BB); \
(INSN) && (INSN) != PREV_INSN (BB_HEAD (BB)); \
(INSN) = PREV_INSN (INSN))

Referenced by df_set_regs_ever_live(), gate_ud_dce(), and loop_latch_edge().

#define FOR_BB_INSNS_REVERSE_SAFE (   BB,
  INSN,
  CURR 
)
Value:
for ((INSN) = BB_END (BB),(CURR) = (INSN) ? PREV_INSN ((INSN)) : NULL; \
(INSN) && (INSN) != PREV_INSN (BB_HEAD (BB)); \
(INSN) = (CURR), (CURR) = (INSN) ? PREV_INSN ((INSN)) : NULL)
#define FOR_BB_INSNS_SAFE (   BB,
  INSN,
  CURR 
)
Value:
for ((INSN) = BB_HEAD (BB), (CURR) = (INSN) ? NEXT_INSN ((INSN)): NULL; \
(INSN) && (INSN) != NEXT_INSN (BB_END (BB)); \
(INSN) = (CURR), (CURR) = (INSN) ? NEXT_INSN ((INSN)) : NULL)

For iterating over insns in basic block when we might remove the current insn.

Referenced by insert_var_expansion_initialization().

#define FOR_EACH_BB_FN (   BB,
  FN 
)    FOR_BB_BETWEEN (BB, (FN)->cfg->x_entry_block_ptr->next_bb, (FN)->cfg->x_exit_block_ptr, next_bb)
#define FOR_EACH_BB_REVERSE (   BB)    FOR_EACH_BB_REVERSE_FN (BB, cfun)

Referenced by profile_function().

#define FOR_EACH_BB_REVERSE_FN (   BB,
  FN 
)    FOR_BB_BETWEEN (BB, (FN)->cfg->x_exit_block_ptr->prev_bb, (FN)->cfg->x_entry_block_ptr, prev_bb)
#define FOR_EACH_EDGE (   EDGE,
  ITER,
  EDGE_VEC 
)
Value:
for ((ITER) = ei_start ((EDGE_VEC)); \
ei_cond ((ITER), &(EDGE)); \
ei_next (&(ITER)))

This macro serves as a convenient way to iterate each edge in a vector of predecessor or successor edges. It must not be used when an element might be removed during the traversal, otherwise elements will be missed. Instead, use a for-loop like that shown in the following pseudo-code:

FOR (ei = ei_start (bb->succs); (e = ei_safe_edge (ei)); ) { IF (e != taken_edge) remove_edge (e); ELSE ei_next (&ei); }

Referenced by add_ranges_and_copies(), alloc_aux_for_edge(), attempt_coalesce(), bb_dom_dfs_in(), check_bb_profile(), clear_edges(), compute_available(), compute_hash_table(), conditional_probability(), contains_no_active_insn_p(), count_reg_usage(), coverage_compute_profile_id(), create_fixup_graph(), debug_var_infos_r(), dfs_enumerate_from(), dominated_by_forbidden(), dump_function_to_file(), dump_split_point(), duplicate_loop(), expand_switch_as_decision_tree_p(), expected_loop_iterations_unbounded(), fill_sons_in_loop(), find_clusters_1(), find_implicit_sets(), find_max_flow(), find_same_succ(), find_traces_1_round(), find_working_set(), finish_copies(), flow_loop_nodes_find(), flow_loops_cfg_dump(), free_aux_for_blocks(), free_expr_hash_elt_contents(), gate_ud_dce(), get_last_bb_insn(), get_tm_region_blocks(), get_uncond_jump_length(), gimple_make_forwarder_block(), gimple_purge_dead_eh_edges(), ssa_names_hasher::hash(), independent_of_stmt_p(), insert_insn_start_basic_block(), ipa_tm_create_version(), ipa_tm_scan_calls_transaction(), ipa_uninstrument_transaction(), lower_eh_constructs(), lv_flush_pending_stmts(), make_edges(), mark_regno_dead(), one_pre_gcse_pass(), output_eh_regions(), output_location(), pre_and_rev_post_order_compute(), print_edge_list(), print_loop(), record_const_or_copy(), record_loop_exits(), remove_conditions_and_labels(), remove_forwarder_block(), reorder_basic_blocks(), replace_pseudos_in(), same_phi_alternatives_1(), sanitize_hot_paths(), sese_insert_phis_for_liveouts(), set_bb_counts(), set_var_live_on_entry(), simplify_cond_using_ranges(), simulate_stmt(), split_edge(), split_function(), thread_single_edge(), tm_memopt_accumulate_memops(), update_bb_profile_for_threading(), verify_dominators(), verify_edge_list(), and control_dependences::~control_dependences().

#define GCOV_COMPUTE_SCALE (   num,
  den 
)    ((den) ? RDIV ((num) * REG_BR_PROB_BASE, (den)) : REG_BR_PROB_BASE)

Compute a scale factor (or probability) suitable for scaling of gcov_type values via apply_probability() and apply_scale().

Referenced by conditional_probability(), find_clusters(), and input_profile_summary().

#define INDEX_EDGE (   el,
  index 
)    ((el)->index_to_edge[(index)])

INDEX_EDGE returns a pointer to the edge.

Referenced by find_group(), and find_pdom().

#define INDEX_EDGE_PRED_BB (   el,
  index 
)    ((el)->index_to_edge[(index)]->src)

INDEX_EDGE_PRED_BB and INDEX_EDGE_SUCC_BB return a pointer to the basic block which is either the pred or succ end of the indexed edge.

Referenced by print_edge_list().

#define INDEX_EDGE_SUCC_BB (   el,
  index 
)    ((el)->index_to_edge[(index)]->dest)
#define label_to_block_map   (cfun->cfg->x_label_to_block_map)

Referenced by gimple_call_arg_flags().

#define label_to_block_map_for_function (   FN)    ((FN)->cfg->x_label_to_block_map)
#define last_basic_block_for_function (   FN)    ((FN)->cfg->x_last_basic_block)

Referenced by output_eh_regions().

#define n_basic_blocks_for_function (   FN)    ((FN)->cfg->x_n_basic_blocks)

Referenced by alloc_loop().

#define n_edges   (cfun->cfg->x_n_edges)
#define n_edges_for_function (   FN)    ((FN)->cfg->x_n_edges)
#define NUM_EDGES (   el)    ((el)->num_edges)

Number of edges in the compressed edge list.

Referenced by compute_insert_delete().

#define NUM_FIXED_BLOCKS   (2)
#define profile_status   (cfun->cfg->x_profile_status)
#define profile_status_for_function (   FN)    ((FN)->cfg->x_profile_status)
#define RDIV (   X,
  Y 
)    (((X) + (Y) / 2) / (Y))

Referenced by probably_never_executed().

#define SET_BASIC_BLOCK (   N,
  BB 
)    ((*basic_block_info)[(N)] = (BB))

Referenced by compact_blocks(), and unlink_block().

#define SET_BASIC_BLOCK_FOR_FUNCTION (   FN,
  N,
  BB 
)    ((*basic_block_info_for_function (FN))[(N)] = (BB))
#define set_block_for_insn (   INSN,
  BB 
)    (BLOCK_FOR_INSN (INSN) = BB)

Typedef Documentation

typedef int __assert_gimple_bb_smaller_rtl_bb[(int) sizeof(struct rtl_bb_info)-(int) sizeof(struct gimple_bb_info)]

This ensures that struct gimple_bb_info is smaller than struct rtl_bb_info, so that inlining the former into basic_block_def is the better choice.

typedef struct ce_if_block ce_if_block_t

Structure to group all of the information to process IF-THEN and IF-THEN-ELSE blocks for the conditional execution support. This needs to be in a public file in case the IFCVT macros call functions passing the ce_if_block data structure.


Enumeration Type Documentation

In dominance.c

Enumerator:
CDI_DOMINATORS 
CDI_POST_DOMINATORS 
Enumerator:
DEF_BASIC_BLOCK_FLAG 

Flags on basic blocks and edges. Copyright (C) 2012-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/. This file defines flags that may appear on basic blocks or on edges. Source files define DEF_BASIC_BLOCK_FLAG or DEF_EDGE_FLAG appropriately before including this file. Masks for basic_block.flags.

The format of this file is: DEF_BASIC_BLOCK_FLAG(NAME, IDX). NAME is the name of the basic block flag. A flag BB_::NAME will be created and the name is used in dump_edge_info. IDX is a sequence number that is used to determine the value of the flag, which is 1 << IDX).

BB_HOT_PARTITION and BB_COLD_PARTITION should be preserved throughout the compilation, so they are never cleared.

All other flags may be cleared by clear_bb_flags(). It is generally a bad idea to rely on any flags being up-to-date. Only set on blocks that have just been created by create_bb.

Enumerator:
LAST_CFG_EDGE_FLAG 

Flags on basic blocks and edges. Copyright (C) 2012-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/. This file defines flags that may appear on basic blocks or on edges. Source files define DEF_BASIC_BLOCK_FLAG or DEF_EDGE_FLAG appropriately before including this file. Masks for edge.flags.

The format of this file is: DEF_EDGE_FLAG(NAME, IDX, STRING). NAME is the name of the edge flag. A flag EDGE_::NAME will be created and the name is used in dump_edge_info. IDX is a sequence number that is used to determine the value of the flag, which is 1 << IDX). 'Straight line' flow. In GIMPLE and in cfglayout mode, all normal edges are fallthru edges. In cfgrtl mode, this flag really means that control flow falls through to the next basic block in the line. Strange flow, like a computed jump or exception handling. Usually this means that the edge cannot be split. Edge out of a basic block that ends with a CALL_INSN with abnormal exit, like an exception or a non-local goto. ABNORMAL_CALL edges also have ABNORMAL set. This flag is only used for the RTL CFG. Exception edge. Exception handling edges represent possible control transfers from a trapping instruction to an exception handler. EH edges also have ABNORMAL set for the RTL CFG. Never merge blocks via this edge. This is used for exception handling, to prevent merging away edges to the post-landing-pad basic block. This flag is only used for the RTL CFG. Not a real edge. This is used to connect parts of the CFG that do not halt, such as infinite loops and noreturn functions, to the EXIT_BLOCK, so that traversing of the reverse CFG is possible. A back edge, marked in a depth-first search of the CFG. Back edges are hints that this edge may be part of a loop in the CFG. Edge in a part of the CFG that is an irreducible loop. Edge taken when controlling predicate is nonzero. This is only used for the GIMPLE CFG. Edge taken when controlling predicate is zero. This is only used for the GIMPLE CFG. Edge is executable. This is only used in GIMPLE SSA-CCP and VRP. This is only used for the GIMPLE CFG. Edge crosses between hot and cold sections, when we do partitioning. This flag is only used for the RTL CFG. Edge from a sibcall CALL_INSN to exit. SIBCALL edges also have ABNORMAL set. This flag is only used for the RTL CFG. Candidate for straight line flow. Only used in bb-reorder.c. This flag is only used for the RTL CFG. Exit of a loop. This is only used in ifcvt.c. This flag is only used for the RTL CFG. Uninstrumented edge out of a GIMPLE_TRANSACTION statement. Abort (over) edge out of a GIMPLE_TRANSACTION statement.

enum dom_state

State of dominance information.

Enumerator:
DOM_NONE 
DOM_NO_FAST_QUERY 
DOM_OK 

What sort of profiling information we have.

Enumerator:
PROFILE_ABSENT 
PROFILE_GUESSED 
PROFILE_READ 
PROFILE_LAST 
Enumerator:
dir_none 
dir_forward 
dir_backward 
dir_both 

Function Documentation

void add_noreturn_fake_exit_edges ( void  )

This function will add a fake edge between any block which has no successors, and the exit block. Some data flow equations require these edges to exist.

Referenced by output_location(), and pre_insert_copies().

void add_to_dominance_info ( enum  cdi_direction,
basic_block   
)
void alloc_aux_for_blocks ( int  )
void alloc_aux_for_edge ( edge  ,
int   
)

Referenced by free_aux_for_blocks().

void alloc_aux_for_edges ( int  )
basic_block alloc_block ( void  )

Allocate memory for basic_block.

References basic_block_def::next_bb, and basic_block_def::prev_bb.

static gcov_type apply_probability ( )
inlinestatic

Apply probability PROB on frequency or count FREQ.

Referenced by cgraph_clone_edge(), and expand_transaction().

static gcov_type apply_scale ( )
inlinestatic

Apply scale factor SCALE on frequency or count FREQ. Use this interface when potentially scaling up, so that SCALE is not constrained to be < REG_BR_PROB_BASE.

Referenced by input_cfg(), and input_profile_summary().

unsigned bb_dom_dfs_in ( enum  cdi_direction,
basic_block   
)

Referenced by cmp_dfsnum().

unsigned bb_dom_dfs_out ( enum  cdi_direction,
basic_block   
)

Referenced by cmp_dfsnum().

static bool bb_has_abnormal_pred ( )
inlinestatic

Return true when one of the predecessor edges of BB is marked with EDGE_ABNORMAL.

Referenced by replace_pseudos_in().

static bool bb_has_eh_pred ( )
inlinestatic

Return true when one of the predecessor edges of BB is marked with EDGE_EH.

rtx bb_note ( basic_block  )

Referenced by delete_insn().

void bitmap_intersection_of_preds ( sbitmap  ,
sbitmap ,
basic_block   
)

Referenced by compute_available().

void bitmap_intersection_of_succs ( sbitmap  ,
sbitmap ,
basic_block   
)
void bitmap_union_of_preds ( sbitmap  ,
sbitmap ,
basic_block   
)

Referenced by compute_kill(), and compute_out().

void bitmap_union_of_succs ( sbitmap  ,
sbitmap ,
basic_block   
)
bool br_prob_note_reliable_p ( const_rtx  )
void break_superblocks ( void  )

Splits superblocks.

void brief_dump_cfg ( FILE *  ,
int   
)
edge cached_make_edge ( sbitmap  ,
basic_block  ,
basic_block  ,
int   
)
void calculate_dominance_info ( enum  cdi_direction)
bool can_fallthru ( basic_block  ,
basic_block   
)
static void check_probability ( )
inlinestatic

Check tha probability is sane.

bool cleanup_cfg ( int  )
void clear_aux_for_blocks ( void  )

Clear AUX pointers of all blocks.

References edge_aux_obstack, and gcc_obstack_init.

Referenced by alloc_aux_for_blocks(), and duplicate_computed_gotos().

void clear_aux_for_edges ( void  )

Clear AUX pointers of all edges.

References alloca, first, and NULL.

Referenced by alloc_aux_for_edges().

void clear_bb_flags ( void  )

Clear all basic block flags that do not have to be preserved.

Referenced by reorder_basic_blocks().

void clear_edges ( void  )

Free the memory associated with the edge structures.

References FOR_EACH_EDGE, free_edge(), basic_block_def::preds, basic_block_def::succs, and vec_safe_truncate().

static int combine_probabilities ( )
inlinestatic

Given PROB1 and PROB2, return PROB1*PROB2/REG_BR_PROB_BASE. Used to combine BB probabilities.

Referenced by estimate_ipcp_clone_size_and_time().

void commit_edge_insertions ( void  )

Update the CFG for all queued instructions.

Optimization passes that invoke this routine can cause hot blocks previously reached by both hot and cold blocks to become dominated only by cold blocks. This will cause the verification below to fail, and lead to now cold code in the hot section. In some cases this may only be visible after newly unreachable blocks are deleted, which will be done by fixup_partitions.

Referenced by cfg_layout_can_merge_blocks_p().

void commit_one_edge_insertion ( edge  e)
void compact_blocks ( void  )

Sequentially order blocks and compact the arrays.

References FOR_EACH_BB, gcc_assert, basic_block_def::index, last_basic_block, n_basic_blocks, NULL, NUM_FIXED_BLOCKS, and SET_BASIC_BLOCK.

Referenced by cleanup_tree_cfg_1().

void compute_available ( sbitmap avloc,
sbitmap kill,
sbitmap avout,
sbitmap avin 
)

Compute the AVIN and AVOUT vectors from the AVLOC and KILL vectors. Return the number of passes we performed to iterate to a solution.

 Allocate a worklist array/queue.  Entries are only added to the
 list if they were not already on the list.  So the size is
 bounded by the number of basic blocks.   
 We want a maximal solution.   
 Put every block on the worklist; this is necessary because of the
 optimistic initialization of AVOUT above.   
 Mark blocks which are successors of the entry block so that we
 can easily identify them below.   
 Iterate until the worklist is empty.   
     Take the first entry off the worklist.   
     If one of the predecessor blocks is the ENTRY block, then the
     intersection of avouts is the null set.  We can identify such blocks
     by the special value in the AUX field in the block structure.   
       Do not clear the aux field for blocks which are successors of the
       ENTRY block.  That way we never add then to the worklist again.   
         Clear the aux field of this block so that it can be added to
         the worklist again if necessary.   
       If the out state of this block changed, then we need
       to add the successors of this block to the worklist
       if they are not already on the worklist.   

References basic_block_def::aux, bitmap_clear(), bitmap_intersection_of_preds(), bitmap_ior_and_compl(), edge_def::dest, FOR_EACH_EDGE, basic_block_def::index, NULL, basic_block_def::succs, and worklist.

Referenced by compute_insert_delete(), and free_cprop_mem().

void compute_bb_for_insn ( void  )

Records the basic block struct in BLOCK_FOR_INSN for every insn.

References crtl, df_analyze(), df_note_add_problem(), free_bb_for_insn(), and insert_section_boundary_note().

void compute_dominance_frontiers ( struct bitmap_head_def )
bitmap compute_idf ( bitmap  ,
struct bitmap_head_def  
)
void connect_infinite_loops_to_exit ( void  )

This function adds a fake edge between any infinite loops to the exit block. Some optimizations require a path from each node to the exit node.

See also Morgan, Figure 3.10, pp. 82-83.

The current implementation is ugly, not attempting to minimize the number of inserted fake edges. To reduce the number of fake edges to insert, add fake edges from innermost loops containing only nodes not reachable from the exit block.

Perform depth-first search in the reverse graph to find nodes reachable from the exit block.

 Repeatedly add fake edges, updating the unreachable nodes.   
bool contains_no_active_insn_p ( const_basic_block  )
bool control_flow_insn_p ( const_rtx  )

Referenced by rtl_verify_edges().

basic_block create_basic_block_structure ( rtx  ,
rtx  ,
rtx  ,
basic_block   
)
struct edge_list* create_edge_list ( void  )
read

Functions to access an edge list with a vector representation. Enough data is kept such that given an index number, the pred and succ that edge represents can be determined, or given a pred and a succ, its index number can be returned. This allows algorithms which consume a lot of memory to represent the normally full matrix of edge (pred,succ) with a single indexed vector, edge (EDGE_INDEX (pred, succ)), with no wasted space in the client code due to sparse flow graphs. This functions initializes the edge list. Basically the entire flowgraph is processed, and all edges are assigned a number, and the data structure is filled in.

Determine the number of edges in the flow graph by counting successor edges on each basic block.

 Follow successors of blocks, and register these edges.   

Referenced by compute_insert_delete().

void debug ( edge_def ref)
void debug ( edge_def ptr)
void debug_bb ( basic_block  )
basic_block debug_bb_n ( int  )
void default_rtl_profile ( void  )

Set RTL expansion to default mode (i.e. when profile info is not known).

References pointer_map_contains().

Referenced by blocks_nreverse().

void delete_from_dominance_info ( enum  cdi_direction,
basic_block   
)
bool delete_unreachable_blocks ( void  )

Delete all unreachable basic blocks.

When we're in GIMPLE mode and there may be debug insns, we should delete blocks in reverse dominator order, so as to get a chance to substitute all released DEFs into debug stmts. If we don't have dominators information, walking blocks backward gets us a better chance of retaining most debug information than otherwise.

             Speed up the removal of blocks that don't dominate
             others.  Walking backwards, this should be the common
             case.   

Referenced by cleanup_empty_eh_unsplit(), cleanup_tree_cfg_1(), and split_live_ranges_for_shrink_wrap().

int dfs_enumerate_from ( basic_block  bb,
int  reverse,
bool(*)(const_basic_block, const void *)  predicate,
basic_block rslt,
int  rslt_max,
const void *  data 
)

Performs dfs search from BB over vertices satisfying PREDICATE; if REVERSE, go against direction of edges. Returns number of blocks found and their list in RSLT. RSLT can contain at most RSLT_MAX items.

 A bitmap to keep track of visited blocks.  Allocating it each time
 this function is called is not possible, since dfs_enumerate_from
 is often used on small (almost) disjoint parts of cfg (bodies of
 loops), and allocating a large sbitmap would lead to quadratic
 behavior.   
 Resize the VISITED sbitmap if necessary.   
     Ensure that we increase the size of the sbitmap exponentially.   

References bitmap_set_bit, CDI_DOMINATORS, EDGE_COUNT, ENTRY_BLOCK_PTR, FOR_EACH_BB, FOR_EACH_EDGE, get_immediate_dominator(), basic_block_def::index, basic_block_def::preds, and edge_def::src.

Referenced by thread_single_edge().

basic_block dfs_find_deadend ( basic_block  )

Referenced by remove_fake_exit_edges().

bool dom_info_available_p ( enum  cdi_direction)
enum dom_state dom_info_state ( enum  cdi_direction)
void dump_bb_info ( FILE *  outf,
basic_block  bb,
int  indent,
int  flags,
bool  do_header,
bool  do_footer 
)

Dumps cfg related information about basic block BB to OUTF. If HEADER is true, dump things that appear before the instructions contained in BB. If FOOTER is true, dump things that appear after. Flags are the TDF_* masks as documented in dumpfile.h. NB: With TDF_DETAILS, it is assumed that cfun is available, so that maybe_hot_bb_p and probably_never_executed_bb_p don't ICE.

Flags on basic blocks and edges. Copyright (C) 2012-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/.

This file defines flags that may appear on basic blocks or on edges. Source files define DEF_BASIC_BLOCK_FLAG or DEF_EDGE_FLAG appropriately before including this file.

Masks for basic_block.flags.

The format of this file is: DEF_BASIC_BLOCK_FLAG(NAME, IDX). NAME is the name of the basic block flag. A flag BB_::NAME will be created and the name is used in dump_edge_info. IDX is a sequence number that is used to determine the value of the flag, which is 1 << IDX).

BB_HOT_PARTITION and BB_COLD_PARTITION should be preserved throughout the compilation, so they are never cleared.

All other flags may be cleared by clear_bb_flags(). It is generally a bad idea to rely on any flags being up-to-date.

Only set on blocks that have just been created by create_bb.

Set by find_unreachable_blocks. Do not rely on this being set in any pass.

Set for blocks in an irreducible loop by loop analysis.

Set on blocks that may actually not be single-entry single-exit block.

Set on basic blocks that the scheduler should not touch. This is used by SMS to prevent other schedulers from messing with the loop schedule.

Set on blocks that should be put in a hot section.

Set on blocks that should be put in a cold section.

Set on block that was duplicated.

Set if the label at the top of this block is the target of a non-local goto.

Set on blocks that are in RTL format.

Set on blocks that are forwarder blocks. Only used in cfgcleanup.c.

Set on blocks that cannot be threaded through. Only used in cfgcleanup.c.

Set on blocks that were modified in some way. This bit is set in df_set_bb_dirty, but not cleared by df_analyze, so it can be used to test whether a block has been modified prior to a df_analyze call.

A general visited flag for passes to use.

Set on blocks that are in a transaction. This is calculated on demand, and is available after calling compute_transaction_bits().

Masks for edge.flags.

The format of this file is: DEF_EDGE_FLAG(NAME, IDX, STRING). NAME is the name of the edge flag. A flag EDGE_::NAME will be created and the name is used in dump_edge_info. IDX is a sequence number that is used to determine the value of the flag, which is 1 << IDX).

'Straight line' flow. In GIMPLE and in cfglayout mode, all normal edges are fallthru edges. In cfgrtl mode, this flag really means that control flow falls through to the next basic block in the line.

Strange flow, like a computed jump or exception handling. Usually this means that the edge cannot be split.

Edge out of a basic block that ends with a CALL_INSN with abnormal exit, like an exception or a non-local goto. ABNORMAL_CALL edges also have ABNORMAL set. This flag is only used for the RTL CFG.

Exception edge. Exception handling edges represent possible control transfers from a trapping instruction to an exception handler. EH edges also have ABNORMAL set for the RTL CFG.

Never merge blocks via this edge. This is used for exception handling, to prevent merging away edges to the post-landing-pad basic block. This flag is only used for the RTL CFG.

Not a real edge. This is used to connect parts of the CFG that do not halt, such as infinite loops and noreturn functions, to the EXIT_BLOCK, so that traversing of the reverse CFG is possible.

A back edge, marked in a depth-first search of the CFG. Back edges are hints that this edge may be part of a loop in the CFG.

Edge in a part of the CFG that is an irreducible loop.

Edge taken when controlling predicate is nonzero. This is only used for the GIMPLE CFG.

Edge taken when controlling predicate is zero. This is only used for the GIMPLE CFG.

Edge is executable. This is only used in GIMPLE SSA-CCP and VRP. This is only used for the GIMPLE CFG.

Edge crosses between hot and cold sections, when we do partitioning. This flag is only used for the RTL CFG.

Edge from a sibcall CALL_INSN to exit. SIBCALL edges also have ABNORMAL set. This flag is only used for the RTL CFG.

Candidate for straight line flow. Only used in bb-reorder.c. This flag is only used for the RTL CFG.

Exit of a loop. This is only used in ifcvt.c. This flag is only used for the RTL CFG.

Uninstrumented edge out of a GIMPLE_TRANSACTION statement.

Abort (over) edge out of a GIMPLE_TRANSACTION statement.

void dump_edge_info ( FILE *  ,
edge  ,
int  ,
int   
)
void dump_flow_info ( FILE *  ,
int   
)

Referenced by dump_flow_info().

bool edge_probability_reliable_p ( const_edge  )
static bool ei_cond ( )
inlinestatic

Return 1 if we should continue to iterate. Return 0 otherwise. *Edge P is set to the next edge if we are to continue to iterate and NULL otherwise.

static vec<edge, va_gc>* ei_container ( )
inlinestatic

Referenced by insert_store().

static edge ei_edge ( )
inlinestatic

Return the edge pointed to by the iterator `i'.

Referenced by insert_store(), and link_roots().

static bool ei_end_p ( )
inlinestatic

Is the iterator `i' at the end of the sequence?

Referenced by insert_store(), and link_roots().

static edge_iterator ei_last_1 ( )
inlinestatic

Return an iterator pointing to the last element of an edge vector.

static bool ei_one_before_end_p ( )
inlinestatic

Is the iterator `i' at one position before the end of the sequence?

Referenced by post_order_compute().

static void ei_prev ( )
inlinestatic

Move the iterator to the previous element.

static edge ei_safe_edge ( )
inlinestatic

Return an edge pointed to by the iterator. Do it safely so that NULL is returned when the iterator is pointing at the end of the sequence.

Referenced by find_edge(), find_implicit_sets(), gimple_expand_cfg(), and move_stmt_r().

static edge_iterator ei_start_1 ( )
inlinestatic

Return an iterator pointing to the start of an edge vector.

void emit_barrier_after_bb ( basic_block  bb)
void expunge_block ( basic_block  )
int find_edge_index ( struct edge_list ,
basic_block  ,
basic_block   
)
static edge find_fallthru_edge ( )
inlinestatic

Return the fallthru edge in EDGES if it exists, NULL otherwise.

Referenced by cfg_layout_initialize(), and find_active_insn_after().

void find_many_sub_basic_blocks ( sbitmap  )
void find_unreachable_blocks ( void  )

In cfganal.c

Find unreachable blocks. An unreachable block will have 0 in the reachable bit in block->flags. A nonzero value indicates the block is reachable.

 Clear all the reachability flags.   
 Add our starting points to the worklist.  Almost always there will
 be only one.  It isn't inconceivable that we might one day directly
 support Fortran alternate entry points.   
     Mark the block reachable.   
 Iterate: find everything reachable from what we've already seen.   

References basic_block_def::flags.

Referenced by replace_locals_op().

gcov_working_set_t* find_working_set ( unsigned  pct_times_10)
basic_block first_dom_son ( enum  cdi_direction,
basic_block   
)
bool fixup_abnormal_edges ( void  )

This is used by a few passes that emit some instructions after abnormal calls, moving the basic block's end, while they in fact do want to emit them on the fallthru edge. Look for abnormal call edges, find backward the call in the block and insert the instructions on the edge instead.

Similarly, handle instructions throwing exceptions internally.

Return true when instructions have been found and inserted on edges.

     Look for cases we are interested in - calls or instructions causing
     exceptions.   
         Get past the new insns generated.  Allow notes, as the insns
         may be already deleted.   
                     Sometimes there's still the return value USE.
                     If it's placed after a trapping call (i.e. that
                     call is the last insn anyway), we have no fallthru
                     edge.  Simply delete this use and don't try to insert
                     on the non-existent edge.   
                         We're not deleting it, we're moving it.   
         It may be that we don't find any trapping insn.  In this
         case we discovered quite late that the insn that had been
         marked as can_throw_internal in fact couldn't trap at all.
         So we should in fact delete the EH edges out of the block.   
void fixup_partitions ( void  )

Perform cleanup on the hot/cold bb partitioning after optimization passes that modify the cfg.

 Delete any blocks that became unreachable and weren't
 already cleaned up, for example during edge forwarding
 and convert_jumps_to_returns. This will expose more
 opportunities for fixing the partition boundaries here.
 Also, the calculation of the dominance graph during verification
 will assert if there are unreachable nodes.   
 If there are partitions, do a sanity check on them: A basic block in

  a cold partition cannot dominate a basic block in a hot partition. Fixup any that now violate this requirement, as a result of edge forwarding and unreachable block deletion.  

 Do the partition fixup after all necessary blocks have been converted to
 cold, so that we only update the region crossings the minimum number of
 places, which can require forcing edges to be non fallthru.   

References error(), get_insns(), basic_block_def::index, print_rtl_with_bb(), and TDF_RTL.

int flow_find_cross_jump ( basic_block  bb1,
basic_block  bb2,
rtx f1,
rtx f2,
enum replace_direction dir_p 
)

Look through the insns at the end of BB1 and BB2 and find the longest sequence that are either equivalent, or allow forward or backward replacement. Store the first insns for that sequence in *F1 and *F2 and return the sequence length.

DIR_P indicates the allowed replacement direction on function entry, and the actual replacement direction on function exit. If NULL, only equivalent sequences are allowed.

To simplify callers of this function, if the blocks match exactly, store the head of the blocks in *F1 and *F2.

 Skip simple jumps at the end of the blocks.  Complex jumps still
 need to be compared for equivalence, which we'll do below.   
     Count everything except for unconditional jump as insn.   
     In the following example, we can replace all jumps to C by jumps to A.

     This removes 4 duplicate insns.
     [bb A] insn1            [bb C] insn1
            insn2                   insn2
     [bb B] insn3                   insn3
            insn4                   insn4
            jump_insn               jump_insn

     We could also replace all jumps to A by jumps to C, but that leaves B
     alive, and removes only 2 duplicate insns.  In a subsequent crossjump
     step, all jumps to B would be replaced with jumps to the middle of C,
     achieving the same result with more effort.
     So we allow only the first possibility, which means that we don't allow
     fallthru in the block that's being replaced.   
     Don't begin a cross-jump with a NOTE insn.   
 Include preceding notes and labels in the cross-jump.  One,
 this may bring us to the head of the blocks as requested above.
 Two, it keeps line number notes as matched as may be.   
int flow_find_head_matching_sequence ( basic_block  bb1,
basic_block  bb2,
rtx f1,
rtx f2,
int  stop_after 
)

Like flow_find_cross_jump, except start looking for a matching sequence from the head of the two blocks. Do not include jumps at the end. If STOP_AFTER is nonzero, stop after finding that many matching instructions.

     Ignore notes, except NOTE_INSN_EPILOGUE_BEG.   
     A sanity check to make sure we're not merging insns with different
     effects on EH.  If only one of them ends a basic block, it shouldn't
     have an EH edge; if both end a basic block, there should be the same
     number of EH edges.   
     Don't begin a cross-jump with a NOTE insn.   
basic_block force_nonfallthru_and_redirect ( edge  ,
basic_block  ,
rtx   
)
bool forwarder_block_p ( const_basic_block  )
void free_aux_for_blocks ( void  )

Free data allocated in block_aux_obstack and clear AUX pointers of all blocks.

References alloc_aux_for_edge(), FOR_EACH_EDGE, and basic_block_def::succs.

void free_aux_for_edges ( void  )

Free data allocated in edge_aux_obstack and clear AUX pointers of all edges.

unsigned int free_bb_for_insn ( void  )

Release the basic_block_for_insn array.

References OPTGROUP_NONE, RTL_PASS, and TV_NONE.

Referenced by compute_bb_for_insn().

void free_edge_list ( struct edge_list )

Referenced by pre_insert_copies().

vec<basic_block> get_all_dominated_blocks ( enum  cdi_direction,
basic_block   
)
basic_block get_bb_copy ( basic_block  )
basic_block get_bb_original ( basic_block  )
vec<basic_block> get_dominated_by ( enum  cdi_direction,
basic_block   
)

Referenced by split_edge_and_insert().

vec<basic_block> get_dominated_by_region ( enum cdi_direction  dir,
basic_block region,
unsigned  n_region 
)

Returns the list of basic blocks that are immediately dominated (in direction DIR) by some block between N_REGION ones stored in REGION, except for blocks in the REGION itself.

References basic_block_def::dom, dom_computed, dom_convert_dir_to_idx(), DOM_NO_FAST_QUERY, DOM_OK, et_set_father(), et_split(), gcc_checking_assert, and et_node::son.

Referenced by move_stmt_r().

vec<basic_block> get_dominated_to_depth ( enum  cdi_direction,
basic_block  ,
int   
)
basic_block get_immediate_dominator ( enum  cdi_direction,
basic_block   
)
rtx get_last_bb_insn ( basic_block  )
struct loop* get_loop_copy ( struct loop )
read
void gimple_predict_edge ( edge  ,
enum  br_predictor,
int   
)
bool gimple_predicted_by_p ( const_basic_block  ,
enum  br_predictor 
)
void gt_ggc_mx ( edge_def e)

Garbage collection and PCH support for edge_def.

void gt_pch_nx ( edge_def e)
void gt_pch_nx ( edge_def e,
gt_pointer_operator  ,
void *   
)
void guess_outgoing_edge_probabilities ( basic_block  )
void init_flow ( struct function )

In cfg.c

void init_rtl_bb_info ( basic_block  )
void initialize_original_copy_tables ( void  )

Initialize the data structures to maintain mapping between blocks and its copies.

Referenced by ssa_name_has_uses_outside_loop_p(), vect_create_cond_for_alias_checks(), and vect_update_ivs_after_vectorizer().

void insert_insn_on_edge ( rtx  ,
edge   
)
bool inside_basic_block_p ( const_rtx  )
static int inverse_probability ( )
inlinestatic

Return inverse probability for PROB.

int inverted_post_order_compute ( int *  )

Referenced by dom_walker::walk().

void iterate_fix_dominators ( enum cdi_direction  dir,
vec< basic_block bbs,
bool  conservative 
)

Recompute dominance information for basic blocks in the set BBS. The function assumes that the immediate dominators of all the other blocks in CFG are correct, and that there are no unreachable blocks.

If CONSERVATIVE is true, we additionally assume that all the ancestors of a block of BBS in the current dominance tree dominate it.

 We only support updating dominators.  There are some problems with
 updating postdominators (need to add fake edges from infinite loops
 and noreturn functions), and since we do not currently use
 iterate_fix_dominators for postdominators, any attempt to handle these
 problems would be unused, untested, and almost surely buggy.  We keep
 the DIR argument for consistency with the rest of the dominator analysis
 interface.   
 The algorithm we use takes inspiration from the following papers, although
 the details are quite different from any of them:

 [1] G. Ramalingam, T. Reps, An Incremental Algorithm for Maintaining the
     Dominator Tree of a Reducible Flowgraph
 [2]  V. C. Sreedhar, G. R. Gao, Y.-F. Lee: Incremental computation of
      dominator trees
 [3]  K. D. Cooper, T. J. Harvey and K. Kennedy: A Simple, Fast Dominance
      Algorithm

 First, we use the following heuristics to decrease the size of the BBS
 set:
   a) if BB has a single predecessor, then its immediate dominator is this
      predecessor
   additionally, if CONSERVATIVE is true:
   b) if all the predecessors of BB except for one (X) are dominated by BB,
      then X is the immediate dominator of BB
   c) if the nearest common ancestor of the predecessors of BB is X and
      X -> BB is an edge in CFG, then X is the immediate dominator of BB

 Then, we need to establish the dominance relation among the basic blocks
 in BBS.  We split the dominance tree by removing the immediate dominator
 edges from BBS, creating a forest F.  We form a graph G whose vertices
 are BBS and ENTRY and X -> Y is an edge of G if there exists an edge
 X' -> Y in CFG such that X' belongs to the tree of the dominance forest
 whose root is X.  We then determine dominance tree of G.  Note that
 for X, Y in BBS, X dominates Y in CFG if and only if X dominates Y in G.
 In this step, we can use arbitrary algorithm to determine dominators.
 We decided to prefer the algorithm [3] to the algorithm of
 Lengauer and Tarjan, since the set BBS is usually small (rarely exceeding
 10 during gcc bootstrap), and [3] should perform better in this case.

 Finally, we need to determine the immediate dominators for the basic
 blocks of BBS.  If the immediate dominator of X in G is Y, then
 the immediate dominator of X in CFG belongs to the tree of F rooted in
 Y.  We process the dominator tree T of G recursively, starting from leaves.
 Suppose that X_1, X_2, ..., X_k are the sons of Y in T, and that the
 subtrees of the dominance tree of CFG rooted in X_i are already correct.
 Let G' be the subgraph of G induced by {X_1, X_2, ..., X_k}.  We make
 the following observations:
   (i) the immediate dominator of all blocks in a strongly connected
       component of G' is the same
   (ii) if X has no predecessors in G', then the immediate dominator of X
        is the nearest common ancestor of the predecessors of X in the
        subtree of F rooted in Y
 Therefore, it suffices to find the topological ordering of G', and
 process the nodes X_i in this order using the rules (i) and (ii).
 Then, we contract all the nodes X_i with Y in G, so that the further
 steps work correctly.   
     Split the tree now.  If the idoms of blocks in BBS are not
     conservatively correct, setting the dominators using the
     heuristics in prune_bbs_to_update_dominators could
     create cycles in the dominance "tree", and cause ICE.   
 Construct the graph G.   
     If the dominance tree is conservatively correct, split it now.   
         Do not include parallel edges to G.   
 Find the dominator tree of G.   
 Finally, traverse the tree and find the immediate dominators.   
void link_block ( basic_block  ,
basic_block   
)
edge make_single_succ_edge ( basic_block  ,
basic_block  ,
int   
)
bool mark_dfs_back_edges ( void  )

Mark the back edges in DFS traversal. Return nonzero if a loop (natural or otherwise) is present. Inspired by Depth_First_Search_PP described in:

Advanced Compiler Design and Implementation Steven Muchnick Morgan Kaufmann, 1997

and heavily borrowed from pre_and_rev_post_order_compute.

 Allocate the preorder and postorder number arrays.   
 Allocate stack for back-tracking up CFG.   
 Allocate bitmap to track nodes that have been visited.   
 None of the nodes in the CFG have been visited yet.   
 Push the first edge on to the stack.   
     Look at the edge on the top of the stack.   
     Check if the edge destination has been visited yet.   
         Mark that we have visited the destination.   
             Since the DEST node has been visited for the first
             time, check its successors.   

Referenced by draw_cfg_nodes().

bool maybe_hot_bb_p ( struct function ,
const_basic_block   
)
bool maybe_hot_edge_p ( edge  )
bool mfb_keep_just ( edge  )
basic_block nearest_common_dominator ( enum  cdi_direction,
basic_block  ,
basic_block   
)
basic_block nearest_common_dominator_for_set ( enum  cdi_direction,
bitmap   
)

Referenced by same_phi_alternatives_1().

basic_block next_dom_son ( enum  cdi_direction,
basic_block   
)
bool optimize_bb_for_size_p ( const_basic_block  )

Referenced by create_outofssa_var_map().

bool optimize_edge_for_size_p ( edge  )

Referenced by optimize_bb_for_size_p().

bool optimize_edge_for_speed_p ( edge  )

Referenced by find_traces_1_round().

bool optimize_loop_for_size_p ( struct loop )

Referenced by tree_ssa_unswitch_loops().

bool optimize_loop_for_speed_p ( struct loop )
bool optimize_loop_nest_for_size_p ( struct loop )
bool optimize_loop_nest_for_speed_p ( struct loop )
int post_order_compute ( int *  post_order,
bool  include_entry_exit,
bool  delete_unreachable 
)

Compute reverse top sort order. This is computing a post order numbering of the graph. If INCLUDE_ENTRY_EXIT is true, then ENTRY_BLOCK and EXIT_BLOCK are included. If DELETE_UNREACHABLE is true, unreachable blocks are deleted.

 Allocate stack for back-tracking up CFG.   
 Allocate bitmap to track nodes that have been visited.   
 None of the nodes in the CFG have been visited yet.   
 Push the first edge on to the stack.   
     Look at the edge on the top of the stack.   
     Check if the edge destination has been visited yet.   
         Mark that we have visited the destination.   
           Since the DEST node has been visited for the first
           time, check its successors.   
 Delete the unreachable blocks if some were found and we are
 supposed to do it.   

References ei_next(), ei_one_before_end_p(), ENTRY_BLOCK_PTR, and basic_block_def::index.

int pre_and_rev_post_order_compute ( int *  pre_order,
int *  rev_post_order,
bool  include_entry_exit 
)

Like pre_and_rev_post_order_compute_fn but operating on the current function and asserting that all nodes were visited.

The number of nodes visited should be the number of blocks.

   The number of nodes visited should be the number of blocks minus
   the entry and exit blocks which are not visited here.   

References bitmap_bit_p, flow_dfs_compute_reverse_add_bb(), FOR_EACH_EDGE, basic_block_def::index, basic_block_def::preds, depth_first_search_dsS::sp, edge_def::src, depth_first_search_dsS::stack, and depth_first_search_dsS::visited_blocks.

int pre_and_rev_post_order_compute_fn ( struct function fn,
int *  pre_order,
int *  rev_post_order,
bool  include_entry_exit 
)

Compute the depth first search order of FN and store in the array PRE_ORDER if nonzero. If REV_POST_ORDER is nonzero, return the reverse completion number for each node. Returns the number of nodes visited. A depth first search tries to get as far away from the starting point as quickly as possible.

In case the function has unreachable blocks the number of nodes visited does not include them.

pre_order is a really a preorder numbering of the graph. rev_post_order is really a reverse postorder numbering of the graph.

 Allocate stack for back-tracking up CFG.   
 Allocate bitmap to track nodes that have been visited.   
 None of the nodes in the CFG have been visited yet.   
 Push the first edge on to the stack.   
     Look at the edge on the top of the stack.   
     Check if the edge destination has been visited yet.   
         Mark that we have visited the destination.   
           Since the DEST node has been visited for the first
           time, check its successors.   
           There are no successors for the DEST node so assign
           its reverse completion number.   
           There are no more successors for the SRC node
           so assign its reverse completion number.   
struct edge_list* pre_edge_lcm ( int  n_exprs,
sbitmap transp,
sbitmap avloc,
sbitmap antloc,
sbitmap kill,
sbitmap **  insert,
sbitmap **  del 
)
read

In lcm.c

Given local properties TRANSP, ANTLOC, AVOUT, KILL return the insert and delete vectors for edge based LCM. Returns an edgelist which is used to map the insert vector to what edge an expression should be inserted on.

 Compute global availability.   
 Compute global anticipatability.   
 Compute earliestness.   
 Allocate an extra element for the exit block in the laterin vector.   
struct edge_list* pre_edge_rev_lcm ( int  n_exprs,
sbitmap transp,
sbitmap st_avloc,
sbitmap st_antloc,
sbitmap kill,
sbitmap **  insert,
sbitmap **  del 
)
read

Given local properties TRANSP, ST_AVLOC, ST_ANTLOC, KILL return the insert and delete vectors for edge based reverse LCM. Returns an edgelist which is used to map the insert vector to what edge an expression should be inserted on.

 Compute global anticipatability.   
 Compute farthestness.   
 Allocate an extra element for the entry block.   
void predict_edge_def ( edge  e,
enum br_predictor  predictor,
enum prediction  taken 
)

Predict edge E by given predictor if possible.

Referenced by apply_return_prediction(), and tree_bb_level_predictions().

bool predictable_edge_p ( edge  )
void print_edge_list ( FILE *  ,
struct edge_list  
)

Referenced by compute_insert_delete().

bool probably_never_executed_bb_p ( struct function ,
const_basic_block   
)

Referenced by sanitize_hot_paths().

bool probably_never_executed_edge_p ( struct function ,
edge   
)

Referenced by sanitize_hot_paths().

bool purge_all_dead_edges ( void  )

Search all basic blocks for potentially dead edges and purge them. Return true if some edge has been eliminated.

Referenced by split_live_ranges_for_shrink_wrap().

bool purge_dead_edges ( basic_block  )
basic_block recompute_dominator ( enum  cdi_direction,
basic_block   
)
void redirect_edge_pred ( edge  ,
basic_block   
)

Referenced by expand_transaction().

void redirect_edge_succ ( edge  ,
basic_block   
)
edge redirect_edge_succ_nodup ( edge  ,
basic_block   
)
void redirect_immediate_dominators ( enum cdi_direction  dir,
basic_block  bb,
basic_block  to 
)

Redirect all edges pointing to BB to TO.

void relink_block_chain ( bool  )
void remove_edge_raw ( edge  )

Referenced by remove_branch().

void remove_fake_edges ( void  )

This routine will remove all fake edges from the flow graph. If we remove all fake successors, it will automatically remove all fake predecessors.

References EXIT_BLOCK_PTR, flow_dfs_compute_reverse_add_bb(), and flow_dfs_compute_reverse_init().

void remove_fake_exit_edges ( void  )

This routine will remove all fake edges to the EXIT_BLOCK.

References dfs_find_deadend(), EXIT_BLOCK_PTR, flow_dfs_compute_reverse_add_bb(), flow_dfs_compute_reverse_execute(), and make_edge().

Referenced by pre_insert_copies().

void remove_predictions_associated_with_edge ( edge  )
void rtl_make_eh_edge ( sbitmap  ,
basic_block  ,
rtx   
)
void rtl_predict_edge ( edge  ,
enum  br_predictor,
int   
)
bool rtl_predicted_by_p ( const_basic_block  ,
enum  br_predictor 
)
void rtl_profile_for_bb ( basic_block  )
void rtl_profile_for_edge ( edge  )
void scale_bbs_frequencies_gcov_type ( basic_block bbs,
int  nbbs,
gcov_type  num,
gcov_type  den 
)

Multiply all frequencies of basic blocks in array BBS of length NBBS by NUM/DEN, in gcov_type arithmetic. More accurate than previous function but considerably slower.

void scale_bbs_frequencies_int ( basic_block ,
int  ,
int  ,
int   
)
void set_bb_copy ( basic_block  ,
basic_block   
)
void set_bb_original ( basic_block  ,
basic_block   
)
void set_dom_info_availability ( enum  cdi_direction,
enum  dom_state 
)
void set_immediate_dominator ( enum cdi_direction  dir,
basic_block  bb,
basic_block  dominated_by 
)
void set_loop_copy ( struct loop ,
struct loop  
)
static basic_block single_pred ( )
inlinestatic
basic_block* single_pred_before_succ_order ( void  )

Returns the list of basic blocks in the function in an order that guarantees that if a block X has just a single predecessor Y, then Y is after X in the ordering.

Walk the predecessors of x as long as they have precisely one predecessor and add them to the list, so that they get stored after x.

static edge single_pred_edge ( )
inlinestatic

Returns the single predecessor edge of basic block BB. Aborts if BB does not have exactly one predecessor.

Referenced by create_if_region_on_edge(), and rewrite_trees().

static bool single_succ_p ( )
inlinestatic
basic_block split_edge_and_insert ( edge  ,
rtx   
)
edge try_redirect_by_replacing_jump ( edge  ,
basic_block  ,
bool   
)
edge unchecked_make_edge ( basic_block  ,
basic_block  ,
int   
)
void unlink_block ( basic_block  )
void update_bb_for_insn ( basic_block  )
void update_bb_profile_for_threading ( basic_block  bb,
int  edge_frequency,
gcov_type  count,
edge  taken_edge 
)

An edge originally destinating BB of FREQUENCY and COUNT has been proved to leave the block by TAKEN_EDGE. Update profile of BB such that edge E can be redirected to destination of TAKEN_EDGE.

This function may leave the profile inconsistent in the case TAKEN_EDGE frequency or count is believed to be lower than FREQUENCY or COUNT respectively.

 Compute the probability of TAKEN_EDGE being reached via threaded edge.
 Watch for overflows.   
 Now rescale the probabilities.   
         Protect from overflow due to additional scaling.   

References FOR_EACH_EDGE, edge_def::probability, RDIV, REG_BR_PROB_BASE, and basic_block_def::succs.

void update_br_prob_note ( basic_block  )
void verify_dominators ( enum  cdi_direction)

Referenced by cleanup_tree_cfg_1().

void verify_edge_list ( FILE *  ,
struct edge_list  
)

Referenced by compute_insert_delete().


Variable Documentation

edge mfb_kj_edge

In cfgloopmanip.c.

A callback for make_forwarder block, to redirect all edges except for MFB_KJ_EDGE to the entry part. E is the edge for that we should decide whether to redirect it.

struct gcov_ctr_summary* profile_info

Counter summary from the last set of coverage counts read by profile.c.

Counter summary from the last set of coverage counts read.