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

Public Types

typedef cselib_val value_type
typedef rtx_def compare_type

Static Public Member Functions

static hashval_t hash (const value_type *)
static bool equal (const value_type *, const compare_type *)
static void remove (cselib_val *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

typedef rtx_def cselib_hasher::compare_type

Member Function Documentation

bool cselib_hasher::equal ( const value_type v,
const compare_type 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 find_slot_memmode, elt_loc_list::loc, cselib_val_struct::locs, elt_loc_list::next, promote_debug_loc(), rtx_equal_for_cselib_1(), and cselib_val_struct::val_rtx.

hashval_t cselib_hasher::hash ( const value_type 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_struct::hash.

static void typed_noop_remove< cselib_val >::remove ( cselib_val p)
inlinestaticinherited
Remove doing nothing.   

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