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

Data Structures

struct  key
 

Public Types

typedef keycompare_type
 
typedef cselib_valvalue_type
 

Static Public Member Functions

static hashval_t hash (const cselib_val *)
 
static bool equal (const cselib_val *, const key *)
 
static hashval_t hash (const value_type &)
 
static bool equal (const value_type &existing, const compare_type &candidate)
 
static void mark_deleted (cselib_val *&)
 
static void mark_empty (cselib_val *&)
 
static bool is_deleted (cselib_val *)
 
static bool is_empty (cselib_val *)
 
static void remove (cselib_val *&)
 

Static Public Attributes

static const bool empty_zero_p
 

Detailed Description

There are three ways in which cselib can look up an rtx:
- for a REG, the reg_values table (which is indexed by regno) is used
- for a MEM, we recursively look up its address and then follow the
  addr_list of that value
- for everything else, we compute a hash value and go through the hash
  table.  Since different rtx's can still have the same hash value,
  this involves walking the table entries for a given value and comparing
  the locations of the entries with the rtx we are looking up.   

Member Typedef Documentation

◆ compare_type

◆ value_type

cselib_val* pointer_hash< cselib_val >::value_type
inherited

Member Function Documentation

◆ equal() [1/2]

bool cselib_hasher::equal ( const cselib_val * v,
const key * x_arg )
inlinestatic
The equality test for our hash table.  The first argument V is a table
element (i.e. a cselib_val), while the second arg X is an rtx.  We know
that all callers of htab_find_slot_with_hash will wrap CONST_INTs into a
CONST of an appropriate mode.   

References autoinc_split(), cselib_current_insn, DEBUG_INSN_P, GET_CODE, GET_MODE, elt_loc_list::loc, cselib_val::locs, cselib_hasher::key::memmode, cselib_hasher::key::mode, elt_loc_list::next, NULL, NULL_RTX, promote_debug_loc(), rtx_equal_for_cselib_1(), elt_loc_list::setting_insn, SP_DERIVED_VALUE_P, cselib_val::val_rtx, and cselib_hasher::key::x.

◆ equal() [2/2]

bool pointer_hash< cselib_val >::equal ( const value_type & existing,
const compare_type & candidate )
inlinestaticinherited

◆ hash() [1/2]

hashval_t cselib_hasher::hash ( const cselib_val * v)
inlinestatic
The hash function for our hash table.  The value is always computed with
cselib_hash_rtx when adding an element; this function just extracts the
hash value from a cselib_val structure.   

References cselib_val::hash.

◆ hash() [2/2]

hashval_t pointer_hash< cselib_val >::hash ( const value_type & candidate)
inlinestaticinherited

◆ is_deleted()

bool pointer_hash< cselib_val >::is_deleted ( cselib_val * e)
inlinestaticinherited

◆ is_empty()

bool pointer_hash< cselib_val >::is_empty ( cselib_val * e)
inlinestaticinherited

◆ mark_deleted()

void pointer_hash< cselib_val >::mark_deleted ( cselib_val *& e)
inlinestaticinherited

◆ mark_empty()

void pointer_hash< cselib_val >::mark_empty ( cselib_val *& e)
inlinestaticinherited

◆ remove()

void typed_noop_remove< cselib_val * >::remove ( cselib_val * & )
inlinestaticinherited
Remove doing nothing.   

Field Documentation

◆ empty_zero_p

const bool pointer_hash< cselib_val >::empty_zero_p
staticinherited

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