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

Go to the source code of this file.

Defines

#define RETURN4   return(-4)
#define RETURN2   return(-2)
#define RETURN1   return(-1)

Functions

void fei_seq_subscr (TYPE result_type, INT32 kidsnum)
static INT64 cwh_addr_compute_stride_fudge_factor (TY_IDX in)
static void cwh_addr_fixup_nseq (WN **ex, WN **sb, WN *sm)
void fei_nseq_subscr (TYPE result_type)
void fei_subscr_triplet (TYPE result_type)
void fei_subscr_src_triplet (TYPE result_type)
void fei_subscr_size (TYPE result_type, INT32 bounds_check)
void fei_substr (INT32 bounds_check)
void fei_addr (TYPE basic)
void fei_as_ref (TYPE result_type)
static WNcwh_addr_array (OPCODE op, WN *addr, TY_IDX ty)
static WNcwh_addr_array1 (OPCODE op, WN *addr, TY_IDX ty, INT32 kidsnum)
static WNcwh_addr_do_bounds_check (WN *subscript_in, WN *lbound, WN *extent)
static void cwh_addr_insert_bounds_check (WN *assertion, WN *ar)
static WNcwh_addr_add_bound (WN *ar, WN *sz, WN *subscript)
static bool cwh_addr_use_mstid_mldid (ST *st)
WNcwh_addr_ldid (ST *st, OFFSET_64 off, TY_IDX ty)
WNcwh_addr_mk_ldid (ST *st, OFFSET_64 off, TYPE_ID bt, TY_IDX ty)
WNcwh_addr_mload (WN *wt, OFFSET_64 off, TY_IDX ty, WN *sz)
static WNcwh_addr_iload (WN *wt, OFFSET_64 off, TY_IDX ty)
STcwh_addr_WN_ST (WN *wn)
WNcwh_addr_load_WN (WN *awn, OFFSET_64 off, TY_IDX dty)
WNcwh_addr_load_ST (ST *st, OFFSET_64 off, TY_IDX dty)
WNcwh_addr_pstid (ST *st, OFFSET_64 off, TY_IDX ty, WN *rhs)
WNcwh_addr_stid (ST *st, OFFSET_64 off, TY_IDX ty, WN *rhs)
WNcwh_addr_istore (WN *lhs, OFFSET_64 off, TY_IDX ty, WN *rhs)
WNcwh_addr_pstore (WN *lhs, OFFSET_64 off, TY_IDX ty, WN *rhs)
WNcwh_addr_mstore (WN *ad, OFFSET_64 off, TY_IDX ty, WN *rhs)
void cwh_addr_store_ST (ST *st, OFFSET_64 off, TY_IDX dty, WN *rhs)
void cwh_addr_pstore_ST (ST *st, OFFSET_64 off, TY_IDX dty, WN *rhs)
void cwh_addr_store_WN (WN *lhs, OFFSET_64 off, TY_IDX dty, WN *rhs)
void cwh_addr_pstore_WN (WN *lhs, OFFSET_64 off, TY_IDX dty, WN *rhs)
WNcwh_addr_address_ST (ST *st, OFFSET_64 off, TY_IDX ty)
static WNcwh_addr_lda (ST *st, OFFSET_64 off, TY_IDX ty)
static WNcwh_addr_triplet (WN *lb, WN *ub, WN *str)
static WNcwh_addr_src_triplet (WN *lb, WN *ub, WN *str)
static WNcwh_addr_zero_based (WN *sub, WN *lb)
WNcwh_addr_extent (WN *lb, WN *ub, WN *str)
WNcwh_addr_ubound_from_triplet (WN *triplet)
static WNcwh_addr_adjust_array (WN *wn, TY_IDX ty)
FLD_det cwh_addr_offset (void)
BOOL cwh_addr_is_array (WN *wn)
BOOL cwh_addr_is_section (WN *wn)
static BOOL cwh_addr_is_triplet (WN *wn)
WNcwh_addr_find_section (WN *awn, enum p_flag flag)
WNcwh_addr_find_address (WN *wn)
static W_node cwh_addr_substr_util (OFFSET_64 off, TY_IDX dty)
WNcwh_addr_temp_section (WN *ad, TY_IDX ty)
void cwh_addr_nonc_util (WN **aa, WN **bb)
static WNcwh_addr_nonc_recast (WN *wt, WN *wa)
static void cwh_addr_access_flags (ST *st, INT fg)
void cwh_addr_init_target (void)
static BOOL cwh_addr_f90_pointer_reference_ls (WN *ls)
BOOL cwh_addr_f90_pointer_reference (WN *addr)
void fei_field_dot (TYPE type)
WNaddr_gen_iload_for_strctfld (WN *wn)

Variables

static char * source_file = __FILE__

Define Documentation

#define RETURN1   return(-1)
#define RETURN2   return(-2)
#define RETURN4   return(-4)

Function Documentation

Definition at line 3144 of file cwh_addr.cxx.

References Load_Opcode, TY_mtype(), WN_CreateIload(), and WN_ty().

Referenced by cwh_expr_binop(), and fei_store().

Here is the call graph for this function:

static void cwh_addr_access_flags ( ST st,
INT  fg 
) [static]
static WN* cwh_addr_add_bound ( WN ar,
WN sz,
WN subscript 
) [static]

Definition at line 1127 of file cwh_addr.cxx.

References FOREACH_AXIS, NULL, SUB_OFF, subscript, SZ_OFF, WN_kid(), and WN_kid_count().

Referenced by cwh_addr_temp_section(), fei_as_ref(), fei_nseq_subscr(), fei_seq_subscr(), and fei_substr().

Here is the call graph for this function:

static WN* cwh_addr_adjust_array ( WN wn,
TY_IDX  ty 
) [static]

Definition at line 2423 of file cwh_addr.cxx.

References cwh_expr_bincalc(), cwh_types_bound_WN(), KIND_ARRAY, OPR_MPY, TY_AR_etype(), TY_kind(), UPPER, WN_array_dim, WN_COPY_Tree(), WN_DELETE_Tree(), WN_element_size(), and WN_num_dim.

Referenced by cwh_addr_substr_util().

Here is the call graph for this function:

static WN* cwh_addr_array ( OPCODE  op,
WN addr,
TY_IDX  ty 
) [static]
static WN* cwh_addr_array1 ( OPCODE  op,
WN addr,
TY_IDX  ty,
INT32  kidsnum 
) [static]

Definition at line 916 of file cwh_addr.cxx.

References cwh_types_array_TY(), FOREACH_AXIS, NULL, SUB_OFF, SZ_OFF, TY_etype(), TY_size(), Ty_Table, wn, WN_Create(), WN_element_size(), and WN_kid().

Referenced by fei_seq_subscr().

Here is the call graph for this function:

Definition at line 321 of file cwh_addr.cxx.

References cwh_types_array_TY(), DevAssert, KIND_ARRAY, KIND_SCALAR, KIND_STRUCT, RETURN1, RETURN2, RETURN4, TY_etype(), TY_is_packed(), TY_kind(), TY_size(), and Ty_Table.

Referenced by fei_nseq_subscr().

Here is the call graph for this function:

WN* cwh_addr_extent ( WN lb,
WN ub,
WN str 
)

Definition at line 2359 of file cwh_addr.cxx.

References cwh_expr_bincalc(), OPR_ADD, OPR_DIV, OPR_SUB, and WN_COPY_Tree().

Referenced by cwh_addr_triplet(), cwh_types_size_WN(), fei_descriptor(), fei_doloop(), and fei_redistribute().

Here is the call graph for this function:

static BOOL cwh_addr_f90_pointer_reference_ls ( WN ls) [static]
static void cwh_addr_fixup_nseq ( WN **  ex,
WN **  sb,
WN sm 
) [static]

Definition at line 400 of file cwh_addr.cxx.

References may_be_noncontig, and WN_DELETE_Tree().

Referenced by fei_nseq_subscr().

Here is the call graph for this function:

Definition at line 2484 of file cwh_addr.cxx.

References opc_array, and WN_opcode().

Referenced by cwh_expr_operand(), fei_addr(), fei_nseq_subscr(), and fei_seq_subscr().

Here is the call graph for this function:

Definition at line 2489 of file cwh_addr.cxx.

References opc_section, and WN_opcode().

Referenced by cwh_expr_operand().

Here is the call graph for this function:

static BOOL cwh_addr_is_triplet ( WN wn) [static]

Definition at line 2494 of file cwh_addr.cxx.

References opc_src_triplet, opc_triplet, and WN_opcode().

Referenced by cwh_addr_zero_based(), fei_nseq_subscr(), and fei_seq_subscr().

Here is the call graph for this function:

static WN* cwh_addr_lda ( ST st,
OFFSET_64  off,
TY_IDX  ty 
) [static]
WN* cwh_addr_mk_ldid ( ST st,
OFFSET_64  off,
TYPE_ID  bt,
TY_IDX  ty 
)

Definition at line 1226 of file cwh_addr.cxx.

References cwh_addr_use_mstid_mldid(), KIND_STRUCT, Ldid_Opcode, MTYPE_byte_size, MTYPE_To_TY, Set_TY_IDX_index(), TY_IDX_index(), TY_kind(), TY_size(), wn, and WN_CreateLdid().

Referenced by cwh_addr_ldid(), and cwh_stmt_return_scalar().

Here is the call graph for this function:

void cwh_addr_nonc_util ( WN **  aa,
WN **  bb 
)

Definition at line 2754 of file cwh_addr.cxx.

References cwh_addr_find_section(), cwh_addr_nonc_recast(), DevAssert, NULL, p_RETURN_PARENT, p_RETURN_SECTION, return(), wn, WN_kid0(), WN_kid1(), and WN_kid_count().

Referenced by fei_non_conform_store().

Here is the call graph for this function:

void cwh_addr_pstore_WN ( WN lhs,
OFFSET_64  off,
TY_IDX  dty,
WN rhs 
)
static WN* cwh_addr_src_triplet ( WN lb,
WN ub,
WN str 
) [static]

Definition at line 2315 of file cwh_addr.cxx.

References opc_src_triplet, wn, WN_Create(), WN_kid0(), WN_kid1(), and WN_kid2().

Referenced by fei_subscr_src_triplet().

Here is the call graph for this function:

static WN* cwh_addr_triplet ( WN lb,
WN ub,
WN str 
) [static]

Definition at line 2287 of file cwh_addr.cxx.

References cwh_addr_extent(), NULL, opc_triplet, OPR_IMPLICIT_BND, wn, WN_Create(), WN_kid0(), WN_kid1(), WN_kid2(), and WNOPR.

Referenced by cwh_addr_nonc_recast(), cwh_addr_temp_section(), fei_as_ref(), and fei_subscr_triplet().

Here is the call graph for this function:

Definition at line 2388 of file cwh_addr.cxx.

References cwh_bound_int_typeid, cwh_expr_bincalc(), OPR_ADD, OPR_MPY, OPR_SUB, WN_COPY_Tree(), WN_Intconst(), WN_kid0(), WN_kid1(), and WN_kid2().

Referenced by cwh_addr_do_bounds_check().

Here is the call graph for this function:

static bool cwh_addr_use_mstid_mldid ( ST st) [inline, static]

Definition at line 1159 of file cwh_addr.cxx.

References ST_is_equivalenced(), ST_is_f90_target(), and WHIRL_Mldid_Mstid_On.

Referenced by cwh_addr_ldid(), cwh_addr_load_ST(), cwh_addr_mk_ldid(), cwh_addr_pstore_ST(), and cwh_addr_store_ST().

Here is the call graph for this function:

static WN* cwh_addr_zero_based ( WN sub,
WN lb 
) [static]

Definition at line 2338 of file cwh_addr.cxx.

References cwh_addr_is_triplet(), cwh_expr_bincalc(), OPR_SUB, and WN_kid0().

Referenced by cwh_addr_temp_section(), fei_nseq_subscr(), and fei_substr().

Here is the call graph for this function:

void fei_addr ( TYPE  basic)

Definition at line 819 of file cwh_addr.cxx.

References ADDR_item, cwh_addr_is_array(), cwh_expr_address(), cwh_stk_push(), f_T_SAVED, MTYPE_V, OPR_COMMA, Pointer_Mtype, wn, WN_CreateBlock(), and WN_CreateComma().

Referenced by cvrt_exp_to_pdg().

Here is the call graph for this function:

void fei_subscr_size ( TYPE  result_type,
INT32  bounds_check 
)

Definition at line 733 of file cwh_addr.cxx.

References check_bounds_this_access, and cwh_io_in_ioblock.

Referenced by cvrt_exp_to_pdg().

void fei_subscr_src_triplet ( TYPE  result_type)

Definition at line 689 of file cwh_addr.cxx.

References cwh_addr_src_triplet(), cwh_expr_operand(), cwh_stk_get_class(), cwh_stk_pop_WN(), cwh_stk_push(), NULL, wn, and WN_item.

Referenced by cvrt_exp_to_pdg().

Here is the call graph for this function:

void fei_subscr_triplet ( TYPE  result_type)

Definition at line 620 of file cwh_addr.cxx.

References cwh_addr_triplet(), cwh_expr_operand(), cwh_stk_get_class(), cwh_stk_pop_WN(), cwh_stk_push(), NULL, OPR_IMPLICIT_BND, wn, WN_item, and WNOPR.

Here is the call graph for this function:


Variable Documentation

char* source_file = __FILE__ [static]

Definition at line 61 of file cwh_addr.cxx.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines