Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
st2f.cxx File Reference
#include <ctype.h>
#include <alloca.h>
#include <set>
#include <vector>
#include <string>
#include "whirl2f_common.h"
#include "PUinfo.h"
#include "tcon2f.h"
#include "wn2f.h"
#include "ty2f.h"
#include "st2f.h"
#include "init2f.h"
#include "cxx_memory.h"
#include "be_symtab.h"
#include "unparse_target.h"
#include "ty_ftn.h"
Include dependency graph for st2f.cxx:

Go to the source code of this file.

Typedefs

typedef std::set< int > PARMSET
typedef void(* ST2F_HANDLER_FUNC )(TOKEN_BUFFER, ST *)

Functions

static BOOL ST2F_Is_Dummy_Procedure (ST *st)
static void ST2F_Declare_Return_Type (TOKEN_BUFFER tokens, TY_IDX return_ty, const char *name)
static void ST2F_ignore (TOKEN_BUFFER tokens, ST *st)
static void ST2F_decl_error (TOKEN_BUFFER tokens, ST *st)
static void ST2F_decl_var (TOKEN_BUFFER tokens, ST *st)
static void ST2F_decl_func (TOKEN_BUFFER tokens, ST *st)
static void ST2F_decl_const (TOKEN_BUFFER tokens, ST *st)
static void ST2F_decl_type (TOKEN_BUFFER tokens, ST *st)
static void ST2F_decl_parameter (TOKEN_BUFFER tokens, ST *st)
static void ST2F_use_error (TOKEN_BUFFER tokens, ST *st)
static void ST2F_use_var (TOKEN_BUFFER tokens, ST *st)
static void ST2F_use_func (TOKEN_BUFFER tokens, ST *st)
static void ST2F_use_const (TOKEN_BUFFER tokens, ST *st)
static void ST2F_use_block (TOKEN_BUFFER tokens, ST *st)
static void ST2F_Define_Preg (const char *name, TY_IDX ty)
bool haveCommonBlockName (ST *st)
void ST2F_initialize ()
void ST2F_finalize ()
void ST2F_use_translate (TOKEN_BUFFER tokens, ST *st)
void ST2F_deref_translate (TOKEN_BUFFER tokens, ST *st)
void ST2F_decl_translate (TOKEN_BUFFER tokens, const ST *st)
static void collectst (WN *wn, PARMSET &tempset)
static void GetStSet (ST_IDX bnd, PARMSET &tempset)
void ReorderParms (ST **parms, INT32 num_params)
void ST2F_func_header (TOKEN_BUFFER tokens, ST *st, ST **params, INT32 num_params, BOOL is_altentry)
void ST2F_Use_Preg (TOKEN_BUFFER tokens, TY_IDX preg_ty, PREG_IDX preg_idx)
void ST2F_Declare_Tempvar (TY_IDX ty, UINT idx)
void ST2F_output_keyword (TOKEN_BUFFER tokens, ST *st)

Variables

BOOL Use_Purple_Array_Bnds_Placeholder
WNPU_Body
TOKEN_BUFFER param_tokens = New_Token_Buffer()
static const ST2F_HANDLER_FUNC ST2F_Decl_Handler [CLASS_COUNT]
static const ST2F_HANDLER_FUNC ST2F_Use_Handler [CLASS_COUNT]

Typedef Documentation

typedef std::set<int> PARMSET

Definition at line 106 of file st2f.cxx.

typedef void(* ST2F_HANDLER_FUNC)(TOKEN_BUFFER, ST *)

Definition at line 142 of file st2f.cxx.


Function Documentation

static void collectst ( WN wn,
PARMSET tempset 
) [static]

Definition at line 739 of file st2f.cxx.

References OPR_LDA, OPR_LDID, WN_kid(), WN_kid_count(), WN_opc_operator, and WN_st_idx().

Referenced by GetStSet().

Here is the call graph for this function:

static void GetStSet ( ST_IDX  bnd,
PARMSET tempset 
) [static]

Definition at line 754 of file st2f.cxx.

References collectst(), NULL, OPR_STID, ST_name(), ST_ptr(), WN_first(), WN_kid(), WN_next(), WN_operator(), and WN_st().

Referenced by ReorderParms().

Here is the call graph for this function:

bool haveCommonBlockName ( ST st)

Definition at line 548 of file st2f.cxx.

References NULL, and ST_name().

Referenced by ST2F_use_var(), and WN2F_Exit_PU_Block().

Here is the call graph for this function:

static void ST2F_decl_const ( TOKEN_BUFFER  tokens,
ST st 
) [static]

Definition at line 526 of file st2f.cxx.

References ASSERT_DBG_FATAL, DIAG_W2F_UNEXPECTED_SYMCLASS, FALSE, and ST_sym_class().

Here is the call graph for this function:

static void ST2F_decl_error ( TOKEN_BUFFER  tokens,
ST st 
) [static]

Definition at line 197 of file st2f.cxx.

References ASSERT_DBG_FATAL, DIAG_W2F_UNEXPECTED_SYMCLASS, FALSE, and ST_sym_class().

Here is the call graph for this function:

static void ST2F_Declare_Return_Type ( TOKEN_BUFFER  tokens,
TY_IDX  return_ty,
const char *  name 
) [static]
static void ST2F_Define_Preg ( const char *  name,
TY_IDX  ty 
) [static]
void ST2F_finalize ( )

Definition at line 704 of file st2f.cxx.

Referenced by W2F_Fini().

static void ST2F_ignore ( TOKEN_BUFFER  tokens,
ST st 
) [static]

Definition at line 191 of file st2f.cxx.

void ST2F_initialize ( )

Definition at line 697 of file st2f.cxx.

Referenced by W2F_Init().

static BOOL ST2F_Is_Dummy_Procedure ( ST st) [static]

Definition at line 1233 of file st2f.cxx.

References dummy, FALSE, KIND_FUNCTION, KIND_POINTER, SCLASS_FORMAL, ST_is_value_parm(), ST_sclass(), ST_type(), TRUE, TY_kind(), and TY_pointed().

Referenced by ST2F_decl_var().

Here is the call graph for this function:

void ST2F_output_keyword ( TOKEN_BUFFER  tokens,
ST st 
)

Definition at line 1279 of file st2f.cxx.

References Append_Token_String(), STC_val(), Targ_String_Address(), and Targ_String_Length().

Referenced by WN2F_call(), and WN2F_parm().

Here is the call graph for this function:

static void ST2F_use_block ( TOKEN_BUFFER  tokens,
ST st 
) [static]

Definition at line 679 of file st2f.cxx.

References Append_Token_String(), ASSERT_DBG_FATAL, CLASS_BLOCK, DIAG_W2F_UNEXPECTED_SYMCLASS, ST_name(), and ST_sym_class().

Here is the call graph for this function:

static void ST2F_use_const ( TOKEN_BUFFER  tokens,
ST st 
) [static]
static void ST2F_use_error ( TOKEN_BUFFER  tokens,
ST st 
) [static]

Definition at line 541 of file st2f.cxx.

References ASSERT_DBG_FATAL, DIAG_W2F_UNEXPECTED_SYMCLASS, FALSE, and ST_sym_class().

Here is the call graph for this function:

static void ST2F_use_func ( TOKEN_BUFFER  tokens,
ST st 
) [static]

Definition at line 643 of file st2f.cxx.

References Append_Token_String(), ASSERT_DBG_FATAL, CLASS_FUNC, DIAG_W2F_UNEXPECTED_SYMCLASS, Set_BE_ST_w2fc_referenced(), ST_sym_class(), and W2CF_Symtab_Nameof_St().

Here is the call graph for this function:

void ST2F_use_translate ( TOKEN_BUFFER  tokens,
ST st 
)

Definition at line 710 of file st2f.cxx.

References ST2F_Use_Handler, and ST_sym_class().

Referenced by WN2F_Block(), WN2F_call(), WN2F_Callsite_Directives(), WN2F_casegoto(), WN2F_Function_Call_Lhs(), WN2F_Offset_Symref(), WN2F_process_pragma(), and WN2F_return().

Here is the call graph for this function:


Variable Documentation

Definition at line 137 of file st2f.cxx.

Referenced by TY2C_prototype_params().

Definition at line 94 of file wn2f.cxx.

Referenced by ST2F_func_header(), and TY2F_Append_Array_Bnd_Ph().

Initial value:

Definition at line 158 of file st2f.cxx.

Referenced by ST2F_use_translate().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines