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

Functions

void init_ssanames ()
void fini_ssanames ()
void ssanames_print_statistics ()
tree make_ssa_name_fn ()
void set_range_info ()
enum value_range_type get_range_info ()
void release_ssa_name ()
bool get_ptr_info_alignment (struct ptr_info_def *pi, unsigned int *alignp, unsigned int *misalignp)
void mark_ptr_info_alignment_unknown ()
void set_ptr_info_alignment (struct ptr_info_def *pi, unsigned int align, unsigned int misalign)
void adjust_ptr_info_misalignment (struct ptr_info_def *pi, unsigned int increment)
struct ptr_info_defget_ptr_info ()
tree copy_ssa_name_fn ()
void duplicate_ssa_name_ptr_info ()
void duplicate_ssa_name_range_info ()
tree duplicate_ssa_name_fn ()
void release_defs ()
void replace_ssa_name_symbol ()
static unsigned int release_dead_ssa_names ()
gimple_opt_passmake_pass_release_ssa_names ()

Variables

unsigned int ssa_name_nodes_reused
unsigned int ssa_name_nodes_created

Function Documentation

void adjust_ptr_info_misalignment ( struct ptr_info_def pi,
unsigned int  increment 
)
   If pointer described by PI has known alignment, increase its known
   misalignment by INCREMENT modulo its current alignment.  

References make_ssa_name_fn().

tree copy_ssa_name_fn ( )
   Creates a new SSA name using the template NAME tobe defined by
   statement STMT in function FN.  

Referenced by duplicate_ssa_name_ptr_info().

tree duplicate_ssa_name_fn ( )
   Creates a duplicate of a ssa name NAME tobe defined by statement STMT
   in function FN.  

Referenced by make_ssa_name().

void duplicate_ssa_name_ptr_info ( )
   Creates a duplicate of the ptr_info_def at PTR_INFO for use by
   the SSA name NAME.  

References copy_ssa_name_fn().

Referenced by get_address_description(), and get_value().

void duplicate_ssa_name_range_info ( )
   Creates a duplicate of the range_info_def at RANGE_INFO for use by
   the SSA name NAME.  

Referenced by get_value().

void fini_ssanames ( void  )
   Finalize management of SSA_NAMEs.  

References ssa_name_nodes_created, and ssa_name_nodes_reused.

Referenced by execute_init_datastructures().

struct ptr_info_def* get_ptr_info ( )
read
   Return the alias information associated with pointer T.  It creates a
   new instance if none existed.  
bool get_ptr_info_alignment ( struct ptr_info_def pi,
unsigned int *  alignp,
unsigned int *  misalignp 
)
   If the alignment of the pointer described by PI is known, return true and
   store the alignment and the deviation from it into *ALIGNP and *MISALIGNP
   respectively.  Otherwise return false.  

References ptr_info_def::align, and ptr_info_def::misalign.

Referenced by get_address_description(), and get_object_alignment().

enum value_range_type get_range_info ( )
   Gets range information MIN, MAX and returns enum value_range_type
   corresponding to tree ssa_name NAME.  enum value_range_type returned
   is used to determine if MIN and MAX are valid values.  
     Return VR_VARYING for SSA_NAMEs with NULL RANGE_INFO or SSA_NAMEs
     with integral types width > 2 * HOST_BITS_PER_WIDE_INT precision.  
     If min > max, it is VR_ANTI_RANGE.  
         VR_ANTI_RANGE ~[min, max] is encoded as [max + 1, min - 1].  
       Otherwise (when min <= max), it is VR_RANGE.  

References range_info_def::max, range_info_def::min, and VR_ANTI_RANGE.

void init_ssanames ( )
   Initialize management of SSA_NAMEs to default SIZE.  If SIZE is
   zero use default.  
     Version 0 is special, so reserve the first slot in the table.  Though
     currently unused, we may use version 0 in alias analysis as part of
     the heuristics used to group aliases when the alias sets are too
     large.

     We use vec::quick_push here because we know that SSA_NAMES has at
     least 50 elements reserved in it.  
gimple_opt_pass* make_pass_release_ssa_names ( )
tree make_ssa_name_fn ( )
   Return an SSA_NAME node for variable VAR defined in statement STMT
   in function FN.  STMT may be an empty statement for artificial
   references (e.g., default definitions created when a variable is
   used without a preceding definition).  
     If our free list has an element, then use it.  
         The node was cleared out when we put it on the free list, so
         there is no need to do so again here.  

Referenced by adjust_ptr_info_misalignment(), and copy_ssa_name().

void mark_ptr_info_alignment_unknown ( )
   State that the pointer described by PI has unknown alignment.  

References ptr_info_def::align, and ptr_info_def::misalign.

Referenced by set_ptr_info_alignment().

static unsigned int release_dead_ssa_names ( )
static
   Return SSA names that are unused to GGC memory and compact the SSA
   version namespace.  This is used to keep footprint of compiler during
   interprocedural optimization.  
     Now release the freelist.  
     And compact the SSA number space.  We make sure to not change the
     relative order of SSA versions.  
void release_defs ( )
   Release all the SSA_NAMEs created by STMT.  
     Make sure that we are in SSA.  Otherwise, operand cache may point
     to garbage.  

References cfun, function::gimple_df, and gimple_df::ssa_names.

Referenced by dse_optimize_stmt(), execute_lower_resx(), fold_gimple_cond(), handle_pointer_plus(), process_assert_insertions_for(), stmt_is_power_of_op(), and update_call_from_tree().

void release_ssa_name ( )
   We no longer need the SSA_NAME expression VAR, release it so that
   it may be reused.

   Note it is assumed that no calls to make_ssa_name will be made
   until all uses of the ssa name are released and that the only
   use of the SSA_NAME expression is to check its SSA_NAME_VAR.  All
   other fields must be assumed clobbered.  
     Never release the default definition for a symbol.  It's a
     special SSA name that should always exist once it's created.  
     If VAR has been registered for SSA updating, don't remove it.
     After update_ssa has run, the name will be released.  
     release_ssa_name can be called multiple times on a single SSA_NAME.
     However, it should only end up on our free list one time.   We
     keep a status bit in the SSA_NAME node itself to indicate it has
     been put on the free list.

     Note that once on the freelist you can not reference the SSA_NAME's
     defining statement.  
         First put back the right tree node so that the tree checking
         macros do not complain.  
         Restore the version number.  
         Hopefully this can go away once we have the new incremental
         SSA updating code installed.  
         Note this SSA_NAME is now in the first list.  
         And finally put it on the free list.  

References cfun, delink_imm_use(), insert_debug_temp_for_var_def(), ssa_use_operand_d::loc, memset(), ssa_use_operand_d::next, ssa_use_operand_d::prev, ssa_use_operand_d::ssa_name, tree_size(), vec_safe_push(), and verify_imm_links().

Referenced by extract_and_process_scc_for_name().

void replace_ssa_name_symbol ( )
   Replace the symbol associated with SSA_NAME with SYM.  

Referenced by determine_unroll_factor(), and set_component_ssa_name().

void set_ptr_info_alignment ( struct ptr_info_def pi,
unsigned int  align,
unsigned int  misalign 
)
   Store the the power-of-two byte alignment and the deviation from that
   alignment of pointer described by PI to ALIOGN and MISALIGN
   respectively.  

References mark_ptr_info_alignment_unknown(), ptr_info_def::pt, and pt_solution_reset().

void set_range_info ( )
   Store range information MIN, and MAX to tree ssa_name NAME.  
     Allocate if not available.  
     Set the values.  
void ssanames_print_statistics ( void  )
   Dump some simple statistics regarding the re-use of SSA_NAME nodes.  

Variable Documentation

unsigned int ssa_name_nodes_created

Referenced by fini_ssanames().

unsigned int ssa_name_nodes_reused

Referenced by fini_ssanames().