GCC Middle and Back End API Reference
vars_ssa_cache Struct Reference
Collaboration diagram for vars_ssa_cache:

Data Structures

struct  entry
 

Public Member Functions

 vars_ssa_cache ()
 
 ~vars_ssa_cache ()
 
const_bitmap operator() (tree name)
 
void dump (FILE *file)
 

Private Member Functions

 vars_ssa_cache (const vars_ssa_cache &)=delete
 
 vars_ssa_cache (vars_ssa_cache &&)=delete
 
void unshare (int indx)
 
void create (tree)
 
bool exists (tree use)
 
void add_one (tree old_name, unsigned)
 
bool update (tree old_name, tree use)
 

Private Attributes

entryvars_ssa_caches
 
bitmap empty
 

Detailed Description

A cache for ssa name to address of stack variables.
When taking into account if a ssa name refers to an
address of a stack variable, we need to walk the
expressions backwards to find the addresses. This
cache is there so we don't need to walk the expressions
all the time.   

Constructor & Destructor Documentation

◆ vars_ssa_cache() [1/3]

vars_ssa_cache::vars_ssa_cache ( )
Constructor of the cache, create the cache array.  

References BITMAP_ALLOC, empty, num_ssa_names, stack_var_bitmap_obstack, and vars_ssa_caches.

Referenced by vars_ssa_cache(), and vars_ssa_cache().

◆ ~vars_ssa_cache()

vars_ssa_cache::~vars_ssa_cache ( )
Delete the array. The bitmaps will be freed
when stack_var_bitmap_obstack is freed.   

References vars_ssa_caches.

◆ vars_ssa_cache() [2/3]

vars_ssa_cache::vars_ssa_cache ( const vars_ssa_cache & )
privatedelete

References vars_ssa_cache().

◆ vars_ssa_cache() [3/3]

vars_ssa_cache::vars_ssa_cache ( vars_ssa_cache && )
privatedelete

References vars_ssa_cache().

Member Function Documentation

◆ add_one()

void vars_ssa_cache::add_one ( tree use,
unsigned idx )
private
Add to USE's bitmap for stack variable IDX.   

References bitmap_set_bit, gcc_assert, INVALID_STACK_INDEX, SSA_NAME_VERSION, unshare(), and vars_ssa_caches.

Referenced by operator()().

◆ create()

void vars_ssa_cache::create ( tree use)
private
Create an empty entry for the USE ssa name.   

References empty, SSA_NAME_VERSION, and vars_ssa_caches.

Referenced by operator()().

◆ dump()

void vars_ssa_cache::dump ( FILE * file)
Dump out the cache. Note empty and non-filled
in ssa names are not printed out.  

References dump_flags, empty, EXECUTE_IF_SET_IN_BITMAP, fputc(), i, num_ssa_names, print_generic_expr(), stack_vars, and vars_ssa_caches.

◆ exists()

bool vars_ssa_cache::exists ( tree use)
private
Returns true if the cache for USE exists.   

References SSA_NAME_VERSION, and vars_ssa_caches.

Referenced by operator()().

◆ operator()()

const_bitmap vars_ssa_cache::operator() ( tree name)
Returns the filled in cache for NAME.
This will fill in the cache if it does not exist already.
Returns an empty for ssa names that can't contain pointers
(only intergal types and pointer types will contain pointers).   

References a, add_one(), ANY_INTEGRAL_TYPE_P, changed, CONSTRUCTOR_ELTS, create(), decl_stack_index(), dyn_cast(), empty, exists(), FOR_EACH_CONSTRUCTOR_VALUE, g, gcc_assert, get_base_address(), gimple_assign_rhs1(), gimple_assign_single_p(), gimple_num_ops(), gimple_op(), gimple_phi_arg_def(), gimple_phi_num_args(), i, INVALID_STACK_INDEX, POINTER_TYPE_P, SSA_NAME_DEF_STMT, SSA_NAME_VERSION, TREE_CODE, TREE_OPERAND, TREE_TYPE, update(), and vars_ssa_caches.

◆ unshare()

void vars_ssa_cache::unshare ( int indx)
inlineprivate

◆ update()

bool vars_ssa_cache::update ( tree old_name,
tree use )
private
Update cache of OLD_NAME from the USE's cache.  

References bitmap_ior_into(), empty, SSA_NAME_VERSION, unshare(), and vars_ssa_caches.

Referenced by operator()().

Field Documentation

◆ empty

bitmap vars_ssa_cache::empty
private

◆ vars_ssa_caches

entry* vars_ssa_cache::vars_ssa_caches
private

The documentation for this struct was generated from the following file: