Open64 (mfef90, whirl2f, and IR tools)
TAG: version-openad; SVN changeset: 916
|
#include <assert.h>
#include <symtab.h>
#include <symtab_utils.h>
#include <upc_symtab_utils.h>
#include <wintrinsic.h>
#include "wn.h"
Go to the source code of this file.
#define LAST_SCALAR_SHARED_TYPE MTYPE_F16 |
Referenced by Create_Special_Shared_Global_Symbols().
UINT Adjust_Field_Offset | ( | TY & | struct_ty, |
UINT | field_id | ||
) |
Definition at line 431 of file upc_symtab_utils.cxx.
References Adjusted_Type_Size(), TY::Fld(), FLD_type(), idx, Is_True, KIND_STRUCT, Make_fld_iter(), TY_align(), TY_kind(), TY_To_Sptr_Idx(), and Type_Is_Shared_Ptr().
Referenced by Adjusted_Type_Size(), Upc_Lower_SymbolTable(), WN_Create_Shared_Load(), and WN_Create_Shared_Store().
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().
void Adjust_Type_Size | ( | TY * | ty | ) |
Definition at line 284 of file upc_symtab_utils.cxx.
References Adjusted_Type_Size(), SEGMENTED_ARRAY< T, block_size >::end(), TY::Fld(), FLD_last_field(), FLD_ofst(), Fld_Table, FLD_type(), KIND_STRUCT, Make_fld_iter(), Set_TY_size(), and TY_kind().
Referenced by adjust_type_size_op< T >::operator()().
UINT Adjusted_Type_Size | ( | TY_IDX | idx, |
unsigned int | pshared, | ||
unsigned int | shared | ||
) |
Definition at line 217 of file upc_symtab_utils.cxx.
References Adjust_Field_Offset(), Adjusted_Type_Size(), SEGMENTED_ARRAY< T, block_size >::end(), FLD_last_field(), Fld_Table, FLD_type(), KIND_ARRAY, KIND_POINTER, KIND_SCALAR, KIND_STRUCT, KIND_VOID, Make_fld_iter(), pshared_ptr_idx, result, shared_ptr_idx, TRUE, TY_etype(), TY_fld(), TY_is_pshared(), TY_is_shared(), TY_kind(), TY_pointed(), TY_size(), TY_To_Sptr_Idx(), and Type_Is_Shared_Ptr().
Referenced by Adjust_Field_Offset(), Adjust_Type_Size(), Adjusted_Type_Size(), and Get_Type_Inner_Size().
static void Change_Type_To_Shared | ( | ST * | st | ) | [static] |
Definition at line 348 of file upc_symtab_utils.cxx.
References CLASS_FUNC, CLASS_VAR, For_all_entries(), idx, PU_lexical_level(), Scope_tab, Set_ST_type(), Set_TYLIST_type(), ST_class(), ST_pu_type(), ST_type(), TY_To_Sptr_Idx(), TY_tylist(), Tylist_Table, and Type_Is_Shared_Ptr().
Referenced by Upc_Lower_SymbolTable().
void Create_Special_Shared_Global_Symbols | ( | ) |
Definition at line 605 of file upc_symtab_utils.cxx.
References KIND_SCALAR, LAST_SCALAR_SHARED_TYPE, MTYPE_byte_size, MTYPE_I1, MTYPE_name, MTYPE_To_Shared_TY, MTYPE_To_TY, New_TY(), Save_Str2(), Set_TY_align(), Set_TY_is_shared(), TY_align(), and TY_Init().
static void Fill_Structure_Type | ( | TY & | ty, |
UINT | size | ||
) | [static] |
Definition at line 572 of file upc_symtab_utils.cxx.
References ARB_Init(), FLD_Init(), KIND_ARRAY, MTYPE_I1, MTYPE_M, MTYPE_To_TY, New_ARB(), New_FLD(), New_TY(), Save_Str(), Set_ARB_const_lbnd(), Set_ARB_const_stride(), Set_ARB_const_ubnd(), Set_ARB_dimension(), Set_ARB_first_dimen(), Set_ARB_last_dimen(), Set_ARB_lbnd_val(), Set_ARB_stride_val(), Set_ARB_ubnd_val(), Set_FLD_last_field(), Set_TY_align(), Set_TY_arb(), Set_TY_etype(), Set_TY_fld(), TY_align(), TY_etype(), and TY_Init().
Referenced by Initialize_Upc_Types().
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().
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().
TY_IDX Get_Inner_Array_Type | ( | TY_IDX | idx | ) |
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().
UINT Get_Type_Block_Size | ( | TY_IDX | idx | ) |
Definition at line 141 of file upc_symtab_utils.cxx.
References Get_Inner_Array_Type(), Get_Type_Block_Size(), Is_True, KIND_ARRAY, KIND_POINTER, KIND_SCALAR, KIND_STRUCT, KIND_VOID, result, TY_block_size(), TY_is_shared(), TY_kind(), and TY_pointed().
Referenced by Get_Type_Block_Size(), Need_StoP_Cvt(), TY_To_Sptr_Idx(), WN_Create_Shared_Ptr_Diff(), and WN_get_tld_type().
UINT64 Get_Type_Inner_Size | ( | TY_IDX | idx | ) |
Definition at line 177 of file upc_symtab_utils.cxx.
References Adjusted_Type_Size(), Get_Inner_Array_Type(), Is_True, KIND_ARRAY, KIND_POINTER, KIND_SCALAR, KIND_STRUCT, TY_etype(), TY_kind(), TY_pointed(), and TY_size().
Referenced by Need_StoP_Cvt(), Types_Are_Equiv(), and WN_Create_Shared_Ptr_Diff().
void Initialize_Upc_Metadata | ( | ) |
Definition at line 208 of file upc_symtab_utils.cxx.
References FOREACH_SYMBOL, GLOBAL_SYMTAB, Save_Upc_Rts_Calls(), and ST_name().
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 691 of file upc_symtab_utils.cxx.
References Fill_Structure_Type(), Integer_type, KIND_SCALAR, KIND_STRUCT, MTYPE_I8, MTYPE_M, MTYPE_To_TY, New_TY(), Pointer_type, pshared_ptr_idx, Save_Str(), Set_TY_align(), shared_ptr_idx, Size_To_Mtype(), TY_align(), TY_Init(), TY_size(), upc_hsync_mem_ty, and upc_hsync_reg_ty.
void Initialize_Upc_Vars | ( | ) |
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().
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().
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().
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().
BOOL TY_is_pshared | ( | TY_IDX | idx | ) |
Definition at line 780 of file upc_symtab_utils.cxx.
References Is_True, KIND_ARRAY, KIND_POINTER, KIND_SCALAR, KIND_STRUCT, MTYPE_V, TY_block_size(), TY_etype(), TY_is_pshared(), TY_is_shared(), TY_kind(), and TY_mtype().
Referenced by Adjusted_Type_Size(), TY_is_pshared(), and WN_Create_Shared_Ptr_Diff().
TY_IDX TY_To_Sptr_Idx | ( | TY_IDX | idx | ) |
Definition at line 799 of file upc_symtab_utils.cxx.
References Get_Type_Block_Size(), idx, KIND_VOID, pshared_ptr_idx, shared_ptr_idx, TRUE, TY_kind(), TY_pointed(), and Type_Is_Shared_Ptr().
Referenced by Adjust_Field_Offset(), Adjusted_Type_Size(), Change_Type_To_Shared(), change_type_op< T >::operator()(), Spill_And_Take_Address(), TY2C_pointer(), TY2C_scalar(), Upc_Lower_SymbolTable(), WN_Convert_Shared_To_Local(), WN_Create_PtrEq_Test(), WN_Create_Shared_Load(), WN_Create_Shared_Store(), and WN_SetNull_Sptr().
BOOL Type_Is_Shared_Ptr | ( | TY_IDX | idx, |
BOOL | real_ptr | ||
) |
Definition at line 770 of file upc_symtab_utils.cxx.
References Get_Inner_Array_Type(), KIND_ARRAY, KIND_POINTER, TY_is_shared(), TY_kind(), and TY_pointed().
Referenced by Adjust_Field_Offset(), Adjusted_Type_Size(), Change_Type_To_Shared(), SIMPNODE_SimplifyExp2_h(), Spill_And_Take_Address(), TY2C_pointer(), TY2C_scalar(), TY_To_Sptr_Idx(), Upc_Lower_SymbolTable(), WN_Create_PtrEq_Test(), WN_Create_Shared_Load(), WN_Create_Shared_Store(), WN_Simplify_Rebuild_Expr_Tree(), and WN_Type_Is_Shared_Ptr().
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().
void Upc_Lower_SymbolTable | ( | ) |
Definition at line 383 of file upc_symtab_utils.cxx.
References Adjust_Field_Offset(), Change_Type_To_Shared(), SEGMENTED_ARRAY< T, block_size >::end(), TY::Fld(), FLD_last_field(), Fld_Table, FLD_type(), FOREACH_SYMBOL, GLOBAL_SYMTAB, idx, Is_True, KIND_STRUCT, Make_fld_iter(), Make_ty_iter(), MTYPE_F8, MTYPE_To_TY, Set_FLD_ofst(), Set_FLD_type(), shared_ptr_idx, TY_kind(), Ty_tab, Ty_Table, TY_To_Sptr_Idx(), and Type_Is_Shared_Ptr().
Referenced by main().
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.
void Verify_Upc_Metadata | ( | ) |
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().
char* hsync_mem_name |
Definition at line 11 of file upc_symtab_utils.cxx.
char* hsync_reg_name |
Definition at line 10 of file upc_symtab_utils.cxx.
Definition at line 37 of file upc_symtab_utils.cxx.
Definition at line 14 of file upc_symtab_utils.cxx.
Referenced by Adjusted_Type_Size(), Find_Upc_Vars(), Fix_Intrinsic_Return_Type(), Initialize_Upc_Types(), is_upcr_ptr(), ST2C_Get_Common_Ty2c_List(), TY2C_scalar(), TY_To_Sptr_Idx(), WN_Create_PtrEq_Test(), WN_Create_Shared_Load(), WN_Create_Shared_Ptr_Arithmetic(), WN_Create_Shared_Ptr_Diff(), WN_Create_Shared_Store(), WN_Create_StoP_Cvt(), WN_get_tld_type(), WN_Operator_To_Intrinsic(), and WN_SetNull_Sptr().
TY_IDX shared_ptr_idx = 0 |
Definition at line 13 of file upc_symtab_utils.cxx.
Referenced by Adjusted_Type_Size(), Find_Upc_Vars(), Fix_Intrinsic_Return_Type(), Initialize_Upc_Types(), is_upcr_ptr(), ST2C_Get_Common_Ty2c_List(), TY2C_scalar(), TY_To_Sptr_Idx(), Upc_Lower_SymbolTable(), Verify_Upc_Metadata(), WN_Convert_Shared_To_Local(), WN_Create_Shared_Load(), WN_Create_Shared_Ptr_Arithmetic(), WN_Create_Shared_Ptr_Diff(), WN_Create_StoP_Cvt(), WN_get_tld_type(), WN_Operator_To_Intrinsic(), and WN_SetNull_Sptr().
char* shared_ptr_name = "shared_ptr_struct" |
Definition at line 9 of file upc_symtab_utils.cxx.
ST* upc_adddisp_st = 0 |
Definition at line 28 of file upc_symtab_utils.cxx.
ST* upc_forall_control_st = 0 |
Definition at line 35 of file upc_symtab_utils.cxx.
ST* upc_getshared_st = 0 |
Definition at line 29 of file upc_symtab_utils.cxx.
Definition at line 16 of file upc_symtab_utils.cxx.
Referenced by Initialize_Upc_Types(), WN_Create_Shared_Load(), and WN_Create_Shared_Store().
Definition at line 15 of file upc_symtab_utils.cxx.
Referenced by Initialize_Upc_Types(), WN_Create_Shared_Load(), and WN_Create_Shared_Store().
char* upc_library_names[] [static] |
{ "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().
ST* upc_memcpy_st = 0 |
Definition at line 27 of file upc_symtab_utils.cxx.
ST* upc_memget_st = 0 |
Definition at line 25 of file upc_symtab_utils.cxx.
ST* upc_memput_st = 0 |
Definition at line 26 of file upc_symtab_utils.cxx.
ST* upc_mythread_st = 0 |
Definition at line 24 of file upc_symtab_utils.cxx.
ST* upc_nulleq_st = 0 |
Definition at line 31 of file upc_symtab_utils.cxx.
ST* upc_nullneq_st = 0 |
Definition at line 32 of file upc_symtab_utils.cxx.
ST* upc_phreset_st = 0 |
Definition at line 30 of file upc_symtab_utils.cxx.
ST* upc_ptradd_st = 0 |
Definition at line 19 of file upc_symtab_utils.cxx.
ST* upc_ptrdiff_st = 0 |
Definition at line 20 of file upc_symtab_utils.cxx.
ST* upc_ptreqtest_st = 0 |
Definition at line 33 of file upc_symtab_utils.cxx.
ST* upc_ptrget_st = 0 |
Definition at line 21 of file upc_symtab_utils.cxx.
ST* upc_ptrneqtest_st = 0 |
Definition at line 34 of file upc_symtab_utils.cxx.
ST* upc_ptrput_st = 0 |
Definition at line 22 of file upc_symtab_utils.cxx.
ST* upc_threadof_st = 0 |
Definition at line 23 of file upc_symtab_utils.cxx.