|
OpenADFortTk (basic)
|

Go to the source code of this file.
Classes | |
| struct | TmpVarInfo |
Defines | |
| #define | TYPE_ALLOC_N(type, count) TYPE_MEM_POOL_ALLOC_N(type, Malloc_Mem_Pool, count) |
| #define | TYPE_REALLOC_N(type, old_ptr, old_count, new_count) |
| #define | FREE(ptr) MEM_POOL_FREE(Malloc_Mem_Pool, ptr) |
| #define | MIN_NAME_SLOTS 8 |
| #define | MIN_NAME_BUF_SIZE 1024 |
| #define | MAX_NUMSTRING_SIZE 128 |
| #define | TMPVAR_ALLOC_INCREMENTS 32 |
Typedefs | |
| typedef struct TmpVarInfo | TMPVARINFO |
Functions | |
| static BOOL | Stab_Compare_Types (TY_IDX t1, TY_IDX t2, BOOL check_quals, BOOL check_pointed_quals, BOOL check_scalars, BOOL ptrs_as_scalars, BOOL assign_t2_to_t1) |
| void | Stab_initialize (void) |
| void | Stab_finalize (void) |
| void | Stab_Reset_Referenced_Flag (SYMTAB_IDX symtab) |
| bool | IsActivePU (ST *pu_st) |
| BOOL | Stab_Identical_Types (TY_IDX t1, TY_IDX t2, BOOL check_quals, BOOL check_scalars, BOOL ptrs_as_scalars) |
| BOOL | Stab_Assignment_Compatible_Types (TY_IDX t1, TY_IDX t2, BOOL check_quals, BOOL check_scalars, BOOL ptrs_as_scalars) |
| bool | WN2F_Can_Assign_Types (TY_IDX ty1, TY_IDX ty2) |
| BOOL | Stab_Is_Element_Type_Of_Array (TY_IDX atype, TY_IDX etype) |
| BOOL | Stab_Array_Has_Dynamic_Bounds (TY_IDX ty) |
| BOOL | Stab_Is_Assumed_Sized_Array (TY_IDX ty) |
| BOOL | Stab_Is_Equivalenced_Struct (TY_IDX ty) |
| TY_IDX | Stab_Get_Mload_Ty (TY_IDX base, STAB_OFFSET offset, STAB_OFFSET size) |
| TY_IDX | Stab_Array_Of (TY_IDX etype, mINT64 num_elts) |
| void | Stab_Free_Namebufs (void) |
| char * | Get_Name_Buf_Slot (UINT size) |
| const char * | Num2Str (INT64 number, const char *fmt) |
| const char * | Ptr_as_String (const void *ptr) |
| const char * | StrCat (const char *name1, const char *name2) |
| UINT64 | Get_Hash_Value_For_Name (const char *name) |
| STAB_OFFSET | Stab_Full_Split_Offset (const ST *split_out_st) |
| void | Stab_Free_Tmpvars (void) |
| UINT | Stab_Lock_Tmpvar (TY_IDX ty, void(*declare_tmpvar)(TY_IDX, UINT)) |
| void | Stab_Unlock_Tmpvar (UINT idx) |
Variables | |
| static char * | Name_Buf |
| static UINT | Name_Buf_Idx = 0 |
| static UINT | Name_Buf_Size = 0 |
| static char * | buffer_to_be_freed [MIN_NAME_SLOTS] |
| static UINT | next_delay_slot = 0 |
| static UINT | delay_count [MIN_NAME_SLOTS] = {0, 0, 0, 0, 0, 0, 0, 0} |
| static INT | next_to_be_freed = -1 |
| static TMPVARINFO * | TmpVar = NULL |
| static INT | Next_Tmpvar_Idx = 0 |
| static INT | Max_Tmpvar_Idx = -1 |
| #define FREE | ( | ptr | ) | MEM_POOL_FREE(Malloc_Mem_Pool, ptr) |
Definition at line 22 of file stab_attr.cpp.
Referenced by Get_Name_Buf_Slot(), Stab_Free_Namebufs(), and Stab_Free_Tmpvars().
| #define MAX_NUMSTRING_SIZE 128 |
Definition at line 483 of file stab_attr.cpp.
Referenced by Num2Str(), and Ptr_as_String().
| #define MIN_NAME_BUF_SIZE 1024 |
Definition at line 482 of file stab_attr.cpp.
Referenced by Get_Name_Buf_Slot().
| #define MIN_NAME_SLOTS 8 |
Definition at line 481 of file stab_attr.cpp.
Referenced by Get_Name_Buf_Slot(), and Stab_Free_Namebufs().
| #define TMPVAR_ALLOC_INCREMENTS 32 |
Definition at line 701 of file stab_attr.cpp.
Referenced by Stab_Lock_Tmpvar().
| #define TYPE_ALLOC_N | ( | type, | |
| count | |||
| ) | TYPE_MEM_POOL_ALLOC_N(type, Malloc_Mem_Pool, count) |
Definition at line 15 of file stab_attr.cpp.
Referenced by Get_Name_Buf_Slot(), and Stab_Lock_Tmpvar().
| #define TYPE_REALLOC_N | ( | type, | |
| old_ptr, | |||
| old_count, | |||
| new_count | |||
| ) |
TYPE_MEM_POOL_REALLOC_N(type, Malloc_Mem_Pool, old_ptr,\
old_count, new_count)
Definition at line 18 of file stab_attr.cpp.
Referenced by Stab_Lock_Tmpvar().
| typedef struct TmpVarInfo TMPVARINFO |
| UINT64 Get_Hash_Value_For_Name | ( | const char * | name | ) |
Definition at line 647 of file stab_attr.cpp.
| char* Get_Name_Buf_Slot | ( | UINT | size | ) |
Definition at line 522 of file stab_attr.cpp.
References buffer_to_be_freed, delay_count, FREE, MIN_NAME_BUF_SIZE, MIN_NAME_SLOTS, Name_Buf, Name_Buf_Idx, Name_Buf_Size, next_delay_slot, next_to_be_freed, and TYPE_ALLOC_N.
Referenced by Num2Str(), Ptr_as_String(), and StrCat().
| bool IsActivePU | ( | ST * | pu_st | ) |
Definition at line 85 of file stab_attr.cpp.
Referenced by xaif2whirl::TranslateCFG(), and whirl2xaif::Whirl2Xaif::translatePU().
| const char* Num2Str | ( | INT64 | number, |
| const char * | fmt | ||
| ) |
Definition at line 582 of file stab_attr.cpp.
References Get_Name_Buf_Slot(), and MAX_NUMSTRING_SIZE.
Referenced by xaif2whirl::DumpDotGraph_GetNodeName(), whirl2xaif::GetIDsForStmtsInBB(), whirl2xaif::TY2F_array(), whirl2xaif::TY2F_array_for_pointer(), whirl2xaif::TY2F_Equivalence(), whirl2xaif::TY2F_Equivalence_FldList(), whirl2xaif::TY2F_scalar(), xlate_IO_ITEM_control(), xlate_IO_ITEM_format(), and whirl2xaif::xlate_SymRef().

| const char* Ptr_as_String | ( | const void * | ptr | ) |
Definition at line 592 of file stab_attr.cpp.
References Get_Name_Buf_Slot(), and MAX_NUMSTRING_SIZE.

| BOOL Stab_Array_Has_Dynamic_Bounds | ( | TY_IDX | ty | ) |
Definition at line 292 of file stab_attr.cpp.
| TY_IDX Stab_Array_Of | ( | TY_IDX | etype, |
| mINT64 | num_elts | ||
| ) |
Definition at line 426 of file stab_attr.cpp.
References SexpTags::TY.
Referenced by whirl2xaif::TY2F_Equivalence_List(), WN_GetExprType(), WN_Tree_Type(), whirl2xaif::xlate_LDID(), and whirl2xaif::xlate_STDecl_VAR().
| BOOL Stab_Assignment_Compatible_Types | ( | TY_IDX | t1, |
| TY_IDX | t2, | ||
| BOOL | check_quals, | ||
| BOOL | check_scalars, | ||
| BOOL | ptrs_as_scalars | ||
| ) |
Definition at line 120 of file stab_attr.cpp.
References Stab_Compare_Types().
Referenced by Stab_Is_Element_Type_Of_Array().

| static BOOL Stab_Compare_Types | ( | TY_IDX | t1, |
| TY_IDX | t2, | ||
| BOOL | check_quals, | ||
| BOOL | check_pointed_quals, | ||
| BOOL | check_scalars, | ||
| BOOL | ptrs_as_scalars, | ||
| BOOL | assign_t2_to_t1 | ||
| ) | [static] |
Definition at line 142 of file stab_attr.cpp.
References Func_Return_Type(), Stab_Assign_Compatible_Pointer_Quals(), Stab_Identical_Quals(), TY_Is_Array(), TY_Is_Array_Of_Chars(), TY_Is_Function(), TY_Is_Pointer(), TY_Is_Pointer_Or_Scalar(), TY_Is_Scalar(), TY_Is_String(), and TY_Is_Structured().
Referenced by Stab_Assignment_Compatible_Types(), and Stab_Identical_Types().

| void Stab_finalize | ( | void | ) |
Definition at line 49 of file stab_attr.cpp.
| void Stab_Free_Namebufs | ( | void | ) |
Definition at line 496 of file stab_attr.cpp.
References buffer_to_be_freed, delay_count, FREE, MIN_NAME_SLOTS, Name_Buf, Name_Buf_Idx, Name_Buf_Size, next_delay_slot, and next_to_be_freed.
Referenced by whirl2xaif::Whirl2Xaif::translateWNPU().
| void Stab_Free_Tmpvars | ( | void | ) |
Definition at line 708 of file stab_attr.cpp.
References FREE, Max_Tmpvar_Idx, and Next_Tmpvar_Idx.
Referenced by whirl2xaif::Whirl2Xaif::translateWNPU().
| STAB_OFFSET Stab_Full_Split_Offset | ( | const ST * | split_out_st | ) |
Definition at line 669 of file stab_attr.cpp.
| TY_IDX Stab_Get_Mload_Ty | ( | TY_IDX | base, |
| STAB_OFFSET | offset, | ||
| STAB_OFFSET | size | ||
| ) |
Definition at line 354 of file stab_attr.cpp.
References Stab_Get_Mload_Ty(), TY_Is_Structured(), and TY_Is_Union().
Referenced by Stab_Get_Mload_Ty(), WN_GetExprType(), and WN_Tree_Type().

| BOOL Stab_Identical_Types | ( | TY_IDX | t1, |
| TY_IDX | t2, | ||
| BOOL | check_quals, | ||
| BOOL | check_scalars, | ||
| BOOL | ptrs_as_scalars | ||
| ) |
Definition at line 110 of file stab_attr.cpp.
References Stab_Compare_Types().
Referenced by whirl2xaif::Construct_Fld_Path(), whirl2xaif::Select_Best_Fld_Path(), Stab_Lock_Tmpvar(), whirl2xaif::TY_Lookup_FLD(), xaif2whirl::TY_Lookup_FLD(), and WN2F_Can_Assign_Types().

| void Stab_initialize | ( | void | ) |
Definition at line 41 of file stab_attr.cpp.
| BOOL Stab_Is_Assumed_Sized_Array | ( | TY_IDX | ty | ) |
Definition at line 309 of file stab_attr.cpp.
References TY_Is_Array().

| BOOL Stab_Is_Element_Type_Of_Array | ( | TY_IDX | atype, |
| TY_IDX | etype | ||
| ) |
Definition at line 277 of file stab_attr.cpp.
References Stab_Assignment_Compatible_Types(), Stab_Is_Element_Type_Of_Array(), and TY_Is_Array().
Referenced by Stab_Is_Element_Type_Of_Array().

| BOOL Stab_Is_Equivalenced_Struct | ( | TY_IDX | ty | ) |
Definition at line 339 of file stab_attr.cpp.
| UINT Stab_Lock_Tmpvar | ( | TY_IDX | ty, |
| void(*)(TY_IDX, UINT) | declare_tmpvar | ||
| ) |
Definition at line 723 of file stab_attr.cpp.
References TmpVarInfo::locked, Max_Tmpvar_Idx, Next_Tmpvar_Idx, Stab_Identical_Types(), TMPVAR_ALLOC_INCREMENTS, TmpVarInfo::ty, TYPE_ALLOC_N, and TYPE_REALLOC_N.
Referenced by whirl2xaif::TY2F_Equivalence_List().

| void Stab_Reset_Referenced_Flag | ( | SYMTAB_IDX | symtab | ) |
Definition at line 62 of file stab_attr.cpp.
References SexpTags::ST.
| void Stab_Unlock_Tmpvar | ( | UINT | idx | ) |
Definition at line 769 of file stab_attr.cpp.
References TmpVarInfo::locked, and Next_Tmpvar_Idx.
| const char* StrCat | ( | const char * | name1, |
| const char * | name2 | ||
| ) |
Definition at line 616 of file stab_attr.cpp.
References Get_Name_Buf_Slot().
Referenced by StrCat(), whirl2xaif::TY2F_Equivalence_FldList(), whirl2xaif::TY2F_scalar(), and whirl2xaif::TY2F_Translate_Fld_Path().

| bool WN2F_Can_Assign_Types | ( | TY_IDX | ty1, |
| TY_IDX | ty2 | ||
| ) |
Definition at line 130 of file stab_attr.cpp.
References Stab_Identical_Types(), and TY_Is_Array().
Referenced by Open64IRInterface::findAllMemRefsAndMapToMemRefExprs(), fortTkSupport::ScalarizedRef::isRefScalar(), IsScalarRef(), and whirl2xaif::xlate_MemRef().

char* buffer_to_be_freed[MIN_NAME_SLOTS] [static] |
Definition at line 489 of file stab_attr.cpp.
Referenced by Get_Name_Buf_Slot(), and Stab_Free_Namebufs().
UINT delay_count[MIN_NAME_SLOTS] = {0, 0, 0, 0, 0, 0, 0, 0} [static] |
Definition at line 491 of file stab_attr.cpp.
Referenced by Get_Name_Buf_Slot(), and Stab_Free_Namebufs().
INT Max_Tmpvar_Idx = -1 [static] |
Definition at line 704 of file stab_attr.cpp.
Referenced by Stab_Free_Tmpvars(), and Stab_Lock_Tmpvar().
char* Name_Buf [static] |
Definition at line 485 of file stab_attr.cpp.
Referenced by Get_Name_Buf_Slot(), and Stab_Free_Namebufs().
UINT Name_Buf_Idx = 0 [static] |
Definition at line 486 of file stab_attr.cpp.
Referenced by Get_Name_Buf_Slot(), and Stab_Free_Namebufs().
UINT Name_Buf_Size = 0 [static] |
Definition at line 487 of file stab_attr.cpp.
Referenced by Get_Name_Buf_Slot(), and Stab_Free_Namebufs().
UINT next_delay_slot = 0 [static] |
Definition at line 490 of file stab_attr.cpp.
Referenced by Get_Name_Buf_Slot(), and Stab_Free_Namebufs().
INT Next_Tmpvar_Idx = 0 [static] |
Definition at line 703 of file stab_attr.cpp.
Referenced by Stab_Free_Tmpvars(), Stab_Lock_Tmpvar(), and Stab_Unlock_Tmpvar().
INT next_to_be_freed = -1 [static] |
Definition at line 492 of file stab_attr.cpp.
Referenced by Get_Name_Buf_Slot(), and Stab_Free_Namebufs().
TMPVARINFO* TmpVar = NULL [static] |
Definition at line 702 of file stab_attr.cpp.