GCC Middle and Back End API Reference
tree-cfg.cc File Reference
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "target.h"
#include "rtl.h"
#include "tree.h"
#include "gimple.h"
#include "cfghooks.h"
#include "tree-pass.h"
#include "ssa.h"
#include "cgraph.h"
#include "gimple-pretty-print.h"
#include "diagnostic-core.h"
#include "fold-const.h"
#include "trans-mem.h"
#include "stor-layout.h"
#include "print-tree.h"
#include "cfganal.h"
#include "gimple-iterator.h"
#include "gimple-fold.h"
#include "tree-eh.h"
#include "gimplify-me.h"
#include "gimple-walk.h"
#include "tree-cfg.h"
#include "tree-ssa-loop-manip.h"
#include "tree-ssa-loop-niter.h"
#include "tree-into-ssa.h"
#include "tree-dfa.h"
#include "tree-ssa.h"
#include "except.h"
#include "cfgloop.h"
#include "tree-ssa-propagate.h"
#include "value-prof.h"
#include "tree-inline.h"
#include "tree-ssa-live.h"
#include "tree-ssa-dce.h"
#include "omp-general.h"
#include "omp-expand.h"
#include "tree-cfgcleanup.h"
#include "gimplify.h"
#include "attribs.h"
#include "selftest.h"
#include "opts.h"
#include "asan.h"
#include "profile.h"
#include "sreal.h"
Include dependency graph for tree-cfg.cc:

Data Structures

struct  cfg_stats_d
 
struct  replace_decls_d
 
struct  locus_discrim_map
 
struct  locus_discrim_hasher
 
struct  label_record
 
struct  move_stmt_d
 

Functions

static void make_blocks (gimple_seq)
 
static void make_edges (void)
 
static void assign_discriminators (void)
 
static void make_cond_expr_edges (basic_block)
 
static void make_gimple_switch_edges (gswitch *, basic_block)
 
static bool make_goto_expr_edges (basic_block)
 
static void make_gimple_asm_edges (basic_block)
 
static edge gimple_redirect_edge_and_branch (edge, basic_block)
 
static edge gimple_try_redirect_by_replacing_jump (edge, basic_block)
 
static bool stmt_starts_bb_p (gimple *, gimple *)
 
static bool gimple_verify_flow_info (void)
 
static void gimple_make_forwarder_block (edge)
 
static gimplefirst_non_label_stmt (basic_block)
 
static bool verify_gimple_transaction (gtransaction *)
 
static bool call_can_make_abnormal_goto (gimple *)
 
static void gimple_merge_blocks (basic_block, basic_block)
 
static bool gimple_can_merge_blocks_p (basic_block, basic_block)
 
static void remove_bb (basic_block)
 
static edge find_taken_edge_computed_goto (basic_block, tree)
 
static edge find_taken_edge_cond_expr (const gcond *, tree)
 
void init_empty_tree_cfg_for_function (struct function *fn)
 
void init_empty_tree_cfg (void)
 
static void build_gimple_cfg (gimple_seq seq)
 
static void replace_loop_annotate_in_block (basic_block bb, class loop *loop)
 
static void replace_loop_annotate (void)
 
static unsigned int execute_build_cfg (void)
 
gimple_opt_passmake_pass_build_cfg (gcc::context *ctxt)
 
bool computed_goto_p (gimple *t)
 
bool gimple_seq_unreachable_p (gimple_seq stmts)
 
bool assert_unreachable_fallthru_edge_p (edge e)
 
static void gimple_call_initialize_ctrl_altering (gimple *stmt)
 
static basic_block make_blocks_1 (gimple_seq seq, basic_block bb)
 
static basic_block create_bb (void *h, void *e, basic_block after)
 
basic_block get_abnormal_succ_dispatcher (basic_block bb)
 
static void handle_abnormal_edges (basic_block *dispatcher_bbs, basic_block for_bb, auto_vec< basic_block > *bbs, bool computed_goto)
 
static int make_edges_bb (basic_block bb, struct omp_region **pcur_region, int *pomp_index)
 
bool gimple_find_sub_bbs (gimple_seq seq, gimple_stmt_iterator *gsi)
 
static int next_discriminator_for_locus (int line)
 
static bool same_line_p (location_t locus1, expanded_location *from, location_t locus2)
 
static void assign_discriminator (location_t locus, basic_block bb)
 
bool edge_to_cases_cleanup (edge const &, tree const &value, void *)
 
void start_recording_case_labels (void)
 
static bool recording_case_labels_p (void)
 
void end_recording_case_labels (void)
 
tree get_cases_for_edge (edge e, gswitch *t)
 
basic_block label_to_block (struct function *ifun, tree dest)
 
static tree main_block_label (tree label, label_record *label_for_bb)
 
static void cleanup_dead_labels_eh (label_record *label_for_bb)
 
void cleanup_dead_labels (void)
 
bool group_case_labels_stmt (gswitch *stmt)
 
bool group_case_labels (void)
 
void replace_uses_by (tree name, tree val)
 
basic_block single_noncomplex_succ (basic_block bb)
 
void notice_special_calls (gcall *call)
 
void clear_special_calls (void)
 
static void remove_phi_nodes_and_edges_for_unreachable_block (basic_block bb)
 
edge find_taken_edge (basic_block bb, tree val)
 
edge find_taken_edge_switch_expr (const gswitch *switch_stmt, tree val)
 
tree find_case_label_for_value (const gswitch *switch_stmt, tree val)
 
void gimple_debug_bb (basic_block bb)
 
basic_block gimple_debug_bb_n (int n)
 
void gimple_debug_cfg (dump_flags_t flags)
 
void gimple_dump_cfg (FILE *file, dump_flags_t flags)
 
void dump_cfg_stats (FILE *file)
 
DEBUG_FUNCTION void debug_cfg_stats (void)
 
bool stmt_can_make_abnormal_goto (gimple *t)
 
bool is_ctrl_stmt (gimple *t)
 
bool is_ctrl_altering_stmt (gimple *t)
 
bool simple_goto_p (gimple *t)
 
bool stmt_ends_bb_p (gimple *t)
 
void delete_tree_cfg_annotations (struct function *fn)
 
gphiget_virtual_phi (basic_block bb)
 
gimplefirst_stmt (basic_block bb)
 
gimplelast_nondebug_stmt (basic_block bb)
 
gimplelast_and_only_stmt (basic_block bb)
 
basic_block split_edge_bb_loc (edge edge_in)
 
static basic_block gimple_split_edge (edge edge_in)
 
static bool verify_address (tree t, bool verify_addressable)
 
static bool verify_types_in_gimple_reference (tree expr, bool require_lvalue)
 
static bool one_pointer_to_useless_type_conversion_p (tree dest, tree src_obj)
 
static bool valid_fixed_convert_types_p (tree type1, tree type2)
 
static bool verify_gimple_call (gcall *stmt)
 
static bool verify_gimple_comparison (tree type, tree op0, tree op1, enum tree_code code)
 
static bool verify_gimple_assign_unary (gassign *stmt)
 
static bool verify_gimple_assign_binary (gassign *stmt)
 
static bool verify_gimple_assign_ternary (gassign *stmt)
 
static bool verify_gimple_assign_single (gassign *stmt)
 
static bool verify_gimple_assign (gassign *stmt)
 
static bool verify_gimple_return (greturn *stmt)
 
static bool verify_gimple_goto (ggoto *stmt)
 
static bool verify_gimple_switch (gswitch *stmt)
 
static bool verify_gimple_debug (gimple *stmt)
 
static bool verify_gimple_label (glabel *stmt)
 
static bool verify_gimple_cond (gcond *stmt)
 
static bool verify_gimple_stmt (gimple *stmt)
 
static bool verify_gimple_phi (gphi *phi)
 
static bool verify_gimple_in_seq_2 (gimple_seq stmts)
 
DEBUG_FUNCTION bool verify_gimple_in_seq (gimple_seq stmts, bool ice)
 
static bool tree_node_can_be_shared (tree t)
 
static tree verify_node_sharing_1 (tree *tp, int *walk_subtrees, void *data)
 
static tree verify_node_sharing (tree *tp, int *walk_subtrees, void *data)
 
bool verify_eh_throw_stmt_node (gimple *const &stmt, const int &, hash_set< gimple * > *visited)
 
static bool verify_location (hash_set< tree > *blocks, location_t loc)
 
static tree verify_expr_no_block (tree *tp, int *walk_subtrees, void *)
 
static tree verify_expr_location_1 (tree *tp, int *walk_subtrees, void *data)
 
static tree verify_expr_location (tree *tp, int *walk_subtrees, void *data)
 
static void collect_subblocks (hash_set< tree > *blocks, tree block)
 
DEBUG_FUNCTION bool verify_gimple_in_cfg (struct function *fn, bool verify_nothrow, bool ice)
 
tree gimple_block_label (basic_block bb)
 
static bool gimple_can_remove_branch_p (const_edge e)
 
static basic_block gimple_redirect_edge_and_branch_force (edge e, basic_block dest)
 
static basic_block gimple_split_block (basic_block bb, void *stmt)
 
static bool gimple_move_block_after (basic_block bb, basic_block after)
 
static bool gimple_empty_block_p (basic_block bb)
 
static basic_block gimple_split_block_before_cond_jump (basic_block bb)
 
static bool gimple_can_duplicate_bb_p (const_basic_block bb)
 
static basic_block gimple_duplicate_bb (basic_block bb, copy_bb_data *id)
 
static void add_phi_args_after_copy_edge (edge e_copy)
 
void add_phi_args_after_copy_bb (basic_block bb_copy)
 
void add_phi_args_after_copy (basic_block *region_copy, unsigned n_region, edge e_copy)
 
bool gimple_duplicate_seme_region (edge entry, edge exit, basic_block *region, unsigned n_region, basic_block *region_copy, bool update_dominance)
 
static bool bb_part_of_region_p (basic_block bb, basic_block *bbs, unsigned n_region)
 
void copy_phi_arg_into_existing_phi (edge src_e, edge tgt_e)
 
bool gimple_duplicate_sese_tail (edge entry, edge exit, basic_block *region, unsigned n_region, basic_block *region_copy)
 
void gather_blocks_in_sese_region (basic_block entry, basic_block exit, vec< basic_block > *bbs_p)
 
static void replace_by_duplicate_decl (tree *tp, hash_map< tree, tree > *vars_map, tree to_context)
 
static tree replace_ssa_name (tree name, hash_map< tree, tree > *vars_map, tree to_context)
 
static tree move_stmt_op (tree *tp, int *walk_subtrees, void *data)
 
static int move_stmt_eh_region_nr (int old_nr, struct move_stmt_d *p)
 
static tree move_stmt_eh_region_tree_nr (tree old_t_nr, struct move_stmt_d *p)
 
static tree move_stmt_r (gimple_stmt_iterator *gsi_p, bool *handled_ops_p, struct walk_stmt_info *wi)
 
static void move_block_to_fn (struct function *dest_cfun, basic_block bb, basic_block after, bool update_edge_count_p, struct move_stmt_d *d)
 
static eh_region find_outermost_region_in_block (struct function *src_cfun, basic_block bb, eh_region region, bool *all)
 
static tree new_label_mapper (tree decl, void *data)
 
static tree replace_block_vars_by_duplicates_1 (tree *tp, int *walk_subtrees, void *data)
 
static void replace_block_vars_by_duplicates (tree block, hash_map< tree, tree > *vars_map, tree to_context)
 
static void fixup_loop_arrays_after_move (struct function *fn1, struct function *fn2, class loop *loop)
 
DEBUG_FUNCTION void verify_sese (basic_block entry, basic_block exit, vec< basic_block > *bbs_p)
 
bool gather_ssa_name_hash_map_from (tree const &from, tree const &, void *data)
 
static gimplefind_loop_dist_alias (basic_block bb)
 
void fold_loop_internal_call (gimple *g, tree value)
 
basic_block move_sese_region_to_fn (struct function *dest_cfun, basic_block entry_bb, basic_block exit_bb, tree orig_block)
 
static void dump_default_def (FILE *file, tree def, int spc, dump_flags_t flags)
 
static void print_no_sanitize_attr_value (FILE *file, tree value)
 
void dump_function_to_file (tree fndecl, FILE *file, dump_flags_t flags)
 
DEBUG_FUNCTION void debug_function (tree fn, dump_flags_t flags)
 
static void print_pred_bbs (FILE *file, basic_block bb)
 
static void print_succ_bbs (FILE *file, basic_block bb)
 
void print_loops_bb (FILE *file, basic_block bb, int indent, int verbosity)
 
void print_loop_info (FILE *file, const class loop *loop, const char *prefix)
 
static void print_loop_and_siblings (FILE *, class loop *, int, int)
 
static void print_loop (FILE *file, class loop *loop, int indent, int verbosity)
 
void print_loops (FILE *file, int verbosity)
 
DEBUG_FUNCTION void debug (class loop &ref)
 
DEBUG_FUNCTION void debug (class loop *ptr)
 
DEBUG_FUNCTION void debug_verbose (class loop &ref)
 
DEBUG_FUNCTION void debug_verbose (class loop *ptr)
 
DEBUG_FUNCTION void debug_loops (int verbosity)
 
DEBUG_FUNCTION void debug_loop (class loop *loop, int verbosity)
 
DEBUG_FUNCTION void debug_loop_num (unsigned num, int verbosity)
 
static bool gimple_block_ends_with_call_p (basic_block bb)
 
static bool gimple_block_ends_with_condjump_p (const_basic_block bb)
 
bool stmt_can_terminate_bb_p (gimple *t)
 
static int gimple_flow_call_edges_add (sbitmap blocks)
 
void remove_edge_and_dominated_blocks (edge e)
 
bool gimple_purge_dead_eh_edges (basic_block bb)
 
bool gimple_purge_all_dead_eh_edges (const_bitmap blocks)
 
bool gimple_purge_dead_abnormal_call_edges (basic_block bb)
 
bool gimple_purge_all_dead_abnormal_call_edges (const_bitmap blocks)
 
static void gimple_execute_on_growing_pred (edge e)
 
static void gimple_execute_on_shrinking_pred (edge e)
 
static void gimple_lv_adjust_loop_header_phi (basic_block first, basic_block second, basic_block new_head, edge e)
 
static void gimple_lv_add_condition_to_bb (basic_block first_head, basic_block second_head, basic_block cond_bb, void *cond_e)
 
static void gimple_account_profile_record (basic_block bb, struct profile_record *record)
 
unsigned int split_critical_edges (bool for_edge_insertion_p)
 
gimple_opt_passmake_pass_split_crit_edges (gcc::context *ctxt)
 
basic_block insert_cond_bb (basic_block bb, gimple *stmt, gimple *cond, profile_probability prob)
 
void extract_true_false_edges_from_block (basic_block b, edge *true_edge, edge *false_edge)
 
bool extract_true_false_controlled_edges (basic_block dom, basic_block phiblock, edge *true_controlled_edge, edge *false_controlled_edge)
 
void generate_range_test (basic_block bb, tree index, tree low, tree high, tree *lhs, tree *rhs)
 
basic_block gimple_switch_label_bb (function *ifun, gswitch *gs, unsigned index)
 
basic_block gimple_switch_default_bb (function *ifun, gswitch *gs)
 
edge gimple_switch_edge (function *ifun, gswitch *gs, unsigned index)
 
edge gimple_switch_default_edge (function *ifun, gswitch *gs)
 
bool cond_only_block_p (basic_block bb)
 
gimple_opt_passmake_pass_warn_function_return (gcc::context *ctxt)
 
static void do_warn_unused_result (gimple_seq seq)
 
gimple_opt_passmake_pass_warn_unused_result (gcc::context *ctxt)
 
static bool maybe_remove_writeonly_store (gimple_stmt_iterator &gsi, gimple *stmt, bitmap dce_ssa_names)
 
unsigned int execute_fixup_cfg (void)
 
gimple_opt_passmake_pass_fixup_cfg (gcc::context *ctxt)
 
void gt_ggc_mx (tree &)
 
void gt_ggc_mx (gimple *&)
 
void gt_ggc_mx (rtx &)
 
void gt_ggc_mx (basic_block &)
 
static void gt_ggc_mx (rtx_insn *&x)
 
void gt_ggc_mx (edge_def *e)
 
void gt_pch_nx (tree &)
 
void gt_pch_nx (gimple *&)
 
void gt_pch_nx (rtx &)
 
void gt_pch_nx (basic_block &)
 
static void gt_pch_nx (rtx_insn *&x)
 
void gt_pch_nx (edge_def *e)
 
void gt_pch_nx (edge_def *e, gt_pointer_operator op, void *cookie)
 

Variables

static const int initial_cfg_capacity = 20
 
static hash_map< edge, tree > * edge_to_cases
 
static bitmap touched_switch_bbs
 
static vec< int > bb_to_omp_idx
 
static struct cfg_stats_d cfg_stats
 
static hash_table< locus_discrim_hasher > * discriminator_per_locus
 
static bool eh_error_found
 
struct cfg_hooks gimple_cfg_hooks
 

Function Documentation

◆ add_phi_args_after_copy()

void add_phi_args_after_copy ( basic_block * region_copy,
unsigned n_region,
edge e_copy )
Blocks in REGION_COPY array of length N_REGION were created by
duplication of basic blocks.  Add phi node arguments for edges
going from these blocks.  If E_COPY is not NULL, also add
phi node arguments for its destination. 

References add_phi_args_after_copy_bb(), add_phi_args_after_copy_edge(), and i.

Referenced by back_jt_path_registry::duplicate_thread_path(), gimple_duplicate_seme_region(), gimple_duplicate_sese_tail(), slpeel_tree_duplicate_loop_to_edge_cfg(), and transform_duplicate().

◆ add_phi_args_after_copy_bb()

void add_phi_args_after_copy_bb ( basic_block bb_copy)
Basic block BB_COPY was created by code duplication.  Add phi node
arguments for edges going out of BB_COPY.  The blocks that were
duplicated have BB_DUPLICATED set.   

References add_phi_args_after_copy_edge(), bb_copy, and FOR_EACH_EDGE.

Referenced by add_phi_args_after_copy(), and copy_phi_node_args().

◆ add_phi_args_after_copy_edge()

static void add_phi_args_after_copy_edge ( edge e_copy)
static

◆ assert_unreachable_fallthru_edge_p()

bool assert_unreachable_fallthru_edge_p ( edge e)
Returns true for edge E where e->src ends with a GIMPLE_COND and
the other edge points to a bb with just __builtin_unreachable ().
I.e. return true for C->M edge in:
<bb C>:
...
if (something)
  goto <bb N>;
else
  goto <bb M>;
<bb N>:
__builtin_unreachable ();
<bb M>:   

References bb_seq(), EDGE_COUNT, EDGE_SUCC, gimple_seq_unreachable_p(), gsi_last_bb(), safe_is_a(), and basic_block_def::succs.

Referenced by dom_opt_dom_walker::set_global_ranges_from_unreachable_edges().

◆ assign_discriminator()

static void assign_discriminator ( location_t locus,
basic_block bb )
static
Assign a unique discriminator value to all statements in block bb that
have the same line number as locus.  

References locus_discrim_map::discriminator, expand_location(), gimple_location(), gimple_set_location(), gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_stmt(), location_with_discriminator(), next_discriminator_for_locus(), same_line_p(), and UNKNOWN_LOCATION.

Referenced by assign_discriminators().

◆ assign_discriminators()

◆ bb_part_of_region_p()

static bool bb_part_of_region_p ( basic_block bb,
basic_block * bbs,
unsigned n_region )
static
Checks if BB is part of the region defined by N_REGION BBS.   

Referenced by gimple_duplicate_sese_tail().

◆ build_gimple_cfg()

◆ call_can_make_abnormal_goto()

static bool call_can_make_abnormal_goto ( gimple * t)
static
Return true if T, a GIMPLE_CALL, can make an abnormal transfer of control
flow.  Transfers of control flow associated with EH are excluded.   

References cfun, ECF_LEAF, gimple_call_flags(), and gimple_has_side_effects().

Referenced by gimple_call_initialize_ctrl_altering(), and stmt_can_make_abnormal_goto().

◆ cleanup_dead_labels()

◆ cleanup_dead_labels_eh()

◆ clear_special_calls()

void clear_special_calls ( void )
Clear flags set by notice_special_calls.  Used by dead code removal
to update the flags.   

References cfun.

Referenced by eliminate_unnecessary_stmts().

◆ collect_subblocks()

static void collect_subblocks ( hash_set< tree > * blocks,
tree block )
static
Insert all subblocks of BLOCK into BLOCKS and recurse.   

References hash_set< KeyId, Lazy, Traits >::add(), BLOCK_CHAIN, BLOCK_SUBBLOCKS, and collect_subblocks().

Referenced by collect_subblocks(), and verify_gimple_in_cfg().

◆ computed_goto_p()

bool computed_goto_p ( gimple * t)

◆ cond_only_block_p()

bool cond_only_block_p ( basic_block bb)
Return true if the only executable statement in BB is a GIMPLE_COND.   

References gsi_after_labels(), gsi_end_p(), gsi_next(), gsi_stmt(), is_gimple_debug(), and phi_nodes().

Referenced by optimize_spaceship(), and spaceship_replacement().

◆ copy_phi_arg_into_existing_phi()

void copy_phi_arg_into_existing_phi ( edge src_e,
edge tgt_e )
For each PHI in BB, copy the argument associated with SRC_E to TGT_E.
Assuming the argument exists, just does not have a value.   

References gimple_phi_arg_def(), gimple_phi_arg_location(), gimple_phi_arg_set_location(), gsi_end_p(), gsi_next(), gsi_start_phis(), and SET_PHI_ARG_DEF.

Referenced by gimple_duplicate_sese_tail(), remove_forwarder_block(), replace_phi_edge_with_variable(), and ssa_fix_duplicate_block_edges().

◆ create_bb()

static basic_block create_bb ( void * h,
void * e,
basic_block after )
static

◆ debug() [1/2]

DEBUG_FUNCTION void debug ( class loop & ref)
Dump a loop.   

References print_loop().

◆ debug() [2/2]

DEBUG_FUNCTION void debug ( class loop * ptr)

References debug.

◆ debug_cfg_stats()

DEBUG_FUNCTION void debug_cfg_stats ( void )
Dump CFG statistics on stderr.  Keep extern so that it's always
linked in the final executable.   

References dump_cfg_stats().

◆ debug_function()

DEBUG_FUNCTION void debug_function ( tree fn,
dump_flags_t flags )
Dump FUNCTION_DECL FN to stderr using FLAGS (see TDF_* in tree.h)   

References dump_function_to_file().

◆ debug_loop()

DEBUG_FUNCTION void debug_loop ( class loop * loop,
int verbosity )
Print on stderr the code of LOOP, at some VERBOSITY level.   

References print_loop().

Referenced by debug_loop_num().

◆ debug_loop_num()

DEBUG_FUNCTION void debug_loop_num ( unsigned num,
int verbosity )
Print on stderr the code of loop number NUM, at some VERBOSITY
level.   

References cfun, debug_loop(), and get_loop().

◆ debug_loops()

DEBUG_FUNCTION void debug_loops ( int verbosity)
Debugging loops structure at tree level, at some VERBOSITY level.   

References print_loops().

◆ debug_verbose() [1/2]

DEBUG_FUNCTION void debug_verbose ( class loop & ref)
Dump a loop verbosely.   

References print_loop().

◆ debug_verbose() [2/2]

DEBUG_FUNCTION void debug_verbose ( class loop * ptr)

References debug.

◆ delete_tree_cfg_annotations()

void delete_tree_cfg_annotations ( struct function * fn)
Remove block annotations and other data structures.   

References label_to_block_map_for_fn, and vec_free().

Referenced by release_function_body().

◆ do_warn_unused_result()

static void do_warn_unused_result ( gimple_seq seq)
static
Walk a gimplified function and warn for functions whose return value is
ignored and attribute((warn_unused_result)) is set.  This is done before
inlining, so we don't have to worry about that.   

References as_a(), do_warn_unused_result(), g, gimple_bind_body(), gimple_call_fndecl(), gimple_call_fntype(), gimple_call_internal_p(), gimple_call_lhs(), gimple_catch_handler(), gimple_eh_filter_failure(), gimple_location(), gimple_try_cleanup(), gimple_try_eval(), gsi_end_p(), gsi_next(), gsi_start(), gsi_stmt(), i, lookup_attribute(), TYPE_ATTRIBUTES, and warning_at().

Referenced by do_warn_unused_result().

◆ dump_cfg_stats()

void dump_cfg_stats ( FILE * file)

◆ dump_default_def()

static void dump_default_def ( FILE * file,
tree def,
int spc,
dump_flags_t flags )
static
Dump default def DEF to file FILE using FLAGS and indentation
SPC.   

References dump_ssaname_info_to_file(), i, print_generic_expr(), SSA_NAME_VAR, and TREE_TYPE.

Referenced by dump_function_to_file().

◆ dump_function_to_file()

void dump_function_to_file ( tree fndecl,
FILE * file,
dump_flags_t flags )
Dump FUNCTION_DECL FN to file FILE using FLAGS (see TDF_* in dumpfile.h)

References a, basic_block_info_for_fn, BIND_EXPR_BODY, function::cfg, basic_block_def::count, function::curr_properties, current_function_decl, function::decl, DECL_ARGUMENTS, DECL_ATTRIBUTES, DECL_BY_REFERENCE, DECL_CHAIN, decl_is_tm_clone(), DECL_RESULT, DECL_SAVED_TREE, DECL_STRUCT_FUNCTION, DECL_UID, dump_bb(), dump_default_def(), dump_eh_tree(), dump_enumerated_decls(), dump_flags, dump_node(), ENTRY_BLOCK_PTR_FOR_FN, FOR_EACH_BB_FN, FOR_EACH_LOCAL_DECL, FOR_EACH_SSA_NAME, function_name(), get_attribute_name(), get_hot_bb_threshold(), gimple_body(), gimple_has_body_p(), gimple_in_ssa_p(), gimple_seq_first_stmt(), gimple_seq_last_stmt(), i, IDENTIFIER_POINTER, profile_count::initialized_p(), function::local_decls, n_basic_blocks_for_fn, NULL, NULL_TREE, PRId64, print_generic_decl(), print_generic_expr(), print_generic_stmt_indented(), print_gimple_seq(), print_no_sanitize_attr_value(), print_omp_context_selector(), PRIu64, profile_info, profile_quality_as_string(), PROP_cfg, PROP_gimple_any, PROP_gimple_lcf, PROP_ssa, profile_count::quality(), ssa_default_def(), SSA_NAME_IDENTIFIER, SSA_NAME_VAR, function::static_chain_decl, TDF_ALIAS, TDF_EH, TDF_ENUMERATE_LOCALS, TDF_GIMPLE, TDF_RAW, TDF_SLIM, TDF_UID, TREE_CHAIN, TREE_CODE, TREE_PURPOSE, TREE_TYPE, TREE_VALUE, TYPE_ATTRIBUTES, profile_count::value(), and vec_safe_is_empty().

Referenced by branch_prob(), debug_body(), debug_function(), dump_function(), ipa_icf::sem_function::dump_to_file(), tree_switch_conversion::switch_decision_tree::emit(), execute_function_dump(), expand_omp_target(), expand_omp_taskreg(), finalize_nesting_tree_1(), gimple_dump_cfg(), cgraph_node::materialize_clone(), oacc_do_neutering(), split_function(), and tail_merge_optimize().

◆ edge_to_cases_cleanup()

bool edge_to_cases_cleanup ( edge const & ,
tree const & value,
void *  )
Called for each element in the hash table (P) as we delete the
edge to cases hash table.

Clear all the CASE_CHAINs to prevent problems with copying of
SWITCH_EXPRs and structure sharing rules, then free the hash table
element.   

References CASE_CHAIN, and NULL.

Referenced by end_recording_case_labels().

◆ end_recording_case_labels()

void end_recording_case_labels ( void )
Stop recording information mapping edges to case labels and
remove any information we have recorded.   

References BASIC_BLOCK_FOR_FN, BITMAP_FREE, cfun, edge_to_cases, edge_to_cases_cleanup(), EXECUTE_IF_SET_IN_BITMAP, group_case_labels_stmt(), gsi_last_bb(), i, NULL, safe_dyn_cast(), and touched_switch_bbs.

Referenced by cleanup_tree_cfg_noloop(), and split_critical_edges().

◆ execute_build_cfg()

◆ execute_fixup_cfg()

unsigned int execute_fixup_cfg ( void )
IPA passes, compilation of earlier functions or inlining
might have changed some properties, such as marked functions nothrow,
pure, const or noreturn.
Remove redundant edges and basic blocks, and create new ones if necessary.  

References profile_count::adjust_for_ipa_scaling(), profile_count::apply_scale(), cfun, compute_function_frequency(), basic_block_def::count, cgraph_node::count, cgraph_node::create_edge(), current_function_decl, current_loops, DECL_EXTERNAL, dyn_cast(), ECF_CONST, ECF_LOOPING_CONST_OR_PURE, ECF_NORETURN, ECF_PURE, EDGE_COUNT, ENTRY_BLOCK_PTR_FOR_FN, EXIT_BLOCK_PTR_FOR_FN, fixup_noreturn_call(), FOR_EACH_BB_FN, cgraph_node::get(), varpool_node::get(), get_base_address(), cgraph_node::get_create(), gimple_build_builtin_unreachable(), gimple_call_flags(), gimple_call_fndecl(), gimple_call_noreturn_p(), gimple_call_set_ctrl_altering(), gimple_call_set_lhs(), gimple_get_lhs(), gimple_in_ssa_p(), gimple_purge_dead_abnormal_call_edges(), gimple_purge_dead_eh_edges(), gsi_end_p(), gsi_insert_after(), gsi_last_bb(), GSI_NEW_STMT, gsi_next(), gsi_start_bb(), gsi_stmt(), profile_count::initialized_p(), is_ctrl_stmt(), is_gimple_call(), last, last_nondebug_stmt(), LOOPS_NEED_FIXUP, loops_state_set(), maybe_clean_eh_stmt(), maybe_remove_writeonly_store(), NULL, simple_dce_from_worklist(), basic_block_def::succs, todo, TODO_cleanup_cfg, TODO_update_ssa, TREE_STATIC, UNKNOWN_LOCATION, update_max_bb_count(), update_stmt(), and VAR_P.

Referenced by autofdo::auto_profile(), execute_cleanup_cfg_post_optimizing(), inline_transform(), and tree_profiling().

◆ extract_true_false_controlled_edges()

bool extract_true_false_controlled_edges ( basic_block dom,
basic_block phiblock,
edge * true_controlled_edge,
edge * false_controlled_edge )
From a controlling predicate in the immediate dominator DOM of
PHIBLOCK determine the edges into PHIBLOCK that are chosen if the
predicate evaluates to true and false and store them to
*TRUE_CONTROLLED_EDGE and *FALSE_CONTROLLED_EDGE if
they are non-NULL.  Returns true if the edges can be determined,
else return false.   

References CDI_DOMINATORS, dominated_by_p(), EDGE_PRED, extract_true_false_edges_from_block(), NULL, and single_pred_p().

Referenced by extract_true_false_args_from_phi(), and vn_phi_eq().

◆ extract_true_false_edges_from_block()

void extract_true_false_edges_from_block ( basic_block b,
edge * true_edge,
edge * false_edge )

◆ find_case_label_for_value()

tree find_case_label_for_value ( const gswitch * switch_stmt,
tree val )
Return the CASE_LABEL_EXPR that SWITCH_STMT will take for VAL.
We can make optimal use here of the fact that the case labels are
sorted: We can do a binary search for a case matching VAL.   

References CASE_HIGH, CASE_LOW, gimple_switch_default_label(), gimple_switch_label(), gimple_switch_num_labels(), i, NULL, and tree_int_cst_compare().

Referenced by find_taken_edge_switch_expr().

◆ find_loop_dist_alias()

static gimple * find_loop_dist_alias ( basic_block bb)
static
Return LOOP_DIST_ALIAS call if present in BB.   

References g, gimple_call_internal_p(), gsi_end_p(), gsi_last_bb(), gsi_prev(), gsi_stmt(), NULL, and safe_is_a().

Referenced by move_sese_region_to_fn().

◆ find_outermost_region_in_block()

static eh_region find_outermost_region_in_block ( struct function * src_cfun,
basic_block bb,
eh_region region,
bool * all )
static
Examine the statements in BB (which is in SRC_CFUN); find and return
the outermost EH region.  Use REGION as the incoming base EH region.
If there is no single outermost region, return NULL and set *ALL to
true.   

References eh_region_outermost(), get_eh_region_from_lp_number_fn(), gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_stmt(), lookup_stmt_eh_lp_fn(), NULL, si, and walk_stmt_info::stmt.

Referenced by move_sese_region_to_fn().

◆ find_taken_edge()

edge find_taken_edge ( basic_block bb,
tree val )
Given a basic block BB and a value VAL for use in the final statement
of the block (if a GIMPLE_COND, GIMPLE_SWITCH, or computed goto), return
the edge that will be taken out of the block.
If VAL is NULL_TREE, then the current value of the final statement's
predicate or index is used.
If the value does not match a unique edge, NULL is returned.   

References as_a(), computed_goto_p(), find_taken_edge_computed_goto(), find_taken_edge_cond_expr(), find_taken_edge_switch_expr(), gsi_last_bb(), NULL, single_succ_edge(), single_succ_p(), TREE_CODE, and TREE_OPERAND.

Referenced by check_array_bounds_dom_walker::before_dom_children(), cleanup_control_expr_graph(), copy_prop_visit_cond_stmt(), dom_opt_dom_walker::fold_cond(), fold_marked_statements(), simplify_using_ranges::legacy_fold_cond(), dom_opt_dom_walker::optimize_stmt(), process_bb(), jump_threader::thread_around_empty_blocks(), jump_threader::thread_through_normal_block(), and visit_cond_stmt().

◆ find_taken_edge_computed_goto()

static edge find_taken_edge_computed_goto ( basic_block bb,
tree val )
static
Given a constant value VAL and the entry block BB to a GOTO_EXPR
statement, determine which of the outgoing edges will be taken out of the
block.  Return NULL if either edge may be taken.   

References cfun, find_edge(), label_to_block(), and NULL.

Referenced by find_taken_edge().

◆ find_taken_edge_cond_expr()

static edge find_taken_edge_cond_expr ( const gcond * cond_stmt,
tree val )
static
Given COND_STMT and a constant value VAL for use as the predicate,
determine which of the two edges will be taken out of
the statement's block.  Return NULL if either edge may be taken.
If VAL is NULL_TREE, then the current value of COND_STMT's predicate
is used.   

References extract_true_false_edges_from_block(), gimple_bb(), gimple_cond_false_p(), gimple_cond_true_p(), integer_one_node, integer_zero_node, integer_zerop(), NULL, NULL_TREE, and TREE_CODE.

Referenced by find_taken_edge().

◆ find_taken_edge_switch_expr()

edge find_taken_edge_switch_expr ( const gswitch * switch_stmt,
tree val )
Given SWITCH_STMT and an INTEGER_CST VAL for use as the index, determine
which edge will be taken out of the statement's block.  Return NULL if any
edge may be taken.
If VAL is NULL_TREE, then the current value of SWITCH_STMT's index
is used.   

References CASE_LABEL, cfun, find_case_label_for_value(), find_edge(), gcc_assert, gimple_bb(), gimple_switch_default_label(), gimple_switch_index(), gimple_switch_num_labels(), label_to_block(), NULL, NULL_TREE, and TREE_CODE.

Referenced by find_taken_edge(), and tree_predict_by_opcode().

◆ first_non_label_stmt()

static gimple * first_non_label_stmt ( basic_block bb)
static
Return the first non-label statement in basic block BB.   

References gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_stmt(), i, and NULL.

Referenced by assign_discriminators().

◆ first_stmt()

◆ fixup_loop_arrays_after_move()

static void fixup_loop_arrays_after_move ( struct function * fn1,
struct function * fn2,
class loop * loop )
static
Fixup the loop arrays and numbers after moving LOOP and its subloops
from FN1 to FN2.   

References fixup_loop_arrays_after_move(), get_loops(), loop::inner, loops_for_fn(), loop::next, NULL, loop::num, number_of_loops(), and vec_safe_push().

Referenced by fixup_loop_arrays_after_move(), and move_sese_region_to_fn().

◆ fold_loop_internal_call()

◆ gather_blocks_in_sese_region()

void gather_blocks_in_sese_region ( basic_block entry,
basic_block exit,
vec< basic_block > * bbs_p )
Add all the blocks dominated by ENTRY to the array BBS_P.  Stop
adding blocks when the dominator traversal reaches EXIT.  This
function silently assumes that ENTRY strictly dominates EXIT.   

References CDI_DOMINATORS, first_dom_son(), gather_blocks_in_sese_region(), and next_dom_son().

Referenced by eliminate_local_variables(), gather_blocks_in_sese_region(), move_sese_region_to_fn(), and separate_decls_in_region().

◆ gather_ssa_name_hash_map_from()

bool gather_ssa_name_hash_map_from ( tree const & from,
tree const & ,
void * data )
If FROM is an SSA_NAME, mark the version in bitmap DATA.   

References bitmap_set_bit, SSA_NAME_VERSION, and TREE_CODE.

Referenced by move_sese_region_to_fn().

◆ generate_range_test()

void generate_range_test ( basic_block bb,
tree index,
tree low,
tree high,
tree * lhs,
tree * rhs )
Generate a range test LHS CODE RHS that determines whether INDEX is in the
range [low, high].  Place associated stmts before *GSI.   

References const_binop(), fold_convert, gimple_build(), gimple_convert(), gsi_insert_seq_before(), gsi_last_bb(), GSI_SAME_STMT, NULL, range_check_type(), and TREE_TYPE.

Referenced by convert_single_case_switch(), and tree_switch_conversion::switch_decision_tree::emit_case_nodes().

◆ get_abnormal_succ_dispatcher()

basic_block get_abnormal_succ_dispatcher ( basic_block bb)
If basic block BB has an abnormal edge to a basic block
containing IFN_ABNORMAL_DISPATCHER internal call, return
that the dispatcher's basic block, otherwise return NULL.   

References FOR_EACH_EDGE, g, gimple_call_internal_p(), gsi_start_nondebug_after_labels_bb(), gsi_stmt(), NULL, and basic_block_def::succs.

Referenced by copy_cfg_body(), and copy_edges_for_bb().

◆ get_cases_for_edge()

tree get_cases_for_edge ( edge e,
gswitch * t )
If we are inside a {start,end}_recording_cases block, then return
a chain of CASE_LABEL_EXPRs from T which reference E.

Otherwise return NULL.   

References CASE_CHAIN, CASE_LABEL, cfun, edge_to_cases, find_edge(), gimple_switch_label(), gimple_switch_num_labels(), i, label_to_block(), NULL, and recording_case_labels_p().

Referenced by gimple_redirect_edge_and_branch(), and predicate::init_from_control_deps().

◆ get_virtual_phi()

◆ gimple_account_profile_record()

◆ gimple_block_ends_with_call_p()

static bool gimple_block_ends_with_call_p ( basic_block bb)
static
Return true if BB ends with a call, possibly followed by some
instructions that must stay with the call.  Return false,
otherwise.   

References gsi_end_p(), gsi_last_nondebug_bb(), gsi_stmt(), and is_gimple_call().

◆ gimple_block_ends_with_condjump_p()

static bool gimple_block_ends_with_condjump_p ( const_basic_block bb)
static
Return true if BB ends with a conditional branch.  Return false,
otherwise.   

References gsi_last_bb(), and safe_is_a().

◆ gimple_block_label()

◆ gimple_call_initialize_ctrl_altering()

static void gimple_call_initialize_ctrl_altering ( gimple * stmt)
static
Initialize GF_CALL_CTRL_ALTERING flag, which indicates the call
could alter control flow except via eh. We initialize the flag at
CFG build time and only ever clear it later.   

References call_can_make_abnormal_goto(), ECF_NORETURN, ECF_TM_BUILTIN, gimple_call_builtin_p(), gimple_call_flags(), gimple_call_fndecl(), gimple_call_internal_p(), gimple_call_internal_unique_p(), gimple_call_set_ctrl_altering(), and is_tm_ending_fndecl().

Referenced by make_blocks_1().

◆ gimple_can_duplicate_bb_p()

◆ gimple_can_merge_blocks_p()

◆ gimple_can_remove_branch_p()

static bool gimple_can_remove_branch_p ( const_edge e)
static
Returns true if it is possible to remove edge E by redirecting
it to the destination of the other edge from E->src.   

◆ gimple_debug_bb()

void gimple_debug_bb ( basic_block bb)
Dump a basic block on stderr.   

References dump_bb(), TDF_BLOCKS, TDF_MEMSYMS, and TDF_VOPS.

Referenced by gimple_debug_bb_n().

◆ gimple_debug_bb_n()

basic_block gimple_debug_bb_n ( int n)
Dump basic block with index N on stderr.   

References BASIC_BLOCK_FOR_FN, cfun, and gimple_debug_bb().

◆ gimple_debug_cfg()

void gimple_debug_cfg ( dump_flags_t flags)
Dump the CFG on stderr.

FLAGS are the same used by the tree dumping functions
(see TDF_* in dumpfile.h).   

References gimple_dump_cfg().

◆ gimple_dump_cfg()

void gimple_dump_cfg ( FILE * file,
dump_flags_t flags )
Dump the program showing basic block boundaries on the given FILE.

FLAGS are the same used by the tree dumping functions (see TDF_* in
tree.h).   

References brief_dump_cfg(), cfun, current_function_decl, dump_cfg_stats(), dump_function_header(), dump_function_to_file(), last_basic_block_for_fn, n_basic_blocks_for_fn, n_edges_for_fn, TDF_BLOCKS, TDF_DETAILS, and TDF_STATS.

Referenced by compute_branch_probabilities(), gimple_debug_cfg(), and rewrite_out_of_ssa().

◆ gimple_duplicate_bb()

◆ gimple_duplicate_seme_region()

bool gimple_duplicate_seme_region ( edge entry,
edge exit,
basic_block * region,
unsigned n_region,
basic_block * region_copy,
bool update_dominance )
Duplicates a REGION (set of N_REGION basic blocks) with just a single
important exit edge EXIT.  By important we mean that no SSA name defined
inside region is live over the other exit edges of the region.  All entry
edges to the region must go to ENTRY->dest.  The edge ENTRY is redirected
to the duplicate of the region.  Dominance and loop information is
updated if UPDATE_DOMINANCE is true, but not the SSA web.  If
UPDATE_DOMINANCE is false then we assume that the caller will update the
dominance information after calling this function.  The new basic
blocks are stored to REGION_COPY in the same order as they had in REGION,
provided that REGION_COPY is not NULL.
The function returns false if it is unable to copy the region,
true otherwise.

It is callers responsibility to update profile.   

References add_phi_args_after_copy(), can_copy_bbs_p(), CDI_DOMINATORS, copy_bbs(), dominated_by_p(), flush_pending_stmts(), free(), free_original_copy_tables(), gcc_assert, get_bb_copy(), get_bb_original(), get_dominated_by_region(), loop::header, i, initialize_original_copy_tables(), iterate_fix_dominators(), loop::latch, loop_outer(), NULL, redirect_edge_and_branch(), set_immediate_dominator(), set_loop_copy(), and split_edge_bb_loc().

◆ gimple_duplicate_sese_tail()

bool gimple_duplicate_sese_tail ( edge entry,
edge exit,
basic_block * region,
unsigned n_region,
basic_block * region_copy )
Duplicates REGION consisting of N_REGION blocks.  The new blocks
  are stored to REGION_COPY in the same order in that they appear
  in REGION, if REGION_COPY is not NULL.  ENTRY is the entry to
  the region, EXIT an exit from it.  The condition guarding EXIT
  is moved to ENTRY.  Returns true if duplication succeeds, false
  otherwise.

  For example,

  some_code;
  if (cond)
    A;
  else
    B;

  is transformed to

  if (cond)
    {
      some_code;
      A;
    }
  else
    {
      some_code;
      B;
    }

References add_phi_args_after_copy(), as_a(), bb_part_of_region_p(), can_copy_bbs_p(), CDI_DOMINATORS, cfun, copy_bbs(), copy_phi_arg_into_existing_phi(), duplicate_loop(), duplicate_subloops(), EDGE_COUNT, EDGE_SUCC, loop::exits, free(), free_original_copy_tables(), gcc_assert, get_bb_copy(), get_bb_original(), get_dominated_by_region(), gimple_copy(), gsi_insert_after(), gsi_last_bb(), GSI_NEW_STMT, loop::header, i, initialize_original_copy_tables(), profile_count::initialized_p(), loop::inner, iterate_fix_dominators(), loop::latch, make_edge(), need_ssa_update_p(), loop::next, NULL, PENDING_STMT, redirect_edge_and_branch(), rescan_loop_exit(), scale_bbs_frequencies_profile_count(), set_immediate_dominator(), set_loop_copy(), single_succ_edge(), split_edge(), split_edge_bb_loc(), stmt_ends_bb_p(), and profile_count::uninitialized().

Referenced by transform_to_exit_first_loop().

◆ gimple_empty_block_p()

static bool gimple_empty_block_p ( basic_block bb)
static
Return TRUE if block BB has no executable statements, otherwise return
FALSE.   

References walk_stmt_info::gsi, gsi_after_labels(), gsi_end_p(), gsi_next(), gsi_stmt(), is_gimple_debug(), phi_nodes(), and walk_stmt_info::stmt.

◆ gimple_execute_on_growing_pred()

static void gimple_execute_on_growing_pred ( edge e)
static
This function is called whenever a new edge is created or
redirected.   

References gimple_seq_empty_p(), phi_nodes(), and reserve_phi_args_for_new_edge().

◆ gimple_execute_on_shrinking_pred()

static void gimple_execute_on_shrinking_pred ( edge e)
static
This function is called immediately before edge E is removed from
the edge vector E->dest->preds.   

References gimple_seq_empty_p(), phi_nodes(), and remove_phi_args().

◆ gimple_find_sub_bbs()

bool gimple_find_sub_bbs ( gimple_seq seq,
gimple_stmt_iterator * gsi )
Add SEQ after GSI.  Start new bb after GSI, and created further bbs as
needed.  Returns true if new bbs were created.
Note: This is transitional code, and should not be used for new code.  We
should be able to get rid of this by rewriting all target va-arg
gimplification hooks to use an interface gimple_build_cond_value as described
in https://gcc.gnu.org/ml/gcc-patches/2015-02/msg01194.html.   

References add_bb_to_loop(), cfun, basic_block_def::count, FOR_EACH_EDGE, gcc_assert, gimple_bb(), gsi_stmt(), link_block(), basic_block_def::loop_father, make_blocks_1(), make_edges_bb(), n_basic_blocks_for_fn, basic_block_def::next_bb, NULL, basic_block_def::preds, PROFILE_READ, profile_status_for_fn, redirect_edge_succ(), split_block(), tree_guess_outgoing_edge_probabilities(), unlink_block(), and profile_count::zero().

Referenced by expand_ifn_va_arg_1().

◆ gimple_flow_call_edges_add()

static int gimple_flow_call_edges_add ( sbitmap blocks)
static
Add fake edges to the function exit for any non constant and non
noreturn calls (or noreturn calls with EH/abnormal edges),
volatile inline assembly in the bitmap of blocks specified by BLOCKS
or to the whole CFG if BLOCKS is zero.  Return the number of blocks
that were split.

The goal is to expose cases in which entering a basic block does
not imply that all subsequent instructions must be executed.   

References BASIC_BLOCK_FOR_FN, bitmap_bit_p, cfun, checking_verify_flow_info(), EXIT_BLOCK_PTR_FOR_FN, find_edge(), gcc_assert, gimple_build_nop(), gsi_commit_edge_inserts(), gsi_end_p(), gsi_insert_on_edge(), gsi_last_nondebug_bb(), gsi_prev(), gsi_stmt(), profile_probability::guessed_never(), i, last_basic_block_for_fn, make_edge(), n_basic_blocks_for_fn, NULL, NUM_FIXED_BLOCKS, basic_block_def::prev_bb, split_block(), and stmt_can_terminate_bb_p().

◆ gimple_lv_add_condition_to_bb()

static void gimple_lv_add_condition_to_bb ( basic_block first_head,
basic_block second_head,
basic_block cond_bb,
void * cond_e )
static
Adds a if else statement to COND_BB with condition COND_EXPR.
SECOND_HEAD is the destination of the THEN and FIRST_HEAD is
the destination of the ELSE part.   

References force_gimple_operand_gsi_1(), gimple_build_cond_from_tree(), GSI_CONTINUE_LINKING, gsi_insert_after(), gsi_last_bb(), GSI_NEW_STMT, is_gimple_condexpr_for_cond(), NULL_TREE, and single_succ_edge().

◆ gimple_lv_adjust_loop_header_phi()

static void gimple_lv_adjust_loop_header_phi ( basic_block first,
basic_block second,
basic_block new_head,
edge e )
static
Adjust phi nodes for 'first' basic block.  'second' basic block is a copy
of 'first'. Both of them are dominated by 'new_head' basic block. When
'new_head' was created by 'second's incoming edge it received phi arguments
on the edge by split_edge(). Later, additional edge 'e' was created to
connect 'new_head' and 'first'. Now this routine adds phi args on this
additional edge 'e' that new_head to second edge received as part of edge
splitting.   

References add_phi_arg(), find_edge(), gcc_assert, gimple_phi_arg_location_from_edge(), gsi_end_p(), gsi_next(), gsi_start_phis(), NULL, gphi_iterator::phi(), and PHI_ARG_DEF.

◆ gimple_make_forwarder_block()

static void gimple_make_forwarder_block ( edge fallthru)
static

◆ gimple_merge_blocks()

◆ gimple_move_block_after()

static bool gimple_move_block_after ( basic_block bb,
basic_block after )
static
Moves basic block BB after block AFTER.   

References link_block(), basic_block_def::prev_bb, and unlink_block().

◆ gimple_purge_all_dead_abnormal_call_edges()

bool gimple_purge_all_dead_abnormal_call_edges ( const_bitmap blocks)

◆ gimple_purge_all_dead_eh_edges()

◆ gimple_purge_dead_abnormal_call_edges()

◆ gimple_purge_dead_eh_edges()

◆ gimple_redirect_edge_and_branch()

◆ gimple_redirect_edge_and_branch_force()

static basic_block gimple_redirect_edge_and_branch_force ( edge e,
basic_block dest )
static
Simple wrapper, as we can always redirect fallthru edges.   

References gcc_assert, gimple_redirect_edge_and_branch(), and NULL.

◆ gimple_seq_unreachable_p()

bool gimple_seq_unreachable_p ( gimple_seq stmts)

◆ gimple_split_block()

static basic_block gimple_split_block ( basic_block bb,
void * stmt )
static
Splits basic block BB after statement STMT (but at least after the
labels).  If STMT is NULL, BB is split just after the labels.   

References create_empty_bb(), FOR_EACH_EDGE, gimple_set_bb(), walk_stmt_info::gsi, gsi_after_labels(), gsi_end_p(), gsi_for_stmt(), gsi_next(), gsi_split_seq_before(), gsi_start(), gsi_stmt(), NULL, set_bb_seq(), walk_stmt_info::stmt, and basic_block_def::succs.

◆ gimple_split_block_before_cond_jump()

static basic_block gimple_split_block_before_cond_jump ( basic_block bb)
static
Split a basic block if it ends with a conditional branch and if the
other part of the block is not empty.   

References walk_stmt_info::gsi, gsi_end_p(), gsi_last_nondebug_bb(), gsi_prev(), gsi_stmt(), last, NULL, and split_block().

◆ gimple_split_edge()

◆ gimple_switch_default_bb()

◆ gimple_switch_default_edge()

◆ gimple_switch_edge()

◆ gimple_switch_label_bb()

basic_block gimple_switch_label_bb ( function * ifun,
gswitch * gs,
unsigned index )

◆ gimple_try_redirect_by_replacing_jump()

static edge gimple_try_redirect_by_replacing_jump ( edge e,
basic_block target )
static
Attempt to perform edge redirection by replacing a possibly complex
jump instruction by a goto or by removing the jump completely.
This can apply only if all edges now point to the same block.  The
parameters and return values are equivalent to
redirect_edge_and_branch.   

References EDGE_COUNT, EDGE_SUCC, gsi_end_p(), gsi_last_bb(), gsi_remove(), gsi_stmt(), i, NULL, ssa_redirect_edge(), walk_stmt_info::stmt, and basic_block_def::succs.

Referenced by gimple_redirect_edge_and_branch().

◆ gimple_verify_flow_info()

◆ group_case_labels()

bool group_case_labels ( void )
Look for blocks ending in a multiway branch (a GIMPLE_SWITCH),
and scan the sorted vector of cases.  Combine the ones jumping to the
same label.   

References cfun, changed, FOR_EACH_BB_FN, group_case_labels_stmt(), gsi_last_bb(), and safe_dyn_cast().

Referenced by build_gimple_cfg(), and execute_cleanup_cfg_post_optimizing().

◆ group_case_labels_stmt()

◆ gt_ggc_mx() [1/6]

void gt_ggc_mx ( basic_block & )
extern

◆ gt_ggc_mx() [2/6]

◆ gt_ggc_mx() [3/6]

void gt_ggc_mx ( gimple *& )
extern

◆ gt_ggc_mx() [4/6]

void gt_ggc_mx ( rtx & )
extern

◆ gt_ggc_mx() [5/6]

static void gt_ggc_mx ( rtx_insn *& x)
static

◆ gt_ggc_mx() [6/6]

void gt_ggc_mx ( tree & )
extern
Garbage collection support for edge_def.   

◆ gt_pch_nx() [1/7]

void gt_pch_nx ( basic_block & )
extern

◆ gt_pch_nx() [2/7]

◆ gt_pch_nx() [3/7]

◆ gt_pch_nx() [4/7]

void gt_pch_nx ( gimple *& )
extern

◆ gt_pch_nx() [5/7]

void gt_pch_nx ( rtx & )
extern

◆ gt_pch_nx() [6/7]

static void gt_pch_nx ( rtx_insn *& x)
static

◆ gt_pch_nx() [7/7]

void gt_pch_nx ( tree & )
extern
PCH support for edge_def.   

◆ handle_abnormal_edges()

static void handle_abnormal_edges ( basic_block * dispatcher_bbs,
basic_block for_bb,
auto_vec< basic_block > * bbs,
bool computed_goto )
static

◆ init_empty_tree_cfg()

◆ init_empty_tree_cfg_for_function()

◆ insert_cond_bb()

basic_block insert_cond_bb ( basic_block bb,
gimple * stmt,
gimple * cond,
profile_probability prob )
Insert COND expression which is GIMPLE_COND after STMT
in basic block BB with appropriate basic block split
and creation of a new conditionally executed basic block.
Update profile so the new bb is visited with probability PROB.
Return created basic block.   

References add_bb_to_loop(), CDI_DOMINATORS, basic_block_def::count, create_empty_bb(), current_loops, dom_info_available_p(), gcc_assert, GSI_CONTINUE_LINKING, gsi_end_p(), gsi_insert_after(), gsi_insert_before(), gsi_last_bb(), basic_block_def::loop_father, make_edge(), make_single_succ_edge(), set_immediate_dominator(), and split_block().

Referenced by expand_complex_multiplication().

◆ is_ctrl_altering_stmt()

bool is_ctrl_altering_stmt ( gimple * t)
Return true if T is a statement that may alter the flow of control
(e.g., a call to a non-returning function).   

References as_a(), CASE_GIMPLE_OMP, cfun, gcc_assert, gimple_asm_nlabels(), gimple_call_ctrl_altering_p(), and stmt_can_throw_internal().

Referenced by expand_complex_move(), instrument_expr(), make_edges_bb(), mark_stmt_if_obviously_necessary(), stmt_ends_bb_p(), vect_schedule_slp_node(), and vect_slp_function().

◆ is_ctrl_stmt()

◆ label_to_block()

basic_block label_to_block ( struct function * ifun,
tree dest )
Return the basic block holding label DEST.   

References BASIC_BLOCK_FOR_FN, function::cfg, cfun, gimple_build_label(), gsi_insert_before(), GSI_NEW_STMT, gsi_start_bb(), LABEL_DECL_UID, NULL, NUM_FIXED_BLOCKS, seen_error(), vec_safe_length(), and control_flow_graph::x_label_to_block_map.

Referenced by tree_switch_conversion::switch_decision_tree::analyze_switch_statement(), associate_equivalences_with_edges(), tree_switch_conversion::switch_conversion::build_constructors(), builtin_setjmp_setup_bb(), clean_up_after_unswitching(), cleanup_control_flow_bb(), cleanup_empty_eh(), convert_single_case_switch(), dump_gimple_switch(), evaluate_control_stmt_using_entry_checks(), execute_early_expand_coro_ifns(), expand_asm_stmt(), expand_case(), find_taken_edge_computed_goto(), back_threader::find_taken_edge_switch(), find_taken_edge_switch_expr(), find_unswitching_predicates_for_bb(), tree_switch_conversion::switch_conversion::gather_default_values(), get_cases_for_edge(), gimple_redirect_edge_and_branch(), gimple_switch_label_bb(), gimple_verify_flow_info(), group_case_labels_stmt(), lower_eh_dispatch(), lower_resx(), main_block_label(), make_cond_expr_edges(), make_edges_bb(), make_eh_dispatch_edges(), make_eh_edge(), make_gimple_asm_edges(), make_goto_expr_edges(), maybe_remove_unreachable_handlers(), predicate_bbs(), record_edge_info(), redirect_eh_dispatch_edge(), simplify_gimple_switch_label_vec(), simplify_using_ranges::simplify_switch_using_ranges(), jump_threader::thread_around_empty_blocks(), jump_threader::thread_through_normal_block(), unsplit_eh(), verify_eh_dispatch_edge(), and verify_eh_edges().

◆ last_and_only_stmt()

gimple * last_and_only_stmt ( basic_block bb)
Return the last statement of an otherwise empty block.  Return NULL
if the block is totally empty, or if it contains more than one
statement.   

References gsi_end_p(), gsi_last_nondebug_bb(), gsi_prev_nondebug(), gsi_stmt(), i, last, and NULL.

Referenced by cond_store_replacement(), determine_parallel_type(), edge_forwards_cmp_to_conditional_jump_through_empty_bb_p(), minmax_replacement(), and poor_ifcvt_pred().

◆ last_nondebug_stmt()

◆ main_block_label()

static tree main_block_label ( tree label,
label_record * label_for_bb )
static
Given LABEL return the first label in the same basic block.   

References cfun, basic_block_def::index, label_for_bb(), label_to_block(), and rtx_def::used.

Referenced by cleanup_dead_labels(), and cleanup_dead_labels_eh().

◆ make_blocks()

static void make_blocks ( gimple_seq seq)
static

◆ make_blocks_1()

◆ make_cond_expr_edges()

static void make_cond_expr_edges ( basic_block bb)
static

◆ make_edges()

◆ make_edges_bb()

static int make_edges_bb ( basic_block bb,
struct omp_region ** pcur_region,
int * pomp_index )
static

◆ make_gimple_asm_edges()

static void make_gimple_asm_edges ( basic_block bb)
static
Create edges for an asm statement with labels at block BB.   

References as_a(), cfun, gimple_asm_label_op(), gimple_asm_nlabels(), gsi_last_bb(), i, label_to_block(), make_edge(), and TREE_VALUE.

Referenced by make_edges_bb().

◆ make_gimple_switch_edges()

static void make_gimple_switch_edges ( gswitch * entry,
basic_block bb )
static
Create the edges for a GIMPLE_SWITCH starting at block BB.   

References cfun, gimple_switch_label_bb(), gimple_switch_num_labels(), i, and make_edge().

Referenced by make_edges_bb().

◆ make_goto_expr_edges()

static bool make_goto_expr_edges ( basic_block bb)
static
Create edges for a goto statement at block BB.  Returns true
if abnormal edges should be created.   

References cfun, gimple_goto_dest(), gimple_location(), gsi_last_bb(), gsi_remove(), gsi_stmt(), label_to_block(), last, make_edge(), and simple_goto_p().

Referenced by make_edges_bb().

◆ make_pass_build_cfg()

gimple_opt_pass * make_pass_build_cfg ( gcc::context * ctxt)

◆ make_pass_fixup_cfg()

gimple_opt_pass * make_pass_fixup_cfg ( gcc::context * ctxt)

◆ make_pass_split_crit_edges()

gimple_opt_pass * make_pass_split_crit_edges ( gcc::context * ctxt)

◆ make_pass_warn_function_return()

gimple_opt_pass * make_pass_warn_function_return ( gcc::context * ctxt)

◆ make_pass_warn_unused_result()

gimple_opt_pass * make_pass_warn_unused_result ( gcc::context * ctxt)

◆ maybe_remove_writeonly_store()

◆ move_block_to_fn()

static void move_block_to_fn ( struct function * dest_cfun,
basic_block bb,
basic_block after,
bool update_edge_count_p,
struct move_stmt_d * d )
static
Move basic block BB from function CFUN to function DEST_FN.  The
block is moved out of the original linked list and placed after
block AFTER in the new list.  Also, the block is removed from the
original array of blocks and placed in DEST_FN's array of blocks.
If UPDATE_EDGE_COUNT_P is true, the edge counts on both CFGs is
updated to reflect the moved edges.

The local variables are remapped to new instances, VARS_MAP is used
to record the mapping.   

References as_a(), loop::aux, CDI_DOMINATORS, function::cfg, cfun, current_loops, function::decl, DECL_CONTEXT, delete_from_dominance_info(), dyn_cast(), EDGE_COUNT, move_stmt_d::eh_map, FOR_EACH_EDGE, FOR_EACH_IMM_USE_ON_STMT, FOR_EACH_IMM_USE_STMT, FOR_EACH_PHI_ARG, free_stmt_operands(), gcc_assert, gimple_duplicate_stmt_histograms(), gimple_label_label(), gimple_phi_arg_location(), gimple_phi_arg_set_location(), gimple_remove_stmt_histograms(), gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_start_phis(), gsi_stmt(), i, basic_block_def::index, is_gimple_call(), LABEL_DECL_UID, control_flow_graph::last_label_uid, LOCATION_BLOCK, basic_block_def::loop_father, maybe_duplicate_eh_stmt_fn(), move_block_after(), move_stmt_op(), move_stmt_r(), move_stmt_d::new_block, notice_special_calls(), NULL, NULL_TREE, move_stmt_d::orig_block, PHI_RESULT, pop_cfun(), basic_block_def::preds, push_cfun(), remove_phi_node(), remove_stmt_from_eh_lp_fn(), replace_ssa_name(), set_block(), SET_PHI_RESULT, SET_USE, si, SSA_NAME_VAR, SSA_OP_USE, walk_stmt_info::stmt, basic_block_def::succs, TREE_CODE, UNKNOWN_LOCATION, update_stmt(), USE_FROM_PTR, move_stmt_d::vars_map, vec_safe_grow_cleared(), vec_safe_length(), virtual_operand_p(), walk_gimple_stmt(), control_flow_graph::x_basic_block_info, control_flow_graph::x_label_to_block_map, control_flow_graph::x_last_basic_block, control_flow_graph::x_n_basic_blocks, and control_flow_graph::x_n_edges.

Referenced by move_sese_region_to_fn().

◆ move_sese_region_to_fn()

basic_block move_sese_region_to_fn ( struct function * dest_cfun,
basic_block entry_bb,
basic_block exit_bb,
tree orig_block )
Move a single-entry, single-exit region delimited by ENTRY_BB and
EXIT_BB to function DEST_CFUN.  The whole region is replaced by a
single basic block in the original CFG and the new basic block is
returned.  DEST_CFUN must not have a CFG yet.

Note that the region need not be a pure SESE region.  Blocks inside
the region may contain calls to abort/exit.  The only restriction
is that ENTRY_BB should be the only entry point and it must
dominate EXIT_BB.

Change TREE_BLOCK of all statements in ORIG_BLOCK to the new
functions outermost BLOCK, move all subblocks of ORIG_BLOCK
to the new function.

All local variables referenced in the region are assumed to be in
the corresponding BLOCK_VARS and unexpanded variable lists
associated with DEST_CFUN.

TODO: investigate whether we can reuse gimple_duplicate_sese_region to
reimplement move_sese_region_to_fn by duplicating the region rather than
moving it.   

References add_bb_to_loop(), loop::aux, BITMAP_ALLOC, BITMAP_FREE, BLOCK_CHAIN, BLOCK_SUBBLOCKS, BLOCK_SUPERCONTEXT, build_int_cst(), CDI_DOMINATORS, function::cfg, cfun, hash_table< Descriptor, Lazy, Allocator >::clear_slot(), basic_block_def::count, count, create_empty_bb(), current_loops, function::decl, DECL_ARGUMENTS, DECL_CHAIN, DECL_INITIAL, dominated_by_p(), duplicate_eh_regions(), EDGE_COUNT, function::eh, move_stmt_d::eh_map, ei_safe_edge(), ei_start, ENTRY_BLOCK_PTR_FOR_FN, EXECUTE_IF_SET_IN_BITMAP, EXIT_BLOCK_PTR_FOR_FN, loop::exits, loops::exits, find_loop_dist_alias(), find_outermost_region_in_block(), hash_table< Descriptor, Lazy, Allocator >::find_slot_with_hash(), fixup_loop_arrays_after_move(), flow_loop_tree_node_add(), flow_loop_tree_node_remove(), fold_loop_internal_call(), FOR_EACH_BB_FN, FOR_EACH_EDGE, FOR_EACH_VEC_ELT, loop::force_vectorize, free(), free_numbers_of_iterations_estimates(), move_stmt_d::from_context, g, gather_blocks_in_sese_region(), gather_ssa_name_hash_map_from(), gcc_assert, get_dominated_by_region(), get_immediate_dominator(), get_loop(), get_loops(), ggc_cleared_alloc(), ggc_free(), gimple_build_nop(), gimple_call_arg(), gimple_call_set_arg(), gimple_in_ssa_p(), function::has_force_vectorize_loops, function::has_simduid_loops, loop::header, i, init_eh_for_function(), init_empty_tree_cfg(), init_loops_structure(), integer_type_node, loops::larray, function::last_clique, basic_block_def::loop_father, loop_outer(), loops_for_fn(), LOOPS_MAY_HAVE_MULTIPLE_LATCHES, make_edge(), make_single_succ_edge(), make_ssa_name_fn(), move_block_to_fn(), move_stmt_d::new_block, move_stmt_d::new_label_map, new_label_mapper(), NULL, NULL_TREE, loop::num_nodes, move_stmt_d::orig_block, pop_cfun(), basic_block_def::preds, push_cfun(), hash_map< KeyId, Value, Traits >::put(), release_ssa_name(), move_stmt_d::remap_decls_p, remove_edge(), replace_block_vars_by_duplicates(), replace_by_duplicate_decl(), set_immediate_dominator(), set_loops_for_fn(), set_ssa_default_def(), loop::simduid, ssa_name, loops::state, basic_block_def::succs, move_stmt_d::to_context, hash_map< KeyId, Value, Traits >::traverse(), tree_map_eq, tree_map_hash(), tree_to_shwi(), update_stmt(), move_stmt_d::vars_map, vec_safe_iterate(), vec_safe_length(), verify_sese(), control_flow_graph::x_entry_block_ptr, and profile_count::zero().

Referenced by expand_omp_target(), and expand_omp_taskreg().

◆ move_stmt_eh_region_nr()

static int move_stmt_eh_region_nr ( int old_nr,
struct move_stmt_d * p )
static
Helper for move_stmt_r.  Given an EH region number for the source
function, map that to the duplicate EH regio number in the dest.   

References move_stmt_d::eh_map, hash_map< KeyId, Value, Traits >::get(), get_eh_region_from_number(), and eh_region_d::index.

Referenced by move_stmt_eh_region_tree_nr(), and move_stmt_r().

◆ move_stmt_eh_region_tree_nr()

static tree move_stmt_eh_region_tree_nr ( tree old_t_nr,
struct move_stmt_d * p )
static
Similar, but operate on INTEGER_CSTs.   

References build_int_cst(), integer_type_node, move_stmt_eh_region_nr(), and tree_to_shwi().

Referenced by move_stmt_r().

◆ move_stmt_op()

static tree move_stmt_op ( tree * tp,
int * walk_subtrees,
void * data )
static

◆ move_stmt_r()

◆ new_label_mapper()

static tree new_label_mapper ( tree decl,
void * data )
static

◆ next_discriminator_for_locus()

static int next_discriminator_for_locus ( int line)
static
Find the next available discriminator value for LOCUS.  The
discriminator distinguishes among several basic blocks that
share a common locus, allowing for more accurate sample-based
profiling.   

References locus_discrim_map::discriminator, discriminator_per_locus, gcc_assert, and locus_discrim_map::location_line.

Referenced by assign_discriminator(), and assign_discriminators().

◆ notice_special_calls()

void notice_special_calls ( gcall * call)

◆ one_pointer_to_useless_type_conversion_p()

static bool one_pointer_to_useless_type_conversion_p ( tree dest,
tree src_obj )
static
Returns true if there is one pointer type in TYPE_POINTER_TO (SRC_OBJ)
list of pointer-to types that is trivially convertible to DEST.   

References edge_def::dest, edge_def::src, TYPE_NEXT_PTR_TO, TYPE_POINTER_TO, and useless_type_conversion_p().

Referenced by verify_gimple_assign_single().

◆ print_loop()

static void print_loop ( FILE * file,
class loop * loop,
int indent,
int verbosity )
static
Pretty print LOOP on FILE, indented INDENT spaces.  Following
VERBOSITY level this outputs the contents of the loop, or just its
structure.   

References alloca, cfun, FOR_EACH_BB_FN, loop::header, basic_block_def::index, loop::inner, loop::latch, basic_block_def::loop_father, NULL, loop::num, print_loop_and_siblings(), print_loop_info(), and print_loops_bb().

Referenced by debug(), debug_loop(), debug_verbose(), and print_loop_and_siblings().

◆ print_loop_and_siblings()

static void print_loop_and_siblings ( FILE * file,
class loop * loop,
int indent,
int verbosity )
static
Print the LOOP and its sibling loops on FILE, indented INDENT
spaces.  Following VERBOSITY level this outputs the contents of the
loop, or just its structure.   

References loop::next, NULL, print_loop(), and print_loop_and_siblings().

Referenced by print_loop(), print_loop_and_siblings(), and print_loops().

◆ print_loop_info()

◆ print_loops()

void print_loops ( FILE * file,
int verbosity )
Follow a CFG edge from the entry point of the program, and on entry
of a loop, pretty print the loop structure on FILE.   

References cfun, current_function_name(), ENTRY_BLOCK_PTR_FOR_FN, basic_block_def::loop_father, and print_loop_and_siblings().

Referenced by debug_loops().

◆ print_loops_bb()

void print_loops_bb ( FILE * file,
basic_block bb,
int indent,
int verbosity )
Print to FILE the basic block BB following the VERBOSITY level.   

References alloca, dump_bb(), basic_block_def::index, print_pred_bbs(), print_succ_bbs(), TDF_MEMSYMS, and TDF_VOPS.

Referenced by print_loop().

◆ print_no_sanitize_attr_value()

static void print_no_sanitize_attr_value ( FILE * file,
tree value )
static
Print no_sanitize attribute to FILE for a given attribute VALUE.   

References i, sanitizer_opts_s::name, NULL, sanitizer_opts, and tree_to_uhwi().

Referenced by dump_function_to_file().

◆ print_pred_bbs()

static void print_pred_bbs ( FILE * file,
basic_block bb )
static
Print on FILE the indexes for the predecessors of basic_block BB.   

References FOR_EACH_EDGE, and basic_block_def::preds.

Referenced by print_loops_bb().

◆ print_succ_bbs()

static void print_succ_bbs ( FILE * file,
basic_block bb )
static
Print on FILE the indexes for the successors of basic_block BB.   

References FOR_EACH_EDGE, and basic_block_def::succs.

Referenced by print_loops_bb().

◆ recording_case_labels_p()

static bool recording_case_labels_p ( void )
static
Return nonzero if we are recording information for case labels.   

References edge_to_cases, and NULL.

Referenced by get_cases_for_edge().

◆ remove_bb()

◆ remove_edge_and_dominated_blocks()

◆ remove_phi_nodes_and_edges_for_unreachable_block()

static void remove_phi_nodes_and_edges_for_unreachable_block ( basic_block bb)
static
Remove PHI nodes associated with basic block BB and all edges out of BB.   

References EDGE_COUNT, EDGE_SUCC, remove_edge(), remove_phi_nodes(), and basic_block_def::succs.

Referenced by remove_bb().

◆ replace_block_vars_by_duplicates()

◆ replace_block_vars_by_duplicates_1()

static tree replace_block_vars_by_duplicates_1 ( tree * tp,
int * walk_subtrees,
void * data )
static
Tree walker to replace the decls used inside value expressions by
duplicates.   

References IS_TYPE_OR_DECL_P, NULL, replace_by_duplicate_decl(), replace_decls_d::to_context, TREE_CODE, and replace_decls_d::vars_map.

Referenced by replace_block_vars_by_duplicates().

◆ replace_by_duplicate_decl()

static void replace_by_duplicate_decl ( tree * tp,
hash_map< tree, tree > * vars_map,
tree to_context )
static

◆ replace_loop_annotate()

static void replace_loop_annotate ( void )
static

◆ replace_loop_annotate_in_block()

static void replace_loop_annotate_in_block ( basic_block bb,
class loop * loop )
static

◆ replace_ssa_name()

static tree replace_ssa_name ( tree name,
hash_map< tree, tree > * vars_map,
tree to_context )
static

◆ replace_uses_by()

◆ same_line_p()

static bool same_line_p ( location_t locus1,
expanded_location * from,
location_t locus2 )
static
Return TRUE if LOCUS1 and LOCUS2 refer to the same source line.   

References expand_location(), and NULL.

Referenced by assign_discriminator(), and assign_discriminators().

◆ simple_goto_p()

bool simple_goto_p ( gimple * t)
Return true if T is a simple local goto.   

References gimple_goto_dest(), and TREE_CODE.

Referenced by gimple_verify_flow_info(), make_goto_expr_edges(), and mark_stmt_if_obviously_necessary().

◆ single_noncomplex_succ()

basic_block single_noncomplex_succ ( basic_block bb)
Return the one of two successors of BB that is not reachable by a
complex edge, if there is one.  Else, return BB.  We use
this in optimizations that use post-dominators for their heuristics,
to catch the cases in C++ where function calls are involved.   

References EDGE_COMPLEX, EDGE_COUNT, EDGE_SUCC, and basic_block_def::succs.

Referenced by compute_merit().

◆ split_critical_edges()

unsigned int split_critical_edges ( bool for_edge_insertion_p)

◆ split_edge_bb_loc()

basic_block split_edge_bb_loc ( edge edge_in)
Returns the basic block after which the new basic block created
by splitting edge EDGE_IN should be placed.  Tries to keep the new block
near its "logical" location.  This is of most help to humans looking
at debugging dumps.   

References edge_def::dest, EDGE_COMPLEX, find_edge(), and basic_block_def::prev_bb.

Referenced by back_jt_path_registry::duplicate_thread_path(), gimple_duplicate_seme_region(), gimple_duplicate_sese_tail(), and gimple_split_edge().

◆ start_recording_case_labels()

void start_recording_case_labels ( void )
Start recording information mapping edges to case labels.   

References BITMAP_ALLOC, edge_to_cases, gcc_assert, NULL, and touched_switch_bbs.

Referenced by cleanup_tree_cfg_noloop(), and split_critical_edges().

◆ stmt_can_make_abnormal_goto()

◆ stmt_can_terminate_bb_p()

◆ stmt_ends_bb_p()

◆ stmt_starts_bb_p()

static bool stmt_starts_bb_p ( gimple * stmt,
gimple * prev_stmt )
inlinestatic
Various helpers.   
Return true if STMT should start a new basic block.  PREV_STMT is
the statement preceding STMT.  It is used when STMT is a label or a
case label.  Labels should only start a new basic block if their
previous statement wasn't a label.  Otherwise, sequence of labels
would generate unnecessary basic blocks that only contain a single
label.   

References cfg_stats, DECL_ARTIFICIAL, DECL_NONLOCAL, dyn_cast(), ECF_RETURNS_TWICE, FORCED_LABEL, gimple_call_flags(), gimple_call_internal_p(), gimple_label_label(), is_gimple_debug(), NULL, cfg_stats_d::num_merged_labels, and safe_dyn_cast().

Referenced by make_blocks_1().

◆ tree_node_can_be_shared()

static bool tree_node_can_be_shared ( tree t)
static
Return true when the T can be shared.   

References error_mark_node, is_gimple_min_invariant(), IS_TYPE_OR_DECL_P, and TREE_CODE.

Referenced by verify_node_sharing_1().

◆ valid_fixed_convert_types_p()

static bool valid_fixed_convert_types_p ( tree type1,
tree type2 )
static
Return true if TYPE1 is a fixed-point type and if conversions to and
from TYPE2 can be handled by FIXED_CONVERT_EXPR.   

References FIXED_POINT_TYPE_P, INTEGRAL_TYPE_P, and SCALAR_FLOAT_TYPE_P.

Referenced by verify_gimple_assign_unary().

◆ verify_address()

static bool verify_address ( tree t,
bool verify_addressable )
static
Verify properties of the address expression T whose base should be
TREE_ADDRESSABLE if VERIFY_ADDRESSABLE is true.   

References error(), handled_component_p(), recompute_tree_invariant_for_addr_expr(), TREE_ADDRESSABLE, TREE_CODE, TREE_CONSTANT, TREE_OPERAND, TREE_SIDE_EFFECTS, and VAR_P.

Referenced by verify_gimple_assign_single(), and verify_types_in_gimple_reference().

◆ verify_eh_throw_stmt_node()

bool verify_eh_throw_stmt_node ( gimple *const & stmt,
const int & ,
hash_set< gimple * > * visited )

◆ verify_expr_location()

static tree verify_expr_location ( tree * tp,
int * walk_subtrees,
void * data )
static
Called via walk_gimple_op.  Verify locations of expressions.   

References verify_expr_location_1().

Referenced by verify_gimple_in_cfg().

◆ verify_expr_location_1()

static tree verify_expr_location_1 ( tree * tp,
int * walk_subtrees,
void * data )
static

◆ verify_expr_no_block()

static tree verify_expr_no_block ( tree * tp,
int * walk_subtrees,
void *  )
static
Called via walk_tree.  Verify that expressions have no blocks.   

References EXPR_LOCATION, EXPR_P, LOCATION_BLOCK, and NULL.

Referenced by verify_expr_location_1().

◆ verify_gimple_assign()

◆ verify_gimple_assign_binary()

◆ verify_gimple_assign_single()

◆ verify_gimple_assign_ternary()

◆ verify_gimple_assign_unary()

◆ verify_gimple_call()

◆ verify_gimple_comparison()

static bool verify_gimple_comparison ( tree type,
tree op0,
tree op1,
enum tree_code code )
static
Verifies the gimple comparison with the result type TYPE and
the operands OP0 and OP1, comparison code is CODE.   

References debug_generic_expr(), error(), INTEGRAL_TYPE_P, is_gimple_val(), TREE_CODE, TREE_TYPE, TYPE_PRECISION, TYPE_VECTOR_SUBPARTS(), useless_type_conversion_p(), VECTOR_BOOLEAN_TYPE_P, VECTOR_INTEGER_TYPE_P, and VECTOR_TYPE_P.

Referenced by verify_gimple_assign_binary(), and verify_gimple_cond().

◆ verify_gimple_cond()

static bool verify_gimple_cond ( gcond * stmt)
static

◆ verify_gimple_debug()

static bool verify_gimple_debug ( gimple * stmt)
static
Verify a gimple debug statement STMT.
Returns true if anything is wrong.   

Referenced by verify_gimple_stmt().

◆ verify_gimple_goto()

static bool verify_gimple_goto ( ggoto * stmt)
static
Verify the contents of a GIMPLE_GOTO STMT.  Returns true when there
is a problem, otherwise false.   

References edge_def::dest, error(), gimple_goto_dest(), is_gimple_val(), POINTER_TYPE_P, TREE_CODE, and TREE_TYPE.

Referenced by verify_gimple_stmt().

◆ verify_gimple_in_cfg()

◆ verify_gimple_in_seq()

DEBUG_FUNCTION bool verify_gimple_in_seq ( gimple_seq stmts,
bool ice )
Verify the GIMPLE statements inside the statement list STMTS.   

References internal_error(), timevar_pop(), timevar_push(), and verify_gimple_in_seq_2().

Referenced by execute_function_todo(), and gimplify_body().

◆ verify_gimple_in_seq_2()

◆ verify_gimple_label()

static bool verify_gimple_label ( glabel * stmt)
static

◆ verify_gimple_phi()

static bool verify_gimple_phi ( gphi * phi)
static

◆ verify_gimple_return()

static bool verify_gimple_return ( greturn * stmt)
static
Verify the contents of a GIMPLE_RETURN STMT.  Returns true when there
is a problem, otherwise false.   

References cfun, debug_generic_stmt(), DECL_BY_REFERENCE, error(), gimple_return_retval(), is_gimple_val(), NULL, SSA_NAME_VAR, TREE_CODE, TREE_TYPE, and useless_type_conversion_p().

Referenced by verify_gimple_stmt().

◆ verify_gimple_stmt()

static bool verify_gimple_stmt ( gimple * stmt)
static

◆ verify_gimple_switch()

static bool verify_gimple_switch ( gswitch * stmt)
static
Verify the contents of a GIMPLE_SWITCH STMT.  Returns true when there
is a problem, otherwise false.   

References CASE_CHAIN, CASE_HIGH, CASE_LOW, debug_generic_expr(), debug_generic_stmt(), error(), gimple_switch_index(), gimple_switch_label(), gimple_switch_num_labels(), i, INTEGRAL_TYPE_P, is_gimple_val(), NULL_TREE, tree_int_cst_lt(), TREE_TYPE, and TYPE_PRECISION.

Referenced by verify_gimple_stmt().

◆ verify_gimple_transaction()

static bool verify_gimple_transaction ( gtransaction * stmt)
static
Verify the contents of a GIMPLE_TRANSACTION.  Returns true if there
is a problem, otherwise false.   

References gimple_transaction_body(), gimple_transaction_label_norm(), gimple_transaction_label_over(), gimple_transaction_label_uninst(), NULL, TREE_CODE, and verify_gimple_in_seq_2().

Referenced by verify_gimple_in_seq_2(), and verify_gimple_stmt().

◆ verify_location()

static bool verify_location ( hash_set< tree > * blocks,
location_t loc )
static

◆ verify_node_sharing()

static tree verify_node_sharing ( tree * tp,
int * walk_subtrees,
void * data )
static
Called via walk_gimple_stmt.  Verify tree sharing.   

References verify_node_sharing_1().

Referenced by verify_gimple_in_cfg().

◆ verify_node_sharing_1()

static tree verify_node_sharing_1 ( tree * tp,
int * walk_subtrees,
void * data )
static
Called via walk_tree.  Verify tree sharing.   

References NULL, tree_node_can_be_shared(), and visited.

Referenced by verify_gimple_in_cfg(), and verify_node_sharing().

◆ verify_sese()

DEBUG_FUNCTION void verify_sese ( basic_block entry,
basic_block exit,
vec< basic_block > * bbs_p )
Verify that the blocks in BBS_P are a single-entry, single-exit region
delimited by ENTRY_BB and EXIT_BB, possibly containing noreturn blocks.   

References BITMAP_ALLOC, bitmap_bit_p, BITMAP_FREE, bitmap_set_bit, ei_edge(), ei_end_p(), ei_next(), ei_start, FOR_EACH_VEC_ELT, gcc_assert, i, basic_block_def::index, NULL, basic_block_def::preds, single_pred(), single_pred_p(), single_succ(), single_succ_p(), and basic_block_def::succs.

Referenced by move_sese_region_to_fn().

◆ verify_types_in_gimple_reference()

Variable Documentation

◆ bb_to_omp_idx

vec<int> bb_to_omp_idx
static
OpenMP region idxs for blocks during cfg pass.   

Referenced by execute_build_cfg(), handle_abnormal_edges(), make_edges(), and remove_bb().

◆ cfg_stats

struct cfg_stats_d cfg_stats
static

◆ discriminator_per_locus

hash_table<locus_discrim_hasher>* discriminator_per_locus
static

◆ edge_to_cases

hash_map<edge, tree>* edge_to_cases
static
This hash table allows us to efficiently lookup all CASE_LABEL_EXPRs
which use a particular edge.  The CASE_LABEL_EXPRs are chained together
via their CASE_CHAIN field, which we clear after we're done with the
hash table to prevent problems with duplication of GIMPLE_SWITCHes.

Access to this list of CASE_LABEL_EXPRs allows us to efficiently
update the case vector in response to edge redirections.

Right now this table is set up and torn down at key points in the
compilation process.  It would be nice if we could make the table
more persistent.  The key is getting notification of changes to
the CFG (particularly edge removal, creation and redirection).   

Referenced by end_recording_case_labels(), get_cases_for_edge(), recording_case_labels_p(), and start_recording_case_labels().

◆ eh_error_found

bool eh_error_found
static

◆ gimple_cfg_hooks

struct cfg_hooks gimple_cfg_hooks
Hooks containers.   

Referenced by current_ir_type(), and gimple_register_cfg_hooks().

◆ initial_cfg_capacity

const int initial_cfg_capacity = 20
static
Control flow functions for trees.
   Copyright (C) 2001-2024 Free Software Foundation, Inc.
   Contributed by Diego Novillo <dnovillo@redhat.com>

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.

GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3.  If not see
<http://www.gnu.org/licenses/>.   
This file contains functions for building the Control Flow Graph (CFG)
for a function tree.   
Local declarations.   
Initial capacity for the basic block array.   

Referenced by init_empty_tree_cfg_for_function().

◆ touched_switch_bbs

bitmap touched_switch_bbs
static
If we record edge_to_cases, this bitmap will hold indexes
of basic blocks that end in a GIMPLE_SWITCH which we touched
due to edge manipulations.   

Referenced by end_recording_case_labels(), gimple_redirect_edge_and_branch(), and start_recording_case_labels().