Open64 (mfef90, whirl2f, and IR tools)
TAG: version-openad; SVN changeset: 916
|
Go to the source code of this file.
#define IPA_WN_MAP32_Create | ( | maptab, | |
pool | |||
) | WN_MAP_Do_Create((maptab), (pool), WN_MAP_KIND_INT32) |
#define IPA_WN_MAP64_Create | ( | maptab, | |
pool | |||
) | WN_MAP_Do_Create((maptab), (pool), WN_MAP_KIND_INT64) |
#define IPA_WN_MAP_Create | ( | maptab, | |
pool | |||
) | WN_MAP_Do_Create((maptab), (pool), WN_MAP_KIND_VOIDP) |
Definition at line 348 of file wn_map.h.
Referenced by IPO_CLONE::New_Clone().
#define IPA_WN_MAP_Size | ( | maptab, | |
wn_map, | |||
category | |||
) | (maptab)->_map_size[(category)][(wn_map)] |
#define WN_MAP32_Create | ( | pool | ) | WN_MAP_Do_Create(Current_Map_Tab, (pool), WN_MAP_KIND_INT32) |
Definition at line 343 of file wn_map.h.
Referenced by Anl_Init_Map(), and Write_PU_Info().
#define WN_MAP32_Get | ( | wn_map, | |
wn | |||
) | IPA_WN_MAP32_Get(Current_Map_Tab, (wn_map), (wn)) |
Definition at line 416 of file wn_map.h.
Referenced by RBI::Get_WN_Prop(), ir_b_write_tree(), ir_put_wn(), Prompf_Assign_Ids_Traverse(), RBI::Rgn_WN_Tag(), WN2C_End_Prompf_Construct(), WN2C_Prompf_Construct_End(), WN2C_Prompf_Construct_Start(), WN2C_Start_Prompf_Construct(), WN2C_Translate_Stmt_Sequence(), WN2F_block(), WN2F_End_Prompf_Construct(), WN2F_func_entry(), WN2F_Prompf_Construct_End(), WN2F_Prompf_Construct_Start(), WN2F_Start_Prompf_Construct(), WN_CopyMap(), WN_MAP_retrieve(), WN_write_generic_map(), and WN_write_prefetch().
#define WN_MAP32_Set | ( | wn_map, | |
wn, | |||
thing | |||
) | IPA_WN_MAP32_Set(Current_Map_Tab, (wn_map), (wn), (thing)) |
Definition at line 392 of file wn_map.h.
Referenced by ir_b_write_tree(), Prompf_Assign_Ids_Traverse(), ANL_FUNC_ENTRY::Set_Construct_Id(), RBI::Set_WN_Cur_Rgn(), WN_CopyMap(), and WN_MAP_put().
#define WN_MAP64_Create | ( | pool | ) | WN_MAP_Do_Create(Current_Map_Tab, (pool), WN_MAP_KIND_INT64) |
#define WN_MAP64_Get | ( | wn_map, | |
wn | |||
) | IPA_WN_MAP64_Get(Current_Map_Tab, (wn_map), (wn)) |
Definition at line 418 of file wn_map.h.
Referenced by ir_put_wn(), WN_CopyMap(), and WN_MAP_retrieve().
#define WN_MAP64_Set | ( | wn_map, | |
wn, | |||
thing | |||
) | IPA_WN_MAP64_Set(Current_Map_Tab, (wn_map), (wn), (thing)) |
Definition at line 394 of file wn_map.h.
Referenced by WN_CopyMap(), and WN_MAP_put().
#define WN_MAP_AC_INTERNAL 3 |
Definition at line 291 of file wn_map.h.
Referenced by ir_b_write_tree(), Read_Local_Info(), and WN_MAP_TAB_Create().
#define WN_MAP_ALIAS_CLASS 4 |
Definition at line 292 of file wn_map.h.
Referenced by ir_b_write_tree(), ir_put_wn(), Read_Local_Info(), WN_MAP_TAB_Create(), and Write_PU_Info().
#define WN_MAP_Create | ( | pool | ) | WN_MAP_Do_Create(Current_Map_Tab, (pool), WN_MAP_KIND_VOIDP) |
Definition at line 341 of file wn_map.h.
Referenced by Anl_Static_Analysis(), LowerUPC_Init_Consistency(), MemCtr_Add(), PDGCS_new_proc(), W2C_Push_PU(), W2F_Push_PU(), and WN_Verifier::WN_Verifier().
#define WN_MAP_Delete | ( | wn_map | ) | IPA_WN_MAP_Delete(Current_Map_Tab, (wn_map)) |
Definition at line 367 of file wn_map.h.
Referenced by Anl_Fini(), Anl_Static_Analysis(), MemCtr_Add(), PDGCS_do_proc(), W2C_Pop_PU(), W2F_Pop_PU(), Write_PU_Info(), GOTO_TABLE::~GOTO_TABLE(), and WN_Verifier::~WN_Verifier().
#define WN_MAP_DEPGRAPH 0 |
Definition at line 288 of file wn_map.h.
Referenced by WN_MAP_TAB_Create().
#define WN_MAP_FEEDBACK 2 |
Definition at line 290 of file wn_map.h.
Referenced by FEEDBACK::Delete(), enable_tree_freq_display(), Post_LNO_Processing(), and WN_MAP_TAB_Create().
#define WN_MAP_Get | ( | wn_map, | |
wn | |||
) | IPA_WN_MAP_Get(Current_Map_Tab, (wn_map), (wn)) |
Definition at line 414 of file wn_map.h.
Referenced by GOTO_TABLE::Get_Parent(), ir_b_write_tree(), ir_put_wn(), WN_Verifier::Is_WHIRL_tree(), W2CF_Get_Parent(), WN2C_iload(), WN2C_istore(), WN2C_Prefetch_Map(), WN2C_region(), WN2F_Append_Prefetch_Map(), WN2F_iload(), WN2F_istore(), WN2F_pstore(), WN_CopyMap(), WN_MAP_retrieve(), and WN_write_prefetch().
#define WN_MAP_Get_Kind | ( | wn_map | ) | (Current_Map_Tab->_kind[(wn_map)]) |
Definition at line 438 of file wn_map.h.
Referenced by ir_put_wn().
#define WN_MAP_MAX 28 |
Definition at line 296 of file wn_map.h.
Referenced by IPA_WN_MAP_Delete(), IPA_WN_MAP_Status(), IPA_WN_Move_Maps_PU(), WN_COPY_All_Maps(), WN_MAP_Do_Create(), WN_MAP_get_map_id(), WN_MAP_TAB_Create(), and WN_MAP_TAB_Delete().
#define WN_MAP_PREFETCH 1 |
Definition at line 289 of file wn_map.h.
Referenced by ir_b_write_tree(), WN2C_iload(), WN2C_istore(), WN2C_Prefetch_Map(), WN2F_Append_Prefetch_Map(), WN2F_iload(), WN2F_istore(), WN2F_pstore(), WN_get_prefetch(), WN_MAP_TAB_Create(), and WN_write_prefetch().
#define WN_MAP_RESERVED 5 |
Definition at line 295 of file wn_map.h.
Referenced by IPA_WN_MAP_Status(), WN_MAP_Do_Create(), and WN_MAP_TAB_Create().
#define WN_MAP_Set | ( | wn_map, | |
wn, | |||
thing | |||
) | IPA_WN_MAP_Set(Current_Map_Tab, (wn_map), (wn), (thing)) |
Definition at line 390 of file wn_map.h.
Referenced by Add_Pragma_To_MP_Regions(), WN_Verifier::Is_WHIRL_tree(), GOTO_TABLE::Set_Parent(), W2CF_Set_Parent(), WN_CopyMap(), WN_Create_Intrinsic(), WN_CreateCvtl(), WN_CreateExp1(), WN_CreateExp2(), WN_CreateExp3(), WN_CreateIload(), WN_CreateIstore(), WN_CreatePstore(), WN_get_prefetch(), WN_MAP_put(), WN_SimpCreateCvtl(), WN_SimpCreateDeposit(), WN_SimpCreateExp1(), WN_SimpCreateExp2(), WN_SimpCreateExp3(), WN_SimpCreateExtract(), and WN_Simplify_Tree().
#define WN_MAP_Size | ( | wn_map, | |
category | |||
) | IPA_WN_MAP_Size(Current_Map_Tab, (wn_map), (category)) |
#define WN_MAP_Status | ( | ) | IPA_WN_MAP_Status(Current_Map_Tab) |
#define WN_MAP_TAB_Last_ID | ( | maptab, | |
category | |||
) | (maptab)->_last_map_id[(category)] |
Definition at line 331 of file wn_map.h.
Referenced by fix_tree().
#define WN_MAP_UNDEFINED (-1) |
Definition at line 287 of file wn_map.h.
Referenced by disable_tree_freq_display(), IPA_WN_Move_Maps_PU(), ir_b_write_tree(), ir_put_wn(), MemCtr_Add(), W2C_Pop_PU(), W2F_Pop_PU(), WN2C_Translate_Stmt_Sequence(), WN2F_block(), WN2F_Initiate_OneInt(), WN2F_Initiate_ZeroInt(), WN_CopyMap(), WN_Create_Intrinsic(), WN_CreateCvtl(), WN_CreateExp1(), WN_CreateExp2(), WN_CreateExp3(), WN_CreateIload(), WN_CreateIstore(), WN_SimpCreateCvtl(), WN_SimpCreateDeposit(), WN_SimpCreateExp1(), WN_SimpCreateExp2(), WN_SimpCreateExp3(), WN_SimpCreateExtract(), WN_Simplify_Tree(), and Write_PU_Info().
typedef struct wn_map_tab WN_MAP_TAB |
enum WN_MAP_KIND |
INT32 IPA_WN_MAP32_Get | ( | WN_MAP_TAB * | maptab, |
WN_MAP | wn_map, | ||
const WN * | wn | ||
) |
Definition at line 430 of file wn_map.cxx.
References wn_map_tab::_is_used, wn_map_tab::_map_size, wn_map_tab::_mapping, Is_True, OPCODE_mapcat(), WN_MAP_check_kind, WN_map_id(), WN_MAP_KIND_INT32, and WN_opcode().
void IPA_WN_MAP32_Set | ( | WN_MAP_TAB * | maptab, |
WN_MAP | wn_map, | ||
WN * | wn, | ||
INT32 | thing | ||
) |
Definition at line 372 of file wn_map.cxx.
References wn_map_tab::_is_used, wn_map_tab::_map_size, wn_map_tab::_mapping, Is_True, OPCODE_mapcat(), WN_MAP_check_kind, WN_MAP_get_map_id(), WN_MAP_KIND_INT32, WN_MAP_realloc_array(), and WN_opcode().
Referenced by FEEDBACK::Delete(), and IPA_WN_Move_Maps_PU().
INT64 IPA_WN_MAP64_Get | ( | WN_MAP_TAB * | maptab, |
WN_MAP | wn_map, | ||
const WN * | wn | ||
) |
Definition at line 447 of file wn_map.cxx.
References wn_map_tab::_is_used, wn_map_tab::_map_size, wn_map_tab::_mapping, Is_True, OPCODE_mapcat(), WN_MAP_check_kind, WN_map_id(), WN_MAP_KIND_INT64, and WN_opcode().
void IPA_WN_MAP64_Set | ( | WN_MAP_TAB * | maptab, |
WN_MAP | wn_map, | ||
WN * | wn, | ||
INT64 | thing | ||
) |
Definition at line 390 of file wn_map.cxx.
References wn_map_tab::_is_used, wn_map_tab::_map_size, wn_map_tab::_mapping, Is_True, OPCODE_mapcat(), WN_MAP_check_kind, WN_MAP_get_map_id(), WN_MAP_KIND_INT64, WN_MAP_realloc_array(), and WN_opcode().
Referenced by IPA_WN_Move_Maps_PU().
void IPA_WN_MAP_Delete | ( | WN_MAP_TAB * | maptab, |
WN_MAP | wn_map | ||
) |
Definition at line 236 of file wn_map.cxx.
References wn_map_tab::_is_used, wn_map_tab::_map_size, wn_map_tab::_mapping, wn_map_tab::_pool, FALSE, Is_True, Malloc_Mem_Pool, MEM_POOL_FREE, NULL, WN_MAP_CATEGORIES, and WN_MAP_MAX.
Referenced by WN_MAP_TAB_Delete().
void* IPA_WN_MAP_Get | ( | WN_MAP_TAB * | maptab, |
WN_MAP | wn_map, | ||
const WN * | wn | ||
) |
Definition at line 413 of file wn_map.cxx.
References wn_map_tab::_is_used, wn_map_tab::_map_size, wn_map_tab::_mapping, Is_True, NULL, OPCODE_mapcat(), WN_MAP_check_kind, WN_map_id(), WN_MAP_KIND_VOIDP, and WN_opcode().
void IPA_WN_MAP_Set | ( | WN_MAP_TAB * | maptab, |
WN_MAP | wn_map, | ||
WN * | wn, | ||
void * | thing | ||
) |
Definition at line 352 of file wn_map.cxx.
References wn_map_tab::_is_used, wn_map_tab::_map_size, wn_map_tab::_mapping, Is_True, NULL, OPCODE_mapcat(), WN_MAP_check_kind, WN_MAP_get_map_id(), WN_MAP_KIND_VOIDP, WN_MAP_realloc_array(), and WN_opcode().
Referenced by IPO_CLONE::Clone_Tree(), and IPA_WN_Move_Maps_PU().
WN_MAP_ID IPA_WN_MAP_Status | ( | WN_MAP_TAB * | maptab | ) |
Definition at line 259 of file wn_map.cxx.
References wn_map_tab::_is_used, Is_True, WN_MAP_MAX, and WN_MAP_RESERVED.
void WN_MAP_Add_Free_List | ( | WN_MAP_TAB * | maptab, |
WN * | wn | ||
) |
Definition at line 470 of file wn_map.cxx.
References wn_map_tab::_free_list, wn_map_tab::_free_list_count, wn_map_tab::_free_list_pool, wn_map_tab::_free_list_size, max, OPCODE_mapcat(), size, TYPE_MEM_POOL_ALLOC_N, TYPE_MEM_POOL_REALLOC_N, WN_map_id(), and WN_opcode().
Referenced by IPA_WN_Delete(), and IPA_WN_Move_Maps_PU().
WN_MAP WN_MAP_Do_Create | ( | WN_MAP_TAB * | maptab, |
struct mem_pool * | pool, | ||
WN_MAP_KIND | kind | ||
) |
Definition at line 204 of file wn_map.cxx.
References wn_map_tab::_is_used, wn_map_tab::_kind, wn_map_tab::_map_size, wn_map_tab::_mapping, wn_map_tab::_pool, FmtAssert, kind, NULL, pool, TRUE, WN_MAP_CATEGORIES, WN_MAP_MAX, and WN_MAP_RESERVED.
void WN_MAP_Set_ID | ( | WN_MAP_TAB * | maptab, |
WN * | wn | ||
) |
Definition at line 506 of file wn_map.cxx.
References OPCODE_mapcat(), WN_MAP_get_map_id(), and WN_opcode().
Referenced by IPA_WN_Move_Maps_PU().
WN_MAP_TAB* WN_MAP_TAB_Create | ( | struct mem_pool * | pool | ) |
Definition at line 127 of file wn_map.cxx.
References wn_map_tab::_free_list_count, wn_map_tab::_free_list_pool, wn_map_tab::_free_list_size, wn_map_tab::_is_used, wn_map_tab::_kind, wn_map_tab::_last_map_id, wn_map_tab::_map_size, wn_map_tab::_mapping, wn_map_tab::_pool, FALSE, NULL, pool, TRUE, TYPE_MEM_POOL_ALLOC, WN_MAP_AC_INTERNAL, WN_MAP_ALIAS_CLASS, WN_MAP_CATEGORIES, WN_MAP_DEPGRAPH, WN_MAP_FEEDBACK, WN_MAP_KIND_INT32, WN_MAP_KIND_VOIDP, WN_MAP_MAX, WN_MAP_PREFETCH, and WN_MAP_RESERVED.
Referenced by IPO_CLONE::New_Clone(), PDGCS_initialize(), and Read_Local_Info().
void WN_MAP_TAB_Delete | ( | WN_MAP_TAB * | maptab | ) |
Definition at line 175 of file wn_map.cxx.
References wn_map_tab::_free_list, wn_map_tab::_free_list_pool, wn_map_tab::_free_list_size, wn_map_tab::_is_used, IPA_WN_MAP_Delete(), MEM_POOL_FREE, WN_MAP_CATEGORIES, and WN_MAP_MAX.
Referenced by Free_Local_Info().
Mapping mechanism for tree nodes --------------------------------
Description:
This module implements the mapping mechanism. Its interface is described in wn_map.h
Implementation Description The interface/external behavior of the mapping routines is described in wn_map.h. Here we describe the implementation.
The set of possible opcodes is partitioned into categories. We provide a separate mapping mechanism for each category, although this is transparent to the user. When the user creates a mapping, no memory is allocated. We instead use a lazy model that allocates space when the user first sets the value for a node. Thus, while the same mapping can be used by opcodes in different categories, space is only reserved for those categores that have opcodes which are set. As an example, the user may create a data dependence mapping. If he only sets the mappings for loads and stores, memory will only be allocated for all the load/store nodes.
Each wn_map has a WN_MAP_KIND flag to indicate what kind of values it holds. They may be void*, INT32, or INT64 values.
Every WN contains a map_id. This map_id is unique among all nodes of the same category in one PU. Two nodes of different categories or in different PUs may share the same map_id. Every node has its map_id initialized to -1. A node only gets a valid map_id when it is assigned a value for one of the maps. This allows us to avoid wasting map_id space on nodes that are never mapped.
To save space, we retain a free list of map_ids. When a WN is deleted, the WN_MAP_Add_Free_List method is called automatically to add the map_id to the free list. If we later need a new map_id, we can just grab a value off the free list.
Definition at line 99 of file wn_map.cxx.
Referenced by DRA_Add_Clone(), fix_tree(), ir_put_wn(), PDGCS_initialize(), PDGCS_new_proc(), Postprocess_PU(), Preprocess_PU(), Read_Local_Info(), WN_COPY_All_Maps(), WN_CopyMap(), WN_get_prefetch(), WN_get_tree(), and Write_PU_Info().