GCC Middle and Back End API Reference
tree-ssa.h File Reference

Go to the source code of this file.

Data Structures

struct  edge_var_map

Typedefs

typedef vec< edge_var_map, va_heap, vl_embededge_var_map_vector

Functions

void redirect_edge_var_map_add (edge, tree, tree, location_t)
void redirect_edge_var_map_clear (edge)
void redirect_edge_var_map_dup (edge, edge)
vec< edge_var_map > * redirect_edge_var_map_vector (edge)
void redirect_edge_var_map_empty (void)
edge ssa_redirect_edge (edge, basic_block)
void flush_pending_stmts (edge)
void gimple_replace_ssa_lhs (gimple *, tree)
tree target_for_debug_bind (tree)
void insert_debug_temp_for_var_def (gimple_stmt_iterator *, tree)
void insert_debug_temps_for_defs (gimple_stmt_iterator *)
void reset_debug_uses (gimple *)
void release_defs_bitset (bitmap toremove)
void verify_ssa (bool, bool)
void init_tree_ssa (function *, int size=0)
void delete_tree_ssa (function *)
bool tree_ssa_useless_type_conversion (tree)
tree tree_ssa_strip_useless_type_conversions (tree)
tree find_released_ssa_name (tree *, int *, void *)
bool ssa_defined_default_def_p (tree t)
bool ssa_undefined_value_p (tree, bool=true)
bool ssa_name_any_use_dominates_bb_p (tree var, basic_block bb)
void mark_ssa_maybe_undefs (void)
bool ssa_name_maybe_undef_p (tree var)
void ssa_name_set_maybe_undef (tree var, bool value=true)
void execute_update_addresses_taken (void)
tree redirect_edge_var_map_def (edge_var_map *v)
tree redirect_edge_var_map_result (edge_var_map *v)
location_t redirect_edge_var_map_location (edge_var_map *v)
void checking_verify_ssa (bool check_modified_stmt, bool check_ssa_operands)

Typedef Documentation

◆ edge_var_map_vector

A vector of var maps.   

Function Documentation

◆ checking_verify_ssa()

void checking_verify_ssa ( bool check_modified_stmt,
bool check_ssa_operands )
inline
Verify SSA invariants, if internal consistency checks are enabled.   

References checking_verify_ssa(), and verify_ssa().

Referenced by checking_verify_ssa().

◆ delete_tree_ssa()

◆ execute_update_addresses_taken()

void execute_update_addresses_taken ( void )
extern
Compute TREE_ADDRESSABLE and whether we have unhandled partial defs
for local variables.   

References as_a(), asan_mark_p(), bitmap_bit_p, bitmap_empty_p(), bitmap_set_bit, bitsizetype, build1(), build_clobber(), build_constructor(), build_vector_type(), cfun, DECL_ARGUMENTS, DECL_CHAIN, DECL_P, DECL_UID, execute_update_addresses_taken(), fold_build1, fold_builtin_atomic_compare_exchange(), FOR_EACH_BB_FN, FOR_EACH_VEC_SAFE_ELT, g, gcc_assert, get_base_address(), gimple_asm_input_op(), gimple_asm_ninputs(), gimple_asm_noutputs(), gimple_asm_output_op(), gimple_assign_lhs(), gimple_assign_rhs1(), gimple_assign_rhs1_ptr(), gimple_assign_set_lhs(), gimple_assign_set_rhs_from_tree(), gimple_assign_set_rhs_with_ops(), gimple_assign_single_p(), gimple_build_assign(), gimple_build_call_internal(), gimple_call_arg(), gimple_call_arg_ptr(), gimple_call_internal_p(), gimple_call_num_args(), gimple_call_set_arg(), gimple_call_set_lhs(), gimple_clobber_p(), gimple_debug_bind_get_value_ptr(), gimple_debug_bind_has_value_p(), gimple_debug_bind_p(), gimple_debug_bind_reset_value(), gimple_get_lhs(), gimple_ior_addresses_taken(), gimple_location(), gimple_phi_num_args(), gimple_references_memory_p(), gimple_set_location(), gimple_set_vuse(), gimple_vuse(), gsi_end_p(), gsi_for_stmt(), gsi_insert_before(), gsi_next(), gsi_replace(), GSI_SAME_STMT, gsi_start_bb(), gsi_start_phis(), gsi_stmt(), i, integer_zerop(), is_asan_mark_p(), is_gimple_debug(), known_ge, known_gt, LOOP_CLOSED_SSA, loops_state_satisfies_p(), make_ssa_name(), maybe_optimize_var(), maybe_rewrite_mem_ref_base(), mem_ref_offset(), non_rewritable_lvalue_p(), non_rewritable_mem_ref_base(), NULL, null_pointer_node, NULL_TREE, number_of_loops(), operand_equal_p(), optimize_atomic_compare_exchange_p(), PHI_ARG_DEF, poly_int_tree_p(), rewrite_into_loop_closed_ssa(), suppress_warning(), timevar_pop(), timevar_push(), wi::to_poly_offset(), TODO_update_ssa, TREE_ADDRESSABLE, TREE_CODE, TREE_OPERAND, TREE_THIS_VOLATILE, tree_to_uhwi(), TREE_TYPE, TREE_VALUE, TYPE_MODE, TYPE_SIZE, TYPE_SIZE_UNIT, types_compatible_p(), unlink_stmt_vdef(), update_ssa(), update_stmt(), useless_type_conversion_p(), valid_vector_subparts_p(), VAR_P, VECTOR_TYPE_P, and wide_int_to_tree().

Referenced by execute_function_todo(), and execute_update_addresses_taken().

◆ find_released_ssa_name()

tree find_released_ssa_name ( tree * tp,
int * walk_subtrees,
void * data_ )
extern
Called via walk_tree, look for SSA_NAMEs that have already been
released.   

References find_released_ssa_name(), IS_TYPE_OR_DECL_P, NULL_TREE, SSA_NAME_IN_FREE_LIST, and TREE_CODE.

Referenced by find_released_ssa_name(), insert_debug_temp_for_var_def(), and verify_loop_structure().

◆ flush_pending_stmts()

◆ gimple_replace_ssa_lhs()

void gimple_replace_ssa_lhs ( gimple * stmt,
tree nlhs )
extern
Replace the LHS of STMT, an assignment, either a GIMPLE_ASSIGN or a
GIMPLE_CALL, with NLHS, in preparation for modifying the RHS to an
expression with a different value.

This will update any annotations (say debug bind stmts) referring
to the original LHS, so that they use the RHS instead.  This is
done even if NLHS and LHS are the same, for it is understood that
the RHS will be modified afterwards, and NLHS will not be assigned
an equivalent value.

Adjusting any non-annotation uses of the LHS, if needed, is a
responsibility of the caller.

The effect of this call should be pretty much the same as that of
inserting a copy of STMT before STMT, and then removing the
original stmt, at which time gsi_remove() would have update
annotations, but using this function saves all the inserting,
copying and removing.   

References gcc_assert, gimple_get_lhs(), gimple_replace_ssa_lhs(), gimple_set_lhs(), insert_debug_temp_for_var_def(), MAY_HAVE_DEBUG_BIND_STMTS, NULL, and SSA_NAME_DEF_STMT.

Referenced by gimple_replace_ssa_lhs().

◆ init_tree_ssa()

◆ insert_debug_temp_for_var_def()

◆ insert_debug_temps_for_defs()

void insert_debug_temps_for_defs ( gimple_stmt_iterator * gsi)
extern
Insert a DEBUG BIND stmt before STMT for each DEF referenced by
other DEBUG stmts, and replace uses of the DEF with the
newly-created debug temp.   

References DEF_FROM_PTR, FOR_EACH_PHI_OR_STMT_DEF, walk_stmt_info::gsi, gsi_stmt(), insert_debug_temp_for_var_def(), insert_debug_temps_for_defs(), MAY_HAVE_DEBUG_BIND_STMTS, SSA_OP_DEF, walk_stmt_info::stmt, and TREE_CODE.

Referenced by gsi_remove(), insert_debug_temps_for_defs(), and remove_phi_node().

◆ mark_ssa_maybe_undefs()

◆ redirect_edge_var_map_add()

void redirect_edge_var_map_add ( edge e,
tree result,
tree def,
location_t locus )
extern
Add a mapping with PHI RESULT and PHI DEF associated with edge E.   

References edge_var_map::def, edge_var_maps, edge_var_map::locus, NULL, redirect_edge_var_map_add(), and edge_var_map::result.

Referenced by cleanup_empty_eh_merge_phis(), redirect_edge_var_map_add(), and ssa_redirect_edge().

◆ redirect_edge_var_map_clear()

◆ redirect_edge_var_map_def()

tree redirect_edge_var_map_def ( edge_var_map * v)
inline

◆ redirect_edge_var_map_dup()

void redirect_edge_var_map_dup ( edge newe,
edge olde )
extern
Duplicate the redirected var mappings in OLDE in NEWE.

This assumes a hash_map can have multiple edges mapping to the same
var_map (many to one mapping), since we don't remove the previous mappings.

References edge_var_maps, and redirect_edge_var_map_dup().

Referenced by redirect_edge_succ_nodup(), and redirect_edge_var_map_dup().

◆ redirect_edge_var_map_empty()

void redirect_edge_var_map_empty ( void )
extern

◆ redirect_edge_var_map_location()

location_t redirect_edge_var_map_location ( edge_var_map * v)
inline

◆ redirect_edge_var_map_result()

tree redirect_edge_var_map_result ( edge_var_map * v)
inline

◆ redirect_edge_var_map_vector()

vec< edge_var_map > * redirect_edge_var_map_vector ( edge e)
extern

◆ release_defs_bitset()

void release_defs_bitset ( bitmap toremove)
extern

◆ reset_debug_uses()

◆ ssa_defined_default_def_p()

bool ssa_defined_default_def_p ( tree t)
extern
Return true if T, as SSA_NAME, has an implicit default defined value.   

References DECL_BY_REFERENCE, DECL_HARD_REGISTER, ssa_defined_default_def_p(), SSA_NAME_VAR, TREE_CODE, and VAR_P.

Referenced by get_constraint_for_ssa_var(), ssa_defined_default_def_p(), and ssa_undefined_value_p().

◆ ssa_name_any_use_dominates_bb_p()

bool ssa_name_any_use_dominates_bb_p ( tree var,
basic_block bb )
Return TRUE iff there are any non-PHI uses of VAR that dominate the
end of BB.  If we return TRUE and BB is a loop header, then VAR we
be assumed to be defined within the loop, even if it is marked as
maybe-undefined.   

References CDI_DOMINATORS, dominated_by_p(), FOR_EACH_IMM_USE_FAST, gimple_bb(), is_a(), is_gimple_debug(), ssa_name_any_use_dominates_bb_p(), and USE_STMT.

Referenced by find_ssa_undef(), mark_ssa_maybe_undefs(), and ssa_name_any_use_dominates_bb_p().

◆ ssa_name_maybe_undef_p()

◆ ssa_name_set_maybe_undef()

void ssa_name_set_maybe_undef ( tree var,
bool value = true )
inline
Set (or clear, depending on VALUE) VAR's maybe-undefined mark.   

References gcc_checking_assert, ssa_name_set_maybe_undef(), TREE_CODE, and TREE_VISITED.

Referenced by mark_ssa_maybe_undefs(), and ssa_name_set_maybe_undef().

◆ ssa_redirect_edge()

edge ssa_redirect_edge ( edge e,
basic_block dest )
extern
Remove the corresponding arguments from the PHI nodes in E's
destination block and redirect it to DEST.  Return redirected edge.
The list of removed arguments is stored in a vector accessed
through edge_var_maps.   

References gimple_phi_arg_def(), gimple_phi_arg_location(), gimple_phi_result(), gsi_end_p(), gsi_next(), gsi_start_phis(), NULL_TREE, gphi_iterator::phi(), redirect_edge_succ_nodup(), redirect_edge_var_map_add(), redirect_edge_var_map_clear(), and ssa_redirect_edge().

Referenced by gimple_redirect_edge_and_branch(), gimple_try_redirect_by_replacing_jump(), redirect_eh_edge(), ssa_redirect_edge(), and vect_loop_versioning().

◆ ssa_undefined_value_p()

◆ target_for_debug_bind()

tree target_for_debug_bind ( tree var)
extern
Given a tree for an expression for which we might want to emit
locations or values in debug information (generally a variable, but
we might deal with other kinds of trees in the future), return the
tree that should be used as the variable of a DEBUG_BIND STMT or
VAR_LOCATION INSN or NOTE.  Return NULL if VAR is not to be tracked.   

References DECL_HAS_VALUE_EXPR_P, DECL_IGNORED_P, DECL_VALUE_EXPR, is_gimple_reg_type(), MAY_HAVE_DEBUG_BIND_STMTS, NULL_TREE, SSA_NAME_VAR, target_for_debug_bind(), TREE_CODE, TREE_TYPE, VAR_DECL_IS_VIRTUAL_OPERAND, and VAR_P.

Referenced by dv_onepart_p(), expand_debug_expr(), expand_gimple_basic_block(), insert_init_debug_bind(), insert_phi_nodes_for(), maybe_register_def(), reset_debug_binding(), ipa_param_body_adjustments::reset_debug_stmts(), rewrite_stmt(), target_for_debug_bind(), use_type(), and vt_add_function_parameter().

◆ tree_ssa_strip_useless_type_conversions()

tree tree_ssa_strip_useless_type_conversions ( tree exp)
extern
Strip conversions from EXP according to
tree_ssa_useless_type_conversion and return the resulting
expression.   

References exp(), TREE_OPERAND, tree_ssa_strip_useless_type_conversions(), and tree_ssa_useless_type_conversion().

Referenced by tree_ssa_strip_useless_type_conversions().

◆ tree_ssa_useless_type_conversion()

bool tree_ssa_useless_type_conversion ( tree expr)
extern

◆ verify_ssa()