Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
upc_symtab_utils.cxx File Reference
#include <assert.h>
#include <symtab.h>
#include <symtab_utils.h>
#include <upc_symtab_utils.h>
#include <wintrinsic.h>
#include "wn.h"
Include dependency graph for upc_symtab_utils.cxx:

Go to the source code of this file.

Classes

struct  adjust_type_size_op< T >
struct  change_type_op< T >
class  TY_shared

Defines

#define LAST_SCALAR_SHARED_TYPE   MTYPE_F16

Functions

TY_IDX Get_Field_Type (TY_IDX struct_type, UINT field_id)
bool is_upcr_ptr (TY_IDX ty)
void Save_Upc_Rts_Calls (char *name, ST *st)
void Upc_Translate_Name (char *from, char **to)
TY_IDX Get_Inner_Array_Type (TY_IDX idx)
UINT Get_Type_Block_Size (TY_IDX idx)
UINT64 Get_Type_Inner_Size (TY_IDX idx)
void Initialize_Upc_Metadata ()
UINT Adjusted_Type_Size (TY_IDX idx, unsigned int pshared, unsigned int shared)
void Adjust_Type_Size (TY *ty)
static void Change_Type_To_Shared (ST *st)
void Upc_Lower_SymbolTable ()
UINT Adjust_Field_Offset (TY &struct_ty, UINT field_id)
UINT Adjust_Field_Offset (TY_IDX struct_ty, UINT field_id)
void Verify_Upc_Metadata ()
static TYPE_ID Size_To_Mtype (UINT32 size)
static void Fill_Structure_Type (TY &ty, UINT size)
void Create_Special_Shared_Global_Symbols ()
void Find_Upc_Vars ()
BOOL Use_32_Bit (const char *filename)
void Initialize_Upc_Vars ()
void Initialize_Upc_Types (char *sptr_name, UINT sptr_size, char *psptr_name, UINT psptr_size, char *hreg_name, UINT hreg_size, char *hmem_name, UINT hmem_size)
BOOL WN_Type_Is_Shared_Ptr (const WN *wn, BOOL real_ptr)
BOOL Type_Is_Shared_Ptr (TY_IDX idx, BOOL real_ptr)
BOOL TY_is_pshared (TY_IDX idx)
TY_IDX TY_To_Sptr_Idx (TY_IDX idx)
TY_IDX Fix_Intrinsic_Return_Type (INTRINSIC op)
BOOL Need_StoP_Cvt (TY_IDX src_idx, TY_IDX dest_idx, INTRINSIC *iop)
BOOL Types_Are_Equiv (TY_IDX idx1, TY_IDX idx2)

Variables

char * shared_ptr_name = "shared_ptr_struct"
char * hsync_reg_name
char * hsync_mem_name
TY_IDX shared_ptr_idx = 0
TY_IDX pshared_ptr_idx = 0
TY_IDX upc_hsync_reg_ty = 0
TY_IDX upc_hsync_mem_ty = 0
STupc_ptradd_st = 0
STupc_ptrdiff_st = 0
STupc_ptrget_st = 0
STupc_ptrput_st = 0
STupc_threadof_st = 0
STupc_mythread_st = 0
STupc_memget_st = 0
STupc_memput_st = 0
STupc_memcpy_st = 0
STupc_adddisp_st = 0
STupc_getshared_st = 0
STupc_phreset_st = 0
STupc_nulleq_st = 0
STupc_nullneq_st = 0
STupc_ptreqtest_st = 0
STupc_ptrneqtest_st = 0
STupc_forall_control_st = 0
TYPE_ID MTYPE_TO_Shared_TY_array [MTYPE_LAST+1]
static char * upc_library_names []

Define Documentation


Function Documentation

UINT Adjust_Field_Offset ( TY_IDX  struct_ty,
UINT  field_id 
)

Definition at line 470 of file upc_symtab_utils.cxx.

References Adjusted_Type_Size(), FLD_last_field(), FLD_type(), Is_True, KIND_STRUCT, Make_fld_iter(), TY_align(), TY_fld(), TY_kind(), TY_To_Sptr_Idx(), and Type_Is_Shared_Ptr().

Here is the call graph for this function:

void Find_Upc_Vars ( )

Definition at line 644 of file upc_symtab_utils.cxx.

References For_all_until(), FOREACH_SYMBOL, GLOBAL_SYMTAB, Is_True, NULL, pshared_ptr_idx, s, shared_ptr_idx, ST_name(), and Ty_Table.

Referenced by main().

Here is the call graph for this function:

TY_IDX Fix_Intrinsic_Return_Type ( INTRINSIC  op)

Definition at line 812 of file upc_symtab_utils.cxx.

References pshared_ptr_idx, and shared_ptr_idx.

TY_IDX Get_Field_Type ( TY_IDX  struct_type,
UINT  field_id 
)

Definition at line 61 of file upc_symtab_utils.cxx.

References FLD_get_to_field(), FLD_type(), FLD_HANDLE::Is_Null(), Is_True, KIND_STRUCT, and TY_kind().

Here is the call graph for this function:

Definition at line 130 of file upc_symtab_utils.cxx.

References Is_True, KIND_ARRAY, TY_etype(), and TY_kind().

Referenced by Get_Access_Consistency(), Get_Type_Block_Size(), Get_Type_Inner_Size(), Type_Is_Shared_Ptr(), and Types_Are_Equiv().

Here is the call graph for this function:

Definition at line 208 of file upc_symtab_utils.cxx.

References FOREACH_SYMBOL, GLOBAL_SYMTAB, Save_Upc_Rts_Calls(), and ST_name().

Here is the call graph for this function:

void Initialize_Upc_Types ( char *  sptr_name,
UINT  sptr_size,
char *  psptr_name,
UINT  psptr_size,
char *  hreg_name,
UINT  hreg_size,
char *  hmem_name,
UINT  hmem_size 
)

Definition at line 681 of file upc_symtab_utils.cxx.

References CLASS_VAR, EXPORT_PREEMPTIBLE, GLOBAL_SYMTAB, idx, MTYPE_I4, MTYPE_To_TY, New_ST(), Save_Str(), SCLASS_COMMON, and ST_Init().

Here is the call graph for this function:

bool is_upcr_ptr ( TY_IDX  ty)

Definition at line 71 of file upc_symtab_utils.cxx.

References pshared_ptr_idx, shared_ptr_idx, and TY_name().

Referenced by FLD_get_to_field(), and TY2C_Output_Struct_Type().

Here is the call graph for this function:

BOOL Need_StoP_Cvt ( TY_IDX  src_idx,
TY_IDX  dest_idx,
INTRINSIC *  iop 
)

Definition at line 833 of file upc_symtab_utils.cxx.

References FALSE, Get_Type_Block_Size(), Get_Type_Inner_Size(), Is_True, KIND_ARRAY, KIND_POINTER, KIND_SCALAR, result, TRUE, TY_is_shared(), TY_kind(), and TY_pointed().

Here is the call graph for this function:

void Save_Upc_Rts_Calls ( char *  name,
ST st 
)

Definition at line 83 of file upc_symtab_utils.cxx.

Referenced by Initialize_Upc_Metadata().

static TYPE_ID Size_To_Mtype ( UINT32  size) [static]

Definition at line 554 of file upc_symtab_utils.cxx.

References MTYPE_I1, MTYPE_I2, MTYPE_I4, MTYPE_I8, MTYPE_M, MTYPE_To_TY, and TY_size().

Referenced by Initialize_Upc_Types().

Here is the call graph for this function:

BOOL Types_Are_Equiv ( TY_IDX  idx1,
TY_IDX  idx2 
)

Definition at line 907 of file upc_symtab_utils.cxx.

References Get_Inner_Array_Type(), Get_Type_Inner_Size(), KIND_ARRAY, KIND_POINTER, TRUE, TY_kind(), and TY_pointed().

Here is the call graph for this function:

void Upc_Translate_Name ( char *  from,
char **  to 
)

Definition at line 118 of file upc_symtab_utils.cxx.

References upc_library_names.

BOOL Use_32_Bit ( const char *  filename)

Definition at line 663 of file upc_symtab_utils.cxx.

References FALSE, MAX_LINE_LEN_UPC, NULL, size, and TRUE.

Definition at line 527 of file upc_symtab_utils.cxx.

References Is_True, and shared_ptr_idx.

BOOL WN_Type_Is_Shared_Ptr ( const WN wn,
BOOL  real_ptr 
)

Definition at line 760 of file upc_symtab_utils.cxx.

References OPR_CONST, Type_Is_Shared_Ptr(), WN_operator(), and WN_ty().

Here is the call graph for this function:


Variable Documentation

Definition at line 11 of file upc_symtab_utils.cxx.

Definition at line 10 of file upc_symtab_utils.cxx.

char* shared_ptr_name = "shared_ptr_struct"

Definition at line 9 of file upc_symtab_utils.cxx.

Definition at line 28 of file upc_symtab_utils.cxx.

Definition at line 35 of file upc_symtab_utils.cxx.

Definition at line 29 of file upc_symtab_utils.cxx.

char* upc_library_names[] [static]
Initial value:
 {
  "upc_global_alloc",                "UPCR_GLOBAL_ALLOC",
  "upc_all_alloc",                   "UPCR_ALL_ALLOC",
  "upc_local_alloc",                 "UPCR_LOCAL_ALLOC",
  "upc_free",                        "UPCR_FREE",
  "upc_threadof",                    "UPCR_THREADOF_SHARED",
  "upc_phaseof",                     "UPCR_PHASEOF_SHARED",
  "upc_addrfield",                   "UPCR_ADDRFIELD_SHARED",
  "upc_global_lock_alloc",           "UPCR_GLOBAL_LOCK_ALLOC",
  "upc_all_lock_alloc",              "UPCR_ALL_LOCK_ALLOC",
  "upc_lock",                        "UPCR_LOCK",
  "upc_lock_attempt",                "UPCR_LOCK_ATTEMPT",
  "upc_unlock",                      "UPCR_UNLOCK",
  "upc_memcpy",                      "UPCR_MEMCPY",
  "upc_memget",                      "UPCR_MEMGET",
  "upc_memput",                      "UPCR_MEMPUT",
  "upc_memset",                      "UPCR_MEMSET",
  "upc_global_exit",                 "upcr_global_exit"}

Definition at line 41 of file upc_symtab_utils.cxx.

Referenced by Upc_Translate_Name().

Definition at line 27 of file upc_symtab_utils.cxx.

Definition at line 25 of file upc_symtab_utils.cxx.

Definition at line 26 of file upc_symtab_utils.cxx.

Definition at line 24 of file upc_symtab_utils.cxx.

Definition at line 31 of file upc_symtab_utils.cxx.

Definition at line 32 of file upc_symtab_utils.cxx.

Definition at line 30 of file upc_symtab_utils.cxx.

Definition at line 19 of file upc_symtab_utils.cxx.

Definition at line 20 of file upc_symtab_utils.cxx.

Definition at line 33 of file upc_symtab_utils.cxx.

Definition at line 21 of file upc_symtab_utils.cxx.

Definition at line 34 of file upc_symtab_utils.cxx.

Definition at line 22 of file upc_symtab_utils.cxx.

Definition at line 23 of file upc_symtab_utils.cxx.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines