Open64 (mfef90, whirl2f, and IR tools)
TAG: version-openad; SVN changeset: 916
|
#include "defs.h"
#include "wn.h"
#include "wn_util.h"
#include "targ_const.h"
#include "symtab_idx.h"
#include "symtab.h"
#include "symtab_access.h"
#include "opcode.h"
#include "strtab.h"
#include "config_targ.h"
#include "const.h"
#include "dra_demangle.h"
#include "dra_export.h"
#include "dra_ec.h"
#include "dra_internal.h"
Go to the source code of this file.
Defines | |
#define | OPC_UNKNOWN OPCODE_UNKNOWN |
Functions | |
static WN * | Gen_Malloc_Cart (WN *block, WN *insert_wn, INT32 size, ST *cart_st) |
static void | Gen_Free_Cart (WN *block, WN *prev_wn, WN *stid_wn, ST *cart_st) |
static WN * | Gen_Call_Array (WN *block, WN *prev_wn, WN *array_wn, ST *func_st, ST *retval_st) |
static WN * | Get_Array_Dim_Size (TY &array_ty, INT dim) |
static ST * | Create_Local_ST (char *name, TY_IDX ty) |
static ST * | Declare_Func_N_Arg (char *ty_name, char *st_name, TY_IDX ret_ty, INT nargs, TY_IDX ty_array[]) |
void | DRA_EC_Declare_Types () |
void | DRA_EC_Array_Portion_Parms (WN *func_wn, WN *entry_wn) |
Variables | |
TY_IDX | DRA_EC_struct_ptr_ty = (TY_IDX) NULL |
static OPCODE | Ldid_Opcode [MTYPE_LAST+1] |
static ST * | ECHT_Check = NULL |
static ST * | ECHT_Compare = NULL |
#define OPC_UNKNOWN OPCODE_UNKNOWN |
Definition at line 74 of file dra_ec.cxx.
static ST * Create_Local_ST | ( | char * | name, |
TY_IDX | ty | ||
) | [static] |
Definition at line 637 of file dra_ec.cxx.
References CLASS_VAR, CURRENT_SYMTAB, EXPORT_LOCAL, New_ST(), Save_Str(), SCLASS_AUTO, Set_ST_is_temp_var(), and ST_Init().
Referenced by DRA_EC_Array_Portion_Parms().
static ST * Declare_Func_N_Arg | ( | char * | ty_name, |
char * | st_name, | ||
TY_IDX | ret_ty, | ||
INT | nargs, | ||
TY_IDX | ty_array[] | ||
) | [static] |
Definition at line 656 of file dra_ec.cxx.
References Be_Type_Tbl, CLASS_FUNC, EXPORT_PREEMPTIBLE, GLOBAL_SYMTAB, idx, SEGMENTED_ARRAY< T, block_size >::Insert(), KIND_FUNCTION, Make_Pointer_Type(), MTYPE_UNKNOWN, MTYPE_V, New_PU(), New_ST(), New_TY(), PU_Init(), Save_Str(), SCLASS_EXTERN, Set_TY_align(), Set_TY_tylist(), ST_Init(), TRUE, TY_align(), TY_Init(), and Tylist_Table.
Referenced by DRA_EC_Declare_Types().
void DRA_EC_Array_Portion_Parms | ( | WN * | func_wn, |
WN * | entry_wn | ||
) |
Definition at line 244 of file dra_ec.cxx.
References Be_Type_Tbl, block, CART_array_base, CART_element_size, CART_index, CART_ndims, Create_Local_ST(), DRA_Demangle_Func(), DRA_EC_struct_ptr_ty, FALSE, Gen_Call_Array(), Gen_Free_Cart(), Gen_Malloc_Cart(), Gen_String_Sym(), Get_Array_Dim_Size(), Get_Preamble_End(), Host_To_Targ_String(), Is_True, KIND_ARRAY, KIND_POINTER, Make_Pointer_Type(), MTYPE_I8, MTYPE_STRING, MTYPE_U1, MTYPE_V, name, NULL, OPC_ALTENTRY, OPC_FUNC_ENTRY, OPR_CALL, OPR_ISTORE, OPR_LDA, Pointer_type, SCLASS_FORMAL, SCLASS_FORMAL_REF, ST_name(), ST_sclass(), ST_st_idx(), St_Table, ST_type(), strcpy, TRUE, TY_AR_etype(), TY_AR_ndims(), TY_kind(), TY_pointed(), TY_size(), Ty_Table, WN_COPY_Tree(), WN_Create(), WN_CreateBlock(), WN_CreateIf(), WN_CreateIstore(), WN_CreateLda(), WN_CreateParm(), WN_first(), WN_formal, WN_func_body, WN_Get_Linenum(), WN_INSERT_BlockAfter(), WN_INSERT_BlockBefore(), WN_Intconst(), WN_kid(), WN_kid_count(), WN_Ldid(), WN_next(), WN_num_formals, WN_opcode(), WN_PARM_BY_REFERENCE, WN_PARM_BY_VALUE, WN_Set_Linenum(), WN_st(), WN_st_idx(), and WN_then.
Referenced by DRA_Processing().
void DRA_EC_Declare_Types | ( | ) |
Definition at line 165 of file dra_ec.cxx.
References ARB_Init(), Be_Type_Tbl, CART_array_base, CART_element_size, CART_index, CART_ndims, Declare_Func_N_Arg(), DRA_EC_struct_ptr_ty, FLD_Init(), KIND_ARRAY, KIND_STRUCT, Make_Pointer_Type(), MTYPE_I8, MTYPE_M, MTYPE_U1, MTYPE_UNKNOWN, MTYPE_V, New_ARB(), New_FLD(), New_TY(), Save_Str(), Set_ARB_const_lbnd(), Set_ARB_const_stride(), Set_ARB_const_ubnd(), Set_ARB_first_dimen(), Set_ARB_last_dimen(), Set_ARB_lbnd_val(), Set_ARB_stride_val(), Set_ARB_ubnd_val(), TY::Set_etype(), Set_FLD_last_field(), Set_TY_align(), Set_TY_arb(), Set_TY_fld(), Set_TY_ptr_as_array(), TRUE, TY_Init(), TY_size(), and Ty_Table.
Referenced by DRA_Initialize().
static WN * Gen_Call_Array | ( | WN * | block, |
WN * | prev_wn, | ||
WN * | array_wn, | ||
ST * | func_st, | ||
ST * | retval_st | ||
) | [static] |
Definition at line 589 of file dra_ec.cxx.
References Be_Type_Tbl, DRA_EC_struct_ptr_ty, Find_Return_Registers(), FmtAssert, MTYPE_V, OPR_CALL, OPR_LDID, OPR_STID, Pointer_type, ST_st_idx(), ST_type(), WN_Create(), WN_CreateLdid(), WN_CreateParm(), WN_CreateStid(), WN_Get_Linenum(), WN_INSERT_BlockAfter(), WN_kid(), WN_PARM_BY_VALUE, WN_Set_Linenum(), and WN_st_idx().
Referenced by DRA_EC_Array_Portion_Parms().
static void Gen_Free_Cart | ( | WN * | block, |
WN * | prev_wn, | ||
WN * | stid_wn, | ||
ST * | cart_st | ||
) | [static] |
Definition at line 556 of file dra_ec.cxx.
References Be_Type_Tbl, MTYPE_V, OPR_INTRINSIC_CALL, Pointer_Size, Pointer_type, ST_type(), WN_Create(), WN_CreateParm(), WN_Get_Linenum(), WN_INSERT_BlockAfter(), WN_intrinsic(), WN_kid0(), WN_Ldid(), WN_PARM_BY_REFERENCE, and WN_Set_Linenum().
Referenced by DRA_EC_Array_Portion_Parms().
Definition at line 510 of file dra_ec.cxx.
References Be_Type_Tbl, DRA_EC_struct_ptr_ty, Find_Return_Registers(), FmtAssert, MTYPE_I4, MTYPE_I8, MTYPE_U8, MTYPE_V, OPR_INTRINSIC_CALL, OPR_LDID, OPR_STID, Pointer_Size, Pointer_type, ST_type(), WN_Create(), WN_CreateLdid(), WN_CreateParm(), WN_CreateStid(), WN_Get_Linenum(), WN_INSERT_BlockBefore(), WN_Intconst(), WN_intrinsic(), WN_kid0(), WN_PARM_BY_VALUE, and WN_Set_Linenum().
Referenced by DRA_EC_Array_Portion_Parms().
static WN * Get_Array_Dim_Size | ( | TY & | array_ty, |
INT | dim | ||
) | [static] |
Definition at line 451 of file dra_ec.cxx.
References Ldid_Opcode, MTYPE_I8, St_Table, ST_type(), TY_AR_const_lbnd(), TY_AR_const_ubnd(), TY_AR_lbnd_val(), TY_AR_lbnd_var(), TY_AR_ndims(), TY_AR_ubnd_val(), TY_AR_ubnd_var(), TY_mtype(), Ty_Table, WN_Add, WN_CreateLdid(), WN_Intconst(), and WN_Sub.
Referenced by DRA_EC_Array_Portion_Parms().
Definition at line 72 of file dra_ec.cxx.
Referenced by DRA_EC_Array_Portion_Parms(), DRA_EC_Declare_Types(), Gen_Call_Array(), and Gen_Malloc_Cart().
ST* ECHT_Check = NULL [static] |
Definition at line 143 of file dra_ec.cxx.
ST* ECHT_Compare = NULL [static] |
Definition at line 144 of file dra_ec.cxx.
OPCODE Ldid_Opcode[MTYPE_LAST+1] [static] |
{ OPC_UNKNOWN, OPC_UNKNOWN, OPC_I4I1LDID, OPC_I4I2LDID, OPC_I4I4LDID, OPC_I8I8LDID, OPC_U4U1LDID, OPC_U4U2LDID, OPC_U4U4LDID, OPC_U8U8LDID, OPC_F4F4LDID, OPC_F8F8LDID, OPC_UNKNOWN, OPC_UNKNOWN, OPC_UNKNOWN, OPC_FQFQLDID, OPC_UNKNOWN, OPC_C4C4LDID, OPC_C8C8LDID, OPC_CQCQLDID, OPC_UNKNOWN }
Definition at line 76 of file dra_ec.cxx.
Referenced by Get_Array_Dim_Size().