Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
wn2f.cxx File Reference
#include <alloca.h>
#include <set>
#include "x_string.h"
#include "whirl2f_common.h"
#include "PUinfo.h"
#include "wn2f.h"
#include "wn2f_stmt.h"
#include "wn2f_pragma.h"
#include "wn2f_expr.h"
#include "wn2f_load_store.h"
#include "wn2f_io.h"
#include "st2f.h"
#include "ty2f.h"
#include "tcon2f.h"
#include "unparse_target.h"
#include "ty_ftn.h"
Include dependency graph for wn2f.cxx:

Go to the source code of this file.

Classes

struct  WN2F_Opr_Handler
class  LOC_INFO

Defines

#define NUMBER_OF_OPERATORS   (OPERATOR_LAST + 1)
#define NUMBER_OF_OPR_HANDLERS   (sizeof(WN2F_Opr_Handler_List) / sizeof(WN2F_OPR_HANDLER))

Typedefs

typedef WN2F_STATUS(* WN2F_HANDLER_FUNC )(TOKEN_BUFFER, WN *, WN2F_CONTEXT)
typedef struct WN2F_Opr_Handler WN2F_OPR_HANDLER

Functions

static void WN2F_End_Routine_Strings (TOKEN_BUFFER tokens, INT32 func_id)
static WN2F_STATUS WN2F_ignore (TOKEN_BUFFER tokens, WN *wn, WN2F_CONTEXT context)
static WN2F_STATUS WN2F_unsupported (TOKEN_BUFFER tokens, WN *wn, WN2F_CONTEXT context)
static WN2F_STATUS WN2F_func_entry (TOKEN_BUFFER tokens, WN *wn, WN2F_CONTEXT context)
static WN2F_STATUS WN2F_altentry (TOKEN_BUFFER tokens, WN *wn, WN2F_CONTEXT context)
static WN2F_STATUS WN2F_comment (TOKEN_BUFFER tokens, WN *wn, WN2F_CONTEXT context)
void WN2F_Stmt_Newline (TOKEN_BUFFER tokens, const char *label, SRCPOS srcpos, WN2F_CONTEXT context)
static void WN2F_Begin_Prompf_Transformed_Func (TOKEN_BUFFER tokens, INT32 func_id)
static void WN2F_End_Prompf_Transformed_Func (TOKEN_BUFFER tokens, INT32 func_id)
WN_OFFSET WN2F_Sum_Offsets (WN *addr)
void WN2F_Address_Of (TOKEN_BUFFER tokens)
WN2F_STATUS WN2F_Offset_Symref (TOKEN_BUFFER tokens, ST *st, TY_IDX addr_ty, TY_IDX object_ty, STAB_OFFSET offset, WN2F_CONTEXT context)
WN2F_STATUS WN2F_Offset_Memref (TOKEN_BUFFER tokens, WN *addr, TY_IDX addr_ty, TY_IDX object_ty, STAB_OFFSET offset, WN2F_CONTEXT context)
void WN2F_Entry_Point (TOKEN_BUFFER tokens, WN *wn, WN2F_CONTEXT context)
void WN2F_initialize (void)
void WN2F_finalize (void)
void WN2F_dump_context (WN2F_CONTEXT c)
WN2F_STATUS WN2F_translate (TOKEN_BUFFER tokens, WN *wn, WN2F_CONTEXT context)
WN2F_STATUS WN2F_translate_purple_main (TOKEN_BUFFER tokens, WN *pu, const char *region_name, WN2F_CONTEXT context)
void WN2F_Emit_End_Stmt (TOKEN_BUFFER tokens, BOOL start)

Variables

WN_MAPW2F_Construct_Map
BOOL W2F_Prompf_Emission
char * sgi_comment_str = "CSGI$ "
static BOOL PU_Need_End_Contains = FALSE
static BOOL PU_Dangling_Contains = FALSE
static INT32 PU_Host_Func_Id = 0
WNPU_Body = NULL
TOKEN_BUFFER Data_Stmt_Tokens = NULL
static WN2F_HANDLER_FUNC WN2F_Handler [NUMBER_OF_OPERATORS]
static const WN2F_OPR_HANDLER WN2F_Opr_Handler_List []

Define Documentation

#define NUMBER_OF_OPERATORS   (OPERATOR_LAST + 1)

Definition at line 140 of file wn2f.cxx.

Referenced by WN2F_initialize().

Definition at line 149 of file wn2f.cxx.

Referenced by WN2F_initialize().


Typedef Documentation

Definition at line 112 of file wn2f.cxx.


Function Documentation

void WN2F_Address_Of ( TOKEN_BUFFER  tokens)

Definition at line 505 of file wn2f.cxx.

References Append_Token_Special(), Prepend_Token_Special(), and Prepend_Token_String().

Referenced by INITVKIND_symoff().

Here is the call graph for this function:

WN2F_STATUS WN2F_altentry ( TOKEN_BUFFER  tokens,
WN wn,
WN2F_CONTEXT  context 
) [static]

Definition at line 1119 of file wn2f.cxx.

References ASSERT_DBG_FATAL, DIAG_W2F_UNEXPECTED_OPC, EMPTY_WN2F_STATUS, OPC_ALTENTRY, WN2F_Entry_Point(), and WN_opcode().

Here is the call graph for this function:

static void WN2F_Begin_Prompf_Transformed_Func ( TOKEN_BUFFER  tokens,
INT32  func_id 
) [static]

Definition at line 304 of file wn2f.cxx.

References Append_F77_Directive_Newline(), Append_Token_String(), Number_as_String(), and sgi_comment_str.

Referenced by WN2F_func_entry().

Here is the call graph for this function:

WN2F_STATUS WN2F_comment ( TOKEN_BUFFER  tokens,
WN wn,
WN2F_CONTEXT  context 
) [static]

Definition at line 1135 of file wn2f.cxx.

References ASSERT_DBG_FATAL, DIAG_W2F_UNEXPECTED_OPC, EMPTY_WN2F_STATUS, Index_To_Str(), OPC_COMMENT, ux_strncasecmp(), WHIRL2F_Append_Comment(), WN_GetComment(), and WN_opcode().

Here is the call graph for this function:

static void WN2F_End_Prompf_Transformed_Func ( TOKEN_BUFFER  tokens,
INT32  func_id 
) [static]

Definition at line 312 of file wn2f.cxx.

References Append_F77_Directive_Newline(), Append_Token_String(), Number_as_String(), and sgi_comment_str.

Referenced by WN2F_Emit_End_Stmt(), and WN2F_End_Routine_Strings().

Here is the call graph for this function:

void WN2F_Entry_Point ( TOKEN_BUFFER  tokens,
WN wn,
WN2F_CONTEXT  context 
)
void WN2F_finalize ( void  )

Definition at line 1194 of file wn2f.cxx.

References Stab_Free_Tmpvars(), WN2F_Expr_finalize(), WN2F_Io_finalize(), WN2F_Load_Store_finalize(), and WN2F_Stmt_finalize().

Referenced by W2F_Fini().

Here is the call graph for this function:

static WN2F_STATUS WN2F_ignore ( TOKEN_BUFFER  tokens,
WN wn,
WN2F_CONTEXT  context 
) [static]

Definition at line 1038 of file wn2f.cxx.

References EMPTY_WN2F_STATUS.

void WN2F_initialize ( void  )
WN2F_STATUS WN2F_Offset_Symref ( TOKEN_BUFFER  tokens,
ST st,
TY_IDX  addr_ty,
TY_IDX  object_ty,
STAB_OFFSET  offset,
WN2F_CONTEXT  context 
)

Definition at line 476 of file wn2f.cxx.

References OPR_ADD, OPR_ARRAY, OPR_ARRAYEXP, OPR_ARRSECTION, OPR_INTCONST, WN2F_Sum_Offsets(), WN_const_val(), WN_kid0(), WN_kid1(), and WN_operator().

Referenced by WN2F_Offset_Memref(), WN2F_String_Argument(), and WN2F_Sum_Offsets().

Here is the call graph for this function:

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

Definition at line 1232 of file wn2f.cxx.

References OPCODE_is_boolean(), reset_WN2F_CONTEXT_has_logical_arg, reset_WN2F_CONTEXT_is_logical_arg, ret, set_WN2F_CONTEXT_has_logical_arg, set_WN2F_CONTEXT_is_logical_arg, wn, WN2F_CONTEXT_has_logical_arg, WN2F_CONTEXT_no_parenthesis, WN2F_expr_has_boolean_arg, WN2F_Handler, WN_opc_operator, and WN_opcode().

Referenced by Append_Distribution(), W2F_Outfile_Translate_Pu(), W2F_Translate_Wn(), W2F_Translate_Wn_Str(), WN2F_agoto(), WN2F_alloca(), WN2F_Append_Value_Reference(), WN2F_ar_construct(), WN2F_array(), WN2F_arrayexp(), WN2F_arrsection(), WN2F_Arrsection_Slots(), WN2F_block(), WN2F_call(), WN2F_comma(), WN2F_compgoto(), WN2F_complex(), WN2F_condbr(), WN2F_cvt(), WN2F_cvtl(), WN2F_dealloca(), WN2F_Denormalize_Array_Idx(), WN2F_do_loop(), WN2F_do_while(), WN2F_eq(), WN2F_eval(), WN2F_Expr_Plus_Literal(), WN2F_func_entry(), WN2F_if(), WN2F_iload(), WN2F_imagpart(), WN2F_implied_do(), WN2F_intrinsic_op(), WN2F_io_control(), WN2F_io_format(), WN2F_io_list(), WN2F_io_unit(), WN2F_ios_decode(), WN2F_ios_definefile(), WN2F_ios_encode(), WN2F_ios_inqlength(), WN2F_istore(), WN2F_mstore(), WN2F_ne(), WN2F_noio_implied_do(), WN2F_Normalize_Idx_To_Onedim(), WN2F_nullify_stmt(), WN2F_Offset_Memref(), WN2F_OLD_Den_Arr_Idx(), WN2F_paren(), WN2F_parm(), WN2F_prefetch(), WN2F_Prepend_Value_Reference(), WN2F_pstid(), WN2F_pstore(), WN2F_realpart(), WN2F_return(), WN2F_return_val(), WN2F_select(), WN2F_src_triplet(), WN2F_stid(), WN2F_strctfld(), WN2F_String_Argument(), WN2F_Substring(), WN2F_switch(), WN2F_tas(), WN2F_tempvar_rhs(), WN2F_Translate_Arithmetic_Operand(), WN2F_Translate_DoLoop_Bound(), WN2F_triplet(), WN2F_where(), and WN2F_while_do().

Here is the call graph for this function:

static WN2F_STATUS WN2F_unsupported ( TOKEN_BUFFER  tokens,
WN wn,
WN2F_CONTEXT  context 
) [static]

Definition at line 1045 of file wn2f.cxx.

References Append_Token_String(), ASSERT_WARN, Concat3_Strings(), DIAG_W2F_CANNOT_HANDLE_OPC, EMPTY_WN2F_STATUS, FALSE, NULL, WN2F_Stmt_Newline(), WN_Get_Linenum(), WN_opc_name, and WN_opcode().

Referenced by WN2F_initialize().

Here is the call graph for this function:


Variable Documentation

Definition at line 94 of file wn2f.cxx.

Referenced by ST2F_func_header(), and TY2F_Append_Array_Bnd_Ph().

Definition at line 91 of file wn2f.cxx.

Referenced by WN2F_Emit_End_Stmt(), and WN2F_End_Routine_Strings().

INT32 PU_Host_Func_Id = 0 [static]

Definition at line 92 of file wn2f.cxx.

Referenced by WN2F_Emit_End_Stmt(), and WN2F_End_Routine_Strings().

Definition at line 90 of file wn2f.cxx.

Referenced by WN2F_Emit_End_Stmt(), and WN2F_End_Routine_Strings().

Definition at line 172 of file w2f_driver.cxx.

Definition at line 171 of file w2f_driver.cxx.

Definition at line 141 of file wn2f.cxx.

Definition at line 152 of file wn2f.cxx.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines