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

Functions

static void get_expr_operands (gimple, tree *, int)
bool ssa_operands_active ()
static void create_vop_var ()
void init_ssa_operands ()
void fini_ssa_operands ()
static void * ssa_operand_alloc ()
static struct use_optype_dalloc_use ()
static use_optype_p add_use_op ()
static void finalize_ssa_defs ()
static void finalize_ssa_uses ()
static void cleanup_build_arrays ()
static void finalize_ssa_stmt_operands ()
static void start_ssa_stmt_operands ()
static void append_use ()
static void append_vdef ()
static void append_vuse ()
static void add_virtual_operand ()
static void add_stmt_operand ()
static void mark_address_taken ()
static void get_indirect_ref_operands ()
static void get_tmr_operands ()
static void maybe_add_call_vops ()
static void get_asm_expr_operands ()
static void get_expr_operands ()
static void parse_ssa_operands ()
static void build_ssa_operands ()
DEBUG_FUNCTION bool verify_ssa_operands ()
void free_stmt_operands ()
void update_stmt_operands ()
void swap_tree_operands ()
DEBUG_FUNCTION bool verify_imm_links ()
void dump_immediate_uses_for ()
void dump_immediate_uses ()
DEBUG_FUNCTION void debug_immediate_uses ()
DEBUG_FUNCTION void debug_immediate_uses_for ()
bool virtual_operand_p ()
void unlink_stmt_vdef ()

Variables

static vec< treebuild_uses
static tree build_vdef
static tree build_vuse
static bitmap_obstack operands_bitmap_obstack
static int n_initialized = 0

Function Documentation

static void add_stmt_operand ( )
static
Add *VAR_P to the appropriate operand array for statement STMT.
   FLAGS is as in get_expr_operands.  If *VAR_P is a GIMPLE register,
   it will be added to the statement's real operands, otherwise it is
   added to virtual operands.   

References add_virtual_operand(), append_use(), cfun, function::gimple_df, gimple_set_has_volatile_ops(), is_gimple_reg(), and gimple_df::ssa_renaming_needed.

Referenced by get_expr_operands().

static use_optype_p add_use_op ( )
inlinestatic
Adds OP to the list of uses of statement STMT after LAST.   

References alloc_use(), link_imm_use_stmt(), and use_optype_d::next.

Referenced by finalize_ssa_uses().

static void add_virtual_operand ( )
static
static struct use_optype_d* alloc_use ( )
staticread
Allocate a USE operand.   

References cfun, ssa_operands::free_uses, gimple_ssa_operands(), use_optype_d::next, and ssa_operand_alloc().

Referenced by add_use_op().

static void append_use ( )
inlinestatic
Add USE_P to the list of pointers to operands.   

Referenced by add_stmt_operand().

static void append_vdef ( )
inlinestatic
Add VAR to the set of variables that require a VDEF operator.   

References build_vdef, and build_vuse.

Referenced by add_virtual_operand().

static void append_vuse ( )
inlinestatic
Add VAR to the set of variables that require a VUSE operator.   

References build_vuse.

Referenced by add_virtual_operand(), and parse_ssa_operands().

static void build_ssa_operands ( )
static
static void cleanup_build_arrays ( )
inlinestatic
Clear the in_list bits and empty the build array for VDEFs and
   VUSEs.   

References build_vdef, and build_vuse.

Referenced by finalize_ssa_stmt_operands(), and verify_ssa_operands().

static void create_vop_var ( )
static
Create the VOP variable, an artificial global variable to act as a
   representative of all of the virtual operands FUD chain.   

References get_identifier().

Referenced by init_ssa_operands().

DEBUG_FUNCTION void debug_immediate_uses ( void  )
Dump def-use edges on stderr.   

References dump_immediate_uses().

DEBUG_FUNCTION void debug_immediate_uses_for ( )
Dump def-use edges on stderr.   

References dump_immediate_uses_for().

void dump_immediate_uses ( )
Dump all the immediate uses to FILE.   

References dump_immediate_uses_for().

Referenced by debug_immediate_uses(), and ssa_prop_init().

static void finalize_ssa_defs ( )
inlinestatic
Takes elements from build_defs and turns them into def operands of STMT.
   TODO -- Make build_defs vec of tree *.   

References build_vdef, cfun, function::gimple_df, gimple_set_vdef(), gimple_vdef(), release_ssa_name(), gimple_df::rename_vops, gimple_df::ssa_renaming_needed, and unlink_stmt_vdef().

Referenced by finalize_ssa_stmt_operands().

static void finalize_ssa_stmt_operands ( )
inlinestatic
Finalize all the build vectors, fill the new ones into INFO.   

References cleanup_build_arrays(), finalize_ssa_defs(), and finalize_ssa_uses().

Referenced by build_ssa_operands().

static void finalize_ssa_uses ( )
inlinestatic
void free_stmt_operands ( )
Releases the operands of STMT back to their freelists, and clears
   the stmt operand lists.   

References cfun, delink_imm_use(), ssa_operands::free_uses, gimple_has_mem_ops(), gimple_set_use_ops(), gimple_set_vdef(), gimple_set_vuse(), gimple_ssa_operands(), gimple_use_ops(), and use_optype_d::next.

Referenced by free_bb_predicate(), and move_block_to_fn().

static void get_expr_operands ( gimple  ,
tree ,
int   
)
static
static void get_expr_operands ( )
static
static void get_indirect_ref_operands ( )
static
A subroutine of get_expr_operands to handle MEM_REF.

   STMT is the statement being processed, EXPR is the MEM_REF
      that got us here.

   FLAGS is as in get_expr_operands.   

References add_virtual_operand(), get_expr_operands(), and gimple_set_has_volatile_ops().

Referenced by get_expr_operands().

static void get_tmr_operands ( )
static
A subroutine of get_expr_operands to handle TARGET_MEM_REF.   

References add_virtual_operand(), get_expr_operands(), and gimple_set_has_volatile_ops().

Referenced by get_expr_operands().

static void mark_address_taken ( )
static
Mark the base address of REF as having its address taken.
   REF may be a single variable whose address has been taken or any
   other valid GIMPLE memory reference (structure reference, array,
   etc).   

References get_base_address().

Referenced by get_asm_expr_operands(), and get_expr_operands().

static void maybe_add_call_vops ( )
static
If STMT is a call that may clobber globals and other symbols that
   escape, add them to the VDEF/VUSE lists for it.   

References add_virtual_operand(), and gimple_call_flags().

Referenced by parse_ssa_operands().

static void parse_ssa_operands ( )
static
Parse STMT looking for operands.  When finished, the various
   build_* operand vectors will have potential operands in them.   

References add_virtual_operand(), append_vuse(), cfun, get_asm_expr_operands(), get_expr_operands(), gimple_debug_bind_get_value_ptr(), gimple_debug_bind_has_value_p(), gimple_debug_bind_p(), gimple_num_ops(), gimple_op_ptr(), gimple_vop(), and maybe_add_call_vops().

Referenced by build_ssa_operands(), and verify_ssa_operands().

static void* ssa_operand_alloc ( )
inlinestatic
bool ssa_operands_active ( )
static void start_ssa_stmt_operands ( )
inlinestatic
Start the process of building up operands vectors in INFO.   

References build_vdef, and build_vuse.

Referenced by build_ssa_operands(), and verify_ssa_operands().

void swap_tree_operands ( )
Swap operands EXP0 and EXP1 in statement STMT.  No attempt is done
   to test the validity of the swap operation.   

References cfun, gimple_use_ops(), use_optype_d::next, and ssa_operands_active().

DEBUG_FUNCTION bool verify_imm_links ( )
Scan the immediate_use list for VAR making sure its linked properly.
   Return TRUE if there is a problem and emit an error message to F.   

References count, error(), gimple_modified_p(), ssa_use_operand_d::loc, ssa_use_operand_d::next, ssa_use_operand_d::prev, print_generic_expr(), print_gimple_stmt(), ssa_use_operand_d::stmt, and ssa_use_operand_d::use.

Referenced by release_ssa_name(), and verify_use().

bool virtual_operand_p ( )
Return true if OP, an SSA name or a DECL is a virtual operand.   

Referenced by adjust_debug_stmts(), bb_has_non_vop_phi(), canonicalize_loop_ivs(), ccp_initialize(), check_all_va_list_escapes(), check_loop_closed_ssa_use(), compute_avail(), compute_points_to_sets(), consider_split(), copy_phis_for_bb(), create_outofssa_var_map(), destroy_loop(), determine_biv_step(), determine_set_costs(), dump_phi_nodes(), dump_var_map(), eliminate_bb(), eliminate_const_or_copy(), eliminate_unnecessary_stmts(), eliminate_useless_phis(), execute_cse_reciprocals(), execute_late_warn_uninitialized(), execute_optimize_stdarg(), expand_used_vars(), find_assert_locations_1(), find_interesting_uses_outside(), find_uses_to_rename_bb(), forward_edge_to_pdom(), gather_scalar_reductions(), generate_loops_for_partition(), get_default_value(), gimple_dump_bb_for_graph(), gimple_merge_blocks(), hoist_adjacent_loads(), if_convertible_phi_p(), init_copy_prop(), insert_backedge_copies(), ipa_pta_execute(), is_gimple_reg(), may_propagate_copy(), move_block_to_fn(), move_computations_stmt(), movement_possibility(), output_bb(), output_function(), output_ssa_names(), partition_view_init(), phi_rank(), predicate_scalar_phi(), prepare_block_for_update(), propagate_necessity(), record_invariant(), record_temporary_equivalences_from_phis(), register_ssa_partition_check(), release_last_vdef(), remove_dead_phis(), remove_unused_locals(), rename_ssa_copies(), replace_ssa_name(), replace_uses_by(), rewrite_add_phi_arguments(), rewrite_commutative_reductions_out_of_ssa_loop(), rewrite_phi_with_iv(), rewrite_reductions_out_of_ssa(), rewrite_update_phi_arguments(), same_phi_alternatives_1(), same_succ_hash(), scalar_close_phi_node_p(), scev_const_prop(), sink_clobbers(), slpeel_tree_peel_loop_to_edge(), slpeel_update_phi_nodes_for_guard1(), split_function(), stmt_interesting_for_vrp(), strlen_enter_block(), substitute_and_fold(), transform_to_exit_first_loop(), try_create_reduction_list(), update_ssa(), vect_analyze_scalar_cycles_1(), vect_can_advance_ivs_p(), vect_update_ivs_after_vectorizer(), verify_gimple_in_cfg(), verify_gimple_phi(), verify_non_ssa_vars(), verify_phi_args(), verify_ssa(), verify_ssa_name(), visit_bb(), vop_phi(), and warn_uninitialized_phi().


Variable Documentation

vec<tree> build_uses
static
Array for building all the use operands.   
int n_initialized = 0
static
Number of functions with initialized ssa_operands.   

Referenced by fini_ssa_operands(), and init_ssa_operands().

bitmap_obstack operands_bitmap_obstack
static
Bitmap obstack for our datastructures that needs to survive across
   compilations of multiple functions.