osprey/be/cg/op_map.cxx File Reference

#include "defs.h"
#include "errors.h"
#include "mempool.h"
#include "cgir.h"

Include dependency graph for op_map.cxx:

Go to the source code of this file.

Data Types

type  value
type  hash_entry
type  hash_table
type  op_map

Defines

#define MAX_BUCKETS_LOG2   32
#define next_free_table(tbl)   ((tbl)->next_free)
#define next_free_entry(entry)   ((entry)->next)
#define hash(key, len_log2)   (((INTPTR)key >> 3) & ((1 << len_log2) - 1))
#define next_free_map(map)   ((map)->next_free)

Typedefs

typedef union value VALUE
typedef struct hash_entry HASH_ENTRY
typedef struct hash_table HASH_TABLE

Functions/Subroutines

static void init_idx_ops (void)
static void finish_idx_ops (void)
static void create_idx_ops (BB *bb)
OPOP_MAP_Idx_Op (BB *bb, UINT16 idx)
static void init_hash_tables (void)
static HASH_TABLEhash_table_create (UINT8 length_log2)
static void hash_table_delete (HASH_TABLE *tbl)
static HASH_ENTRYhash_entry_create (void)
static void hash_entries_delete (HASH_ENTRY *entries)
HASH_ENTRYhash_table_entry (HASH_TABLE *tbl, const OP *key, BOOL create)
void OP_MAP_Init (void)
void OP_MAP_Finish (void)
OP_MAP _OP_MAP_Create (OP_MAP_KIND kind)
void OP_MAP_Delete (OP_MAP map)
void OP_MAP_Set (OP_MAP map, OP *op, void *value)
void OP_MAP32_Set (OP_MAP map, OP *op, INT32 value)
void OP_MAP64_Set (OP_MAP map, OP *op, INT64 value)
voidOP_MAP_Get (OP_MAP map, const OP *op)
INT32 OP_MAP32_Get (OP_MAP map, const OP *op)
INT64 OP_MAP64_Get (OP_MAP map, const OP *op)
BB_OP_MAP BB_OP_MAP_Create_Kind (BB *bb, MEM_POOL *pool, OP_MAP_KIND kind)
void BB_OP_MAP_Extend_Map (BB_OP_MAP map, OP *op)

Variables

static BBidx_op_bb
static OP ** idx_ops
static UINT16 idx_ops_length
static MEM_POOL idx_op_pool
static HASH_TABLEfree_tables [MAX_BUCKETS_LOG2+1]
static HASH_ENTRYfree_entries
OP_MAP free_maps


Define Documentation

#define hash ( key,
len_log2   )     (((INTPTR)key >> 3) & ((1 << len_log2) - 1))

Definition at line 322 of file op_map.cxx.

Referenced by hash_table_entry(), and libc_name_p().

#define MAX_BUCKETS_LOG2   32

Definition at line 204 of file op_map.cxx.

Referenced by hash_table_create().

#define next_free_entry ( entry   )     ((entry)->next)

Definition at line 222 of file op_map.cxx.

Referenced by hash_entries_delete(), and hash_entry_create().

#define next_free_map ( map   )     ((map)->next_free)

Definition at line 392 of file op_map.cxx.

Referenced by _OP_MAP_Create(), and OP_MAP_Delete().

#define next_free_table ( tbl   )     ((tbl)->next_free)

Definition at line 219 of file op_map.cxx.

Referenced by hash_table_create(), and hash_table_delete().


Typedef Documentation

typedef union value VALUE


Function Documentation

OP_MAP _OP_MAP_Create ( OP_MAP_KIND  kind  ) 

BB_OP_MAP BB_OP_MAP_Create_Kind ( BB bb,
MEM_POOL pool,
OP_MAP_KIND  kind 
)

void BB_OP_MAP_Extend_Map ( BB_OP_MAP  map,
OP op 
)

static void create_idx_ops ( BB bb  )  [static]

static void finish_idx_ops ( void   )  [static]

Definition at line 110 of file op_map.cxx.

References MEM_POOL_Delete(), and MEM_POOL_Pop.

Referenced by OP_MAP_Finish().

static void hash_entries_delete ( HASH_ENTRY entries  )  [static]

Definition at line 302 of file op_map.cxx.

References last, hash_entry::next, and next_free_entry.

Referenced by hash_table_entry().

static HASH_ENTRY* hash_entry_create ( void   )  [static]

Definition at line 285 of file op_map.cxx.

References MEM_phase_nz_pool, next_free_entry, and TYPE_MEM_POOL_ALLOC.

Referenced by hash_table_entry().

static HASH_TABLE* hash_table_create ( UINT8  length_log2  )  [static]

static void hash_table_delete ( HASH_TABLE tbl  )  [static]

Definition at line 273 of file op_map.cxx.

References next_free_table.

Referenced by OP_MAP_Delete().

HASH_ENTRY* hash_table_entry ( HASH_TABLE tbl,
const OP key,
BOOL  create 
) [inline]

static void init_hash_tables ( void   )  [static]

Definition at line 225 of file op_map.cxx.

References BZERO, and NULL.

Referenced by OP_MAP_Init().

static void init_idx_ops ( void   )  [static]

Definition at line 102 of file op_map.cxx.

References MEM_POOL_Initialize, MEM_POOL_Push, NULL, and TRUE.

Referenced by OP_MAP_Init().

INT32 OP_MAP32_Get ( OP_MAP  map,
const OP op 
)

void OP_MAP32_Set ( OP_MAP  map,
OP op,
INT32  value 
)

INT64 OP_MAP64_Get ( OP_MAP  map,
const OP op 
)

void OP_MAP64_Set ( OP_MAP  map,
OP op,
INT64  value 
)

void OP_MAP_Delete ( OP_MAP  map  ) 

void OP_MAP_Finish ( void   ) 

Definition at line 403 of file op_map.cxx.

References finish_idx_ops().

Referenced by CG_PU_Finalize().

void* OP_MAP_Get ( OP_MAP  map,
const OP op 
)

OP* OP_MAP_Idx_Op ( BB bb,
UINT16  idx 
)

Definition at line 144 of file op_map.cxx.

References BB_next_op_map_idx, create_idx_ops(), idx_ops_length, Is_True, NULL, and OP_map_idx.

void OP_MAP_Init ( void   ) 

Definition at line 395 of file op_map.cxx.

References init_hash_tables(), init_idx_ops(), and NULL.

Referenced by CG_PU_Initialize().

void OP_MAP_Set ( OP_MAP  map,
OP op,
void value 
)


Variable Documentation

Definition at line 221 of file op_map.cxx.

Definition at line 391 of file op_map.cxx.

HASH_TABLE* free_tables[MAX_BUCKETS_LOG2+1] [static]

Definition at line 218 of file op_map.cxx.

Referenced by cvrt_proc_to_pdg(), cvrt_to_pdg(), main(), and PRINTMSG().

BB* idx_op_bb [static]

Definition at line 96 of file op_map.cxx.

Definition at line 99 of file op_map.cxx.

OP** idx_ops [static]

Definition at line 97 of file op_map.cxx.

UINT16 idx_ops_length [static]

Definition at line 98 of file op_map.cxx.

Referenced by create_idx_ops(), and OP_MAP_Idx_Op().


Generated on Wed Apr 8 14:28:21 2009 for Open64 by  doxygen 1.5.6