Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
cwh_types.cxx File Reference
#include "defs.h"
#include "glob.h"
#include "stab.h"
#include "ttype.h"
#include "strtab.h"
#include "config_targ.h"
#include "errors.h"
#include "wn.h"
#include "wn_util.h"
#include "i_cvrt.h"
#include "cwh_defines.h"
#include "cwh_expr.h"
#include "cwh_addr.h"
#include "cwh_block.h"
#include "cwh_preg.h"
#include "cwh_stab.h"
#include "cwh_auxst.h"
#include "cwh_types.h"
#include "cwh_stk.h"
#include "cwh_types.i"
#include "sgi_cmd_line.h"
Include dependency graph for cwh_types.cxx:

Go to the source code of this file.

Classes

struct  type_pair_t

Defines

#define BUMP_TY_COUNTER(x)
#define TYPE_ALLOC_CHUNK_SIZE   32

Functions

TYPE fei_descriptor (INT32 flag_matrix, INT32 table_type, INTPTR size, INT32 basic_type, INT32 aux_info, INT32 alignment)
void fei_init_global_vars ()
INTPTR fei_array_dimen (INT32 flag_bits, INT64 low_bound, INT64 extent, INT32 axis, TYPE span_type, INT64 bitsize, INT distribution, INT64 upper_bound)
INTPTR fei_co_array_dimen (INT32 flag_bits, INT64 low_bound, INT64 extent, INT32 arraydims, INT32 axis, TYPE span_type, INT64 bitsize, INT distribution, INT64 upper_bound)
INT32 fei_next_type_idx (INT32 flag, INT32 align)
INT32 fei_imported_type (char *name_string, INTPTR modst_idx)
TYPE fei_get_pdg_type (INT32 ty_idx, INT32 table_type, INT32 basic_type, INT32 nbr_components)
void fei_user_type (char *name_string, INT32 nbr_components, INT64 size, INT32 sequence_arg, INT32 cr_ty_idx, INT32 align, INTPTR modst_idx, INT32 definition)
void fei_gen_st_for_type (char *name_string, TYPE type_idx, INTPTR modst_idx)
INT32 fei_member (char *name_string, TYPE member_type, INT64 offset, INT64 size, INT32 alignment, INT32 lineno, INT64 flag_bits, INT64 io_code)
TYPE fei_dope_vector (INT32 num_dims, TYPE base_type, INT32 flag)
static TY_IDX cwh_types_mk_basic_TY (BASIC_TYPE basic_type, INTPTR size, mUINT16 alignment)
static TY_IDX cwh_types_mk_misaligned_TY (TY_IDX ty_idx, mUINT16 alignment)
TY_IDX cwh_types_form_misaligned_TY (TY_IDX ty_idx, mUINT16 alignment)
TY_IDX cwh_types_mk_procedure_TY (TY_IDX ret_typ_idx, INT32 nparms, BOOL global, BOOL host)
static TY_IDX cwh_types_mk_array_TY (ARB_HANDLE bounds, INT16 n, TY_IDX base_idx, INT64 size)
TY_IDX cwh_types_mk_logical_TY (INT32 size, mUINT16 alignment)
TY_IDX cwh_types_mk_character_TY (WN *sz_wn, ST *sz_st, BOOL sz_is_wn)
TY_IDX cwh_types_scalar_TY (TY_IDX ty_idx)
TY_IDX cwh_types_array_TY (TY_IDX ty_idx)
TY_IDX cwh_types_WN_TY (WN *wn, BOOL addr)
TY_IDX cwh_types_ch_parm_TY (WN *ln)
BOOL cwh_types_is_character (TY_IDX ty_idx)
BOOL cwh_types_is_logical (TY_IDX ty_idx)
BOOL cwh_types_is_character_function (TY_IDX ty_idx)
STcwh_types_character_extra (ST *dummy)
static STcwh_types_formal_util (TY_IDX ty_idx)
static TY_IDX cwh_types_mk_struct (INT64 size, INT32 align, FLD_HANDLE list, char *name)
TY_IDX cwh_types_array_util (INT16 rank, TY_IDX ety_idx, INT32 align, INT64 size, char *name, BOOL alloc_arbs)
static TY_IDX cwh_types_dim_struct_TY (void)
static TY_IDX cwh_types_dim_TY (INT32 num_dims)
TY_IDX cwh_types_dope_TY (INT32 num_dims, TY_IDX base_idx, BOOL host, BOOL ptr)
static TY_IDX cwh_types_mk_dope_invariant_TY (void)
static TY_IDX cwh_types_shared_dope (FLD_HANDLE fld, int ndims, BOOL is_ptr)
BOOL cwh_types_is_dope (TY_IDX ty)
INT32 cwh_types_dope_rank (TY_IDX ty_idx)
TY_IDX cwh_types_dope_basic_TY (TY_IDX ty)
FLD_HANDLE cwh_types_dope_dims_FLD (TY_IDX ty)
bool cwh_types_contains_dope (TY_IDX ty)
static FLD_HANDLE cwh_types_fld_util (char *name_string, TY_IDX fld_ty, OFFSET_64 offset, BOOL global)
FLD_HANDLE cwh_types_fld_dummy (OFFSET_64 off, TY_IDX ty)
TY_IDX cwh_types_array_temp_TY (WN *ar, TY_IDX sc)
WNcwh_types_size_WN (TY_IDX ty, WN *e_sz)
WNcwh_types_bound_WN (TY_IDX ty, INT16 i, enum ty_bound_enum b)
void cwh_types_get_dope_info (INT32 crayfield, INT32 *offset, INT32 *rshift, INT64 *mask, TYPE_ID *ty)
TY_IDX cwh_types_mk_pointer_TY (TY_IDX ty_idx, BOOL host)
static TY_IDX cwh_types_mk_unique_pointer_TY (TY_IDX ty, BOOL host)
TY_IDX cwh_types_mk_common_TY (INT64 size, mUINT16 al)
TY_IDX cwh_types_mk_module_TY (INT64 size, mUINT16 al)
TY_IDX cwh_types_mk_equiv_TY (INT64 size)
TY_IDX cwh_types_mk_namelist_TY (INT32 nitems)
static TY_IDX cwh_types_mk_namelist_item_TY (void)
void cwh_types_mk_element (ST *c, ST *st)
TY_IDX cwh_types_mk_result_temp_TY (void)
static void cwh_types_fill_type (INT32 flag_bits, TYPE *t, TY_IDX ty)
char * cwh_types_mk_anon_name (char *nm)
static void cwh_types_push_dtype (dtype_t d)
static dtype_t cwh_types_pop_dtype (void)
static BOOL cwh_types_in_dtype (void)
INT64 cwh_cray_type_from_TY (TY_IDX ty_idx)
INT64 cwh_cray_type_from_MTYPE (TYPE_ID ty)
void cwh_types_init_target (void)
static TY_IDX cwh_types_find_f90_pointer_ty (TY_IDX ty)
TY_IDX cwh_types_mk_f90_pointer_ty (TY_IDX ty)
static TY_IDX cwh_types_new_TY (BOOL global, INT32 align)
TY_IDX cwh_types_unique_TY (TY_IDX ty_idx)
TY_IDX cwh_types_make_pointer_type (TY_IDX ty, BOOL f90_pointer)
static STcwh_types_make_bounds_ST (void)
void cwh_types_copyin_pragma (ST *st)

Variables

static char * source_file = __FILE__
static type_pair_tpairs
static INT num_type_pairs = 0
static INT max_type_pairs = 0
static INT pair_typenum = 0

Define Documentation

#define TYPE_ALLOC_CHUNK_SIZE   32

Definition at line 3380 of file cwh_types.cxx.

Referenced by cwh_types_mk_f90_pointer_ty().


Function Documentation

Definition at line 1714 of file cwh_types.cxx.

References cwh_types_mk_character_TY(), Make_Pointer_Type(), NULL, and TRUE.

Referenced by cwh_intrin_wrap_char_parm().

Here is the call graph for this function:

Definition at line 1804 of file cwh_types.cxx.

References Be_Type_Tbl, cwh_addr_char_len_typeid, cwh_types_formal_util(), cwh_types_is_character(), NULL, Set_ST_is_temp_var(), Set_ST_is_value_parm(), and ST_type().

Referenced by cwh_auxst_add_dummy().

Here is the call graph for this function:

Definition at line 2359 of file cwh_types.cxx.

References cwh_types_contains_dope(), cwh_types_is_dope(), FLD_last_field(), FLD_type(), KIND_STRUCT, Make_fld_iter(), TY_fld(), and TY_kind().

Referenced by cwh_types_contains_dope().

Here is the call graph for this function:

static TY_IDX cwh_types_dim_struct_TY ( void  ) [static]
static TY_IDX cwh_types_dim_TY ( INT32  num_dims) [static]

Definition at line 1987 of file cwh_types.cxx.

References cwh_types_array_util(), cwh_types_dim_struct_TY(), cwh_types_unique_TY(), DIM_SZ, MAX_ARY_DIMS, Pointer_Size, Set_ARB_stride_val(), Set_ARB_ubnd_val(), TRUE, and TY_arb().

Referenced by cwh_types_dope_TY().

Here is the call graph for this function:

Definition at line 2311 of file cwh_types.cxx.

References FLD_type(), KIND_POINTER, TY_fld(), TY_kind(), TY_pointed(), and Ty_Table.

Referenced by fei_as_ref(), and fei_nseq_subscr().

Here is the call graph for this function:

Definition at line 2329 of file cwh_types.cxx.

References DOPE_NM, dope_offset, FLD_last_field(), FLD_next(), FLD_ofst(), KIND_POINTER, TY_fld(), TY_kind(), TY_pointed(), and Ty_Table.

Here is the call graph for this function:

Definition at line 2277 of file cwh_types.cxx.

References ARB_ubnd_val(), DOPE_NM, dope_offset, FLD_last_field(), FLD_next(), FLD_ofst(), FLD_type(), FLD_HANDLE::Is_Null(), TY_arb(), TY_fld(), and Ty_Table.

Referenced by cwh_inline_allocate(), and fei_as_ref().

Here is the call graph for this function:

static TY_IDX cwh_types_find_f90_pointer_ty ( TY_IDX  ty) [static]

Definition at line 3383 of file cwh_types.cxx.

References num_type_pairs.

Referenced by cwh_types_mk_f90_pointer_ty().

Definition at line 2419 of file cwh_types.cxx.

References cwh_types_fld_util(), and FALSE.

Referenced by fei_arg_addr(), and fei_non_conform_store().

Here is the call graph for this function:

static ST* cwh_types_formal_util ( TY_IDX  ty_idx) [static]

Definition at line 1834 of file cwh_types.cxx.

References CLASS_VAR, CURRENT_SYMTAB, cwh_auxst_clear(), cwh_types_mk_anon_name(), EXPORT_LOCAL, New_ST(), Save_Str(), SCLASS_FORMAL, and ST_Init().

Referenced by cwh_types_character_extra().

Here is the call graph for this function:

void cwh_types_get_dope_info ( INT32  crayfield,
INT32 offset,
INT32 rshift,
INT64 mask,
TYPE_ID ty 
)

Definition at line 2686 of file cwh_types.cxx.

References dope_bofst, dope_bsize, dope_btype, dope_offset, MTYPE_size_best, and size.

Referenced by fei_get_dv_hdr_fld(), and fei_set_dv_hdr_fld().

static BOOL cwh_types_in_dtype ( void  ) [static]

Definition at line 3169 of file cwh_types.cxx.

References dtype_top, FALSE, and TRUE.

Referenced by fei_member(), and fei_next_type_idx().

Definition at line 1775 of file cwh_types.cxx.

References cwh_types_array_TY(), cwh_types_scalar_TY(), FALSE, KIND_FUNCTION, TY_is_character(), TY_kind(), Ty_Table, TY_tylist(), and Tylist_Table.

Here is the call graph for this function:

Definition at line 2255 of file cwh_types.cxx.

References dope_str, DOPENM_LEN, FALSE, KIND_POINTER, TRUE, TY_kind(), TY_name(), and TY_pointed().

Referenced by cwh_types_contains_dope(), and cwh_types_form_misaligned_TY().

Here is the call graph for this function:

Definition at line 1754 of file cwh_types.cxx.

References cwh_types_array_TY(), cwh_types_scalar_TY(), TY_is_logical(), and Ty_Table.

Here is the call graph for this function:

static ST* cwh_types_make_bounds_ST ( void  ) [static]

Definition at line 3531 of file cwh_types.cxx.

References Be_Type_Tbl, cwh_bound_int_typeid, and cwh_stab_temp_ST().

Referenced by cwh_types_array_temp_TY(), and cwh_types_mk_character_TY().

Here is the call graph for this function:

Definition at line 2788 of file cwh_types.cxx.

References bit_to_byte, and cwh_types_mk_struct().

Referenced by cwh_stab_common_ST().

Here is the call graph for this function:

Definition at line 2829 of file cwh_types.cxx.

References bit_to_byte, cwh_types_mk_struct(), and MAX_ALIGN.

Referenced by cwh_stab_altentry_temp(), and fei_seg().

Here is the call graph for this function:

Definition at line 2804 of file cwh_types.cxx.

References bit_to_byte, and cwh_types_mk_struct().

Referenced by cwh_stab_module_ST().

Here is the call graph for this function:

TY_IDX cwh_types_mk_pointer_TY ( TY_IDX  ty_idx,
BOOL  host 
)

Definition at line 2736 of file cwh_types.cxx.

References Make_Pointer_Type().

Referenced by cwh_stab_formal_ref(), cwh_types_dope_TY(), fei_descriptor(), and fei_object().

Here is the call graph for this function:

Definition at line 3019 of file cwh_types.cxx.

References Be_Type_Tbl, cwh_types_fld_util(), cwh_types_mk_struct(), MTYPE_I8, RESULT_ALIGN, RESULT_SIZE, Set_FLD_last_field(), and TRUE.

Here is the call graph for this function:

static dtype_t cwh_types_pop_dtype ( void  ) [static]
static void cwh_types_push_dtype ( dtype_t  d) [static]

Definition at line 3114 of file cwh_types.cxx.

References dtype_t::dty, dtype_t::dty_last, dtype_stk, dtype_stk_size, dtype_top, dtype_t::hosted, dtype_t::ncompos, return(), dtype_t::seq, and STK_SIZE_CHANGE.

Referenced by fei_get_pdg_type(), fei_member(), and fei_user_type().

Here is the call graph for this function:

WN* cwh_types_size_WN ( TY_IDX  ty,
WN e_sz 
)

Definition at line 2591 of file cwh_types.cxx.

References ARB_dimension(), cwh_addr_extent(), cwh_expr_bincalc(), cwh_types_bound_WN(), Is_True, KIND_ARRAY, LOW, MTYPE_I4, OPR_MPY, TY_arb(), TY_kind(), UPPER, wn, and WN_Intconst().

Here is the call graph for this function:

INTPTR fei_array_dimen ( INT32  flag_bits,
INT64  low_bound,
INT64  extent,
INT32  axis,
TYPE  span_type,
INT64  bitsize,
INT  distribution,
INT64  upper_bound 
)
INTPTR fei_co_array_dimen ( INT32  flag_bits,
INT64  low_bound,
INT64  extent,
INT32  arraydims,
INT32  axis,
TYPE  span_type,
INT64  bitsize,
INT  distribution,
INT64  upper_bound 
)
TYPE fei_get_pdg_type ( INT32  ty_idx,
INT32  table_type,
INT32  basic_type,
INT32  nbr_components 
)
INT32 fei_imported_type ( char *  name_string,
INTPTR  modst_idx 
)

Definition at line 671 of file cwh_types.cxx.

References cast_to_int, cast_to_ST, cast_to_STB, cwh_stab_seen_derived_type_or_imported_var(), al::item, and ST_type().

Referenced by send_derived_type().

Here is the call graph for this function:

Definition at line 242 of file cwh_types.cxx.

References ANULL, co_top_decl_bounds, and top_of_decl_bounds.

Referenced by get_type_desc().

INT32 fei_next_type_idx ( INT32  flag,
INT32  align 
)

Definition at line 650 of file cwh_types.cxx.

References bit_to_byte, BUMP_TY_COUNTER, c_TY_DTYPE, cast_to_int, cwh_types_in_dtype(), cwh_types_new_TY(), FEI_NEXT_TYPE_IDX_HOSTED_TYPE, in_hosted_dtype, and test_flag.

Referenced by send_derived_type().

Here is the call graph for this function:


Variable Documentation

INT max_type_pairs = 0 [static]

Definition at line 3378 of file cwh_types.cxx.

Referenced by cwh_types_mk_f90_pointer_ty().

INT num_type_pairs = 0 [static]

Definition at line 3377 of file cwh_types.cxx.

Referenced by cwh_types_find_f90_pointer_ty(), and cwh_types_mk_f90_pointer_ty().

INT pair_typenum = 0 [static]

Definition at line 3379 of file cwh_types.cxx.

Referenced by cwh_types_mk_f90_pointer_ty().

type_pair_t* pairs [static]

Definition at line 3376 of file cwh_types.cxx.

char* source_file = __FILE__ [static]

Definition at line 62 of file cwh_types.cxx.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines