Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
wn2f_expr.cxx File Reference
#include "whirl2f_common.h"
#include "PUinfo.h"
#include "tcon2f.h"
#include "wn2f.h"
#include "ty2f.h"
#include "st2f.h"
#include "wn2f_load_store.h"
#include "intrn_info.h"
#include "ty_ftn.h"
Include dependency graph for wn2f_expr.cxx:

Go to the source code of this file.

Classes

struct  Fname_PartialMap
struct  Conv_Op

Defines

#define WN2F_IS_ALPHABETIC(opc)
#define WN2F_IS_INFIX_OP(opc)   (Opc_Fname[opc]!=NULL && !WN2F_IS_ALPHABETIC(opc))
#define WN2F_IS_FUNCALL_OP(opc)   (Opc_Fname[opc]!=NULL && WN2F_IS_ALPHABETIC(opc))
#define NUMBER_OF_OPCODES   (OPCODE_LAST+1)
#define NUMBER_OF_FNAME_PARTIALMAPS   sizeof(Fname_Map) / sizeof(FNAME_PARTIALMAP)
#define NUMBER_OF_CONV_OPS   sizeof(Conv_Op_Map)/sizeof(CONV_OP)

Typedefs

typedef struct Fname_PartialMap FNAME_PARTIALMAP
typedef struct Conv_Op CONV_OP

Functions

static void WN2F_Convert (TOKEN_BUFFER tokens, MTYPE from_mtype, MTYPE to_mtype)
static WN2F_STATUS WN2F_Translate_Arithmetic_Operand (TOKEN_BUFFER tokens, WN *opnd, TY_IDX assumed_ty, BOOL call_by_value, WN2F_CONTEXT context)
static WN2F_STATUS WN2F_Infix_Op (TOKEN_BUFFER tokens, OPCODE opcode, TY_IDX result_ty, WN *wn0, WN *wn1, WN2F_CONTEXT context)
static WN2F_STATUS WN2F_Funcall_Op (TOKEN_BUFFER tokens, OPCODE opcode, WN *wn0, WN *wn1, WN2F_CONTEXT context)
static WN2F_STATUS WN2F_Intr_Funcall (TOKEN_BUFFER tokens, WN *wn, const char *func_name, INT first_arg_idx, INT last_arg_idx, BOOL call_by_value, WN2F_CONTEXT context)
static WN2F_STATUS WN2F_Intr_Infix (TOKEN_BUFFER tokens, const char *op_name, WN *opnd0, WN *opnd1, BOOL call_by_value, WN2F_CONTEXT context)
static WN2F_STATUS WN2F_Binary_Substr_Op (TOKEN_BUFFER tokens, WN *op_wn, const char *op_name, WN2F_CONTEXT context)
void WN2F_Expr_initialize (void)
void WN2F_Expr_finalize (void)
WN2F_STATUS WN2F_binaryop (TOKEN_BUFFER tokens, WN *wn, WN2F_CONTEXT context)
WN2F_STATUS WN2F_unaryop (TOKEN_BUFFER tokens, WN *wn, WN2F_CONTEXT context)
WN2F_STATUS WN2F_intrinsic_op (TOKEN_BUFFER tokens, WN *wn, WN2F_CONTEXT context)
WN2F_STATUS WN2F_tas (TOKEN_BUFFER tokens, WN *wn, WN2F_CONTEXT context)
WN2F_STATUS WN2F_select (TOKEN_BUFFER tokens, WN *wn, WN2F_CONTEXT context)
WN2F_STATUS WN2F_cvt (TOKEN_BUFFER tokens, WN *wn, WN2F_CONTEXT context)
WN2F_STATUS WN2F_cvtl (TOKEN_BUFFER tokens, WN *wn, WN2F_CONTEXT context)
WN2F_STATUS WN2F_realpart (TOKEN_BUFFER tokens, WN *wn, WN2F_CONTEXT context)
WN2F_STATUS WN2F_imagpart (TOKEN_BUFFER tokens, WN *wn, WN2F_CONTEXT context)
WN2F_STATUS WN2F_paren (TOKEN_BUFFER tokens, WN *wn, WN2F_CONTEXT context)
WN2F_STATUS WN2F_complex (TOKEN_BUFFER tokens, WN *wn, WN2F_CONTEXT context)
WN2F_STATUS WN2F_ceil (TOKEN_BUFFER tokens, WN *wn, WN2F_CONTEXT context)
WN2F_STATUS WN2F_floor (TOKEN_BUFFER tokens, WN *wn, WN2F_CONTEXT context)
WN2F_STATUS WN2F_ashr (TOKEN_BUFFER tokens, WN *wn, WN2F_CONTEXT context)
WN2F_STATUS WN2F_lshr (TOKEN_BUFFER tokens, WN *wn, WN2F_CONTEXT context)
WN2F_STATUS WN2F_bnor (TOKEN_BUFFER tokens, WN *wn, WN2F_CONTEXT context)
WN2F_STATUS WN2F_recip (TOKEN_BUFFER tokens, WN *wn, WN2F_CONTEXT context)
WN2F_STATUS WN2F_rsqrt (TOKEN_BUFFER tokens, WN *wn, WN2F_CONTEXT context)
WN2F_STATUS WN2F_madd (TOKEN_BUFFER tokens, WN *wn, WN2F_CONTEXT context)
WN2F_STATUS WN2F_msub (TOKEN_BUFFER tokens, WN *wn, WN2F_CONTEXT context)
WN2F_STATUS WN2F_nmadd (TOKEN_BUFFER tokens, WN *wn, WN2F_CONTEXT context)
WN2F_STATUS WN2F_nmsub (TOKEN_BUFFER tokens, WN *wn, WN2F_CONTEXT context)
WN2F_STATUS WN2F_const (TOKEN_BUFFER tokens, WN *wn, WN2F_CONTEXT context)
WN2F_STATUS WN2F_intconst (TOKEN_BUFFER tokens, WN *wn, WN2F_CONTEXT context)
WN2F_STATUS WN2F_eq (TOKEN_BUFFER tokens, WN *wn, WN2F_CONTEXT context)
WN2F_STATUS WN2F_ne (TOKEN_BUFFER tokens, WN *wn, WN2F_CONTEXT context)
WN2F_STATUS WN2F_parm (TOKEN_BUFFER tokens, WN *wn, WN2F_CONTEXT context)
WN2F_STATUS WN2F_alloca (TOKEN_BUFFER tokens, WN *wn, WN2F_CONTEXT context)
WN2F_STATUS WN2F_dealloca (TOKEN_BUFFER tokens, WN *wn, WN2F_CONTEXT context)

Variables

BOOL W2F_OpenAD
static const char * Opc_Fname [NUMBER_OF_OPCODES]
static const FNAME_PARTIALMAP Fname_Map []
static const char * Conv_Op [MTYPE_LAST+1][MTYPE_LAST+1]
static const CONV_OP Conv_Op_Map []

Define Documentation

#define NUMBER_OF_CONV_OPS   sizeof(Conv_Op_Map)/sizeof(CONV_OP)

Definition at line 393 of file wn2f_expr.cxx.

Referenced by WN2F_Expr_initialize().

#define NUMBER_OF_FNAME_PARTIALMAPS   sizeof(Fname_Map) / sizeof(FNAME_PARTIALMAP)

Definition at line 109 of file wn2f_expr.cxx.

Referenced by WN2F_Expr_initialize().

#define NUMBER_OF_OPCODES   (OPCODE_LAST+1)

Definition at line 99 of file wn2f_expr.cxx.

#define WN2F_IS_ALPHABETIC (   opc)
Value:
((Opc_Fname[opc][0]>='a' && Opc_Fname[opc][0]<='z') || \
    (Opc_Fname[opc][0]>='A' && Opc_Fname[opc][0]<='Z') || \
    (Opc_Fname[opc][0]=='_'))

Definition at line 82 of file wn2f_expr.cxx.

#define WN2F_IS_FUNCALL_OP (   opc)    (Opc_Fname[opc]!=NULL && WN2F_IS_ALPHABETIC(opc))

Definition at line 90 of file wn2f_expr.cxx.

Referenced by WN2F_binaryop(), and WN2F_unaryop().

#define WN2F_IS_INFIX_OP (   opc)    (Opc_Fname[opc]!=NULL && !WN2F_IS_ALPHABETIC(opc))

Definition at line 87 of file wn2f_expr.cxx.

Referenced by WN2F_binaryop(), and WN2F_unaryop().


Typedef Documentation

typedef struct Conv_Op CONV_OP

Function Documentation

WN2F_STATUS WN2F_alloca ( TOKEN_BUFFER  tokens,
WN wn,
WN2F_CONTEXT  context 
)
static WN2F_STATUS WN2F_Binary_Substr_Op ( TOKEN_BUFFER  tokens,
WN op_wn,
const char *  op_name,
WN2F_CONTEXT  context 
) [static]
static void WN2F_Convert ( TOKEN_BUFFER  tokens,
MTYPE  from_mtype,
MTYPE  to_mtype 
) [static]

Definition at line 508 of file wn2f_expr.cxx.

References Append_Token_Special(), ASSERT_WARN, DIAG_W2F_UNEXPECTED_CVT, MTYPE_name, NULL, Prepend_Token_Special(), and Prepend_Token_String().

Referenced by WN2F_cvt(), and WN2F_cvtl().

Here is the call graph for this function:

void WN2F_Expr_finalize ( void  )

Definition at line 1065 of file wn2f_expr.cxx.

Referenced by WN2F_finalize().

void WN2F_Expr_initialize ( void  )

Definition at line 1041 of file wn2f_expr.cxx.

References name, NUMBER_OF_CONV_OPS, NUMBER_OF_FNAME_PARTIALMAPS, and Opc_Fname.

Referenced by WN2F_initialize().

static WN2F_STATUS WN2F_Intr_Infix ( TOKEN_BUFFER  tokens,
const char *  op_name,
WN opnd0,
WN opnd1,
BOOL  call_by_value,
WN2F_CONTEXT  context 
) [static]
WN2F_STATUS WN2F_select ( TOKEN_BUFFER  tokens,
WN wn,
WN2F_CONTEXT  context 
)

Definition at line 1270 of file wn2f_expr.cxx.

References Append_Token_Special(), Append_Token_String(), ASSERT_DBG_WARN, DIAG_UNIMPLEMENTED, EMPTY_WN2F_STATUS, FALSE, WN2F_translate(), WN_kid0(), WN_kid1(), and WN_kid2().

Here is the call graph for this function:

WN2F_STATUS WN2F_tas ( TOKEN_BUFFER  tokens,
WN wn,
WN2F_CONTEXT  context 
)

Definition at line 1257 of file wn2f_expr.cxx.

References ASSERT_DBG_FATAL, DIAG_W2F_UNEXPECTED_OPC, OPR_TAS, WN2F_translate(), WN_kid0(), and WN_opc_operator.

Here is the call graph for this function:


Variable Documentation

const char* Conv_Op[MTYPE_LAST+1][MTYPE_LAST+1] [static]

Definition at line 385 of file wn2f_expr.cxx.

Definition at line 395 of file wn2f_expr.cxx.

Definition at line 112 of file wn2f_expr.cxx.

Definition at line 100 of file wn2f_expr.cxx.

Referenced by WN2F_Expr_initialize(), WN2F_Funcall_Op(), and WN2F_Infix_Op().

Definition at line 164 of file w2f_driver.cxx.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines