W2CF_TRANSLATOR Class Reference

#include <w2cf_translator.h>

Collaboration diagram for W2CF_TRANSLATOR:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 W2CF_TRANSLATOR (WN *pu, MEM_POOL *pool, BOOL translate_to_c)
 ~W2CF_TRANSLATOR ()
TY_IDX Get_Pointer_To (TY_IDX pointed_ty)
BOOL Is_A_Pragma_Clause (WN *clause) const
BOOL Whileloop_Looks_Like_Forloop (WN *stmt) const
BOOL Language_is_C () const
void Expr_To_File (ANL_FILE_MNGR *file_mngr, WN *expr)
void Expr_To_String (ANL_CBUF *cbuf, WN *expr)
void Stid_Lhs_To_String (ANL_CBUF *cbuf, ST *st, STAB_OFFSET ofst, TY_IDX ty, MTYPE mtype)
void Original_Symname_To_String (ANL_CBUF *cbuf, ST *sym)
void Transformed_Symname_To_String (ANL_CBUF *cbuf, ST *sym)
void A_Pragma_Expr_To_String (ANL_CBUF *cbuf, WN *apragma)
void ClauseList_To_String (ANL_CBUF *cbuf, WN **clause_list)
void Nest_Clauses_To_String (ANL_CBUF *cbuf, WN *nest_region, INT nest_levels)
void Prefetch_Attributes_To_String (ANL_CBUF *cbuf, WN *prefetch, INT32 size)

Private Member Functions

void _Reuse_Ptr (TY_IDX ptr)
void _Istore_Lhs_To_String (ANL_CBUF *cbuf, WN *lhs, STAB_OFFSET ofst, TY_IDX ty, MTYPE mtype)
void _Mp_Schedtype_To_String (ANL_CBUF *cbuf, WN_PRAGMA_SCHEDTYPE_KIND kind)
void _Clause_Exprs_To_String (ANL_CBUF *cbuf, WN_PRAGMA_ID id, WN **next_clause)
void _Rev_Clause_Exprs_To_String (ANL_CBUF *cbuf, WN_PRAGMA_ID id, WN **next_clause)
void _Clause_Symbols_To_String (ANL_CBUF *cbuf, WN_PRAGMA_ID id, WN **next_clause)
void _Array_Segment_To_String (ANL_CBUF *cbuf, WN_PRAGMA_ID id, WN **next_clause)
void _Prefetch_Attributes_To_String (ANL_CBUF *cbuf, WN *prefetch, INT32 size)
void _Skip_Ignored_Clauses (WN **next_clause)
void _Default_Kind_To_String (ANL_CBUF *cbuf, WN_PRAGMA_DEFAULT_KIND kind)

Static Private Member Functions

static void _Get_Ftn_Name (ANL_CBUF *cbuf, const ST *st)
static BOOL _Is_Ptr_Expr (WN *wn)
static TY_IDX _Get_Expr_Pointed_Ty (WN *wn)

Private Attributes

char * _strbuf
WN_pu
BOOL _translate_to_c
MEM_POOL_pool

Static Private Attributes

static const INT _Max_W2cf_String_Size = 1024*5

Detailed Description

Definition at line 63 of file w2cf_translator.h.


Constructor & Destructor Documentation

W2CF_TRANSLATOR::W2CF_TRANSLATOR ( WN pu,
MEM_POOL pool,
BOOL  translate_to_c 
)

Definition at line 515 of file w2cf_translator.cxx.

References _Max_W2cf_String_Size, _pool, _strbuf, and CXX_NEW_ARRAY.

W2CF_TRANSLATOR::~W2CF_TRANSLATOR (  ) 

Definition at line 526 of file w2cf_translator.cxx.

References _pool, _strbuf, and CXX_DELETE_ARRAY.


Member Function Documentation

void W2CF_TRANSLATOR::_Array_Segment_To_String ( ANL_CBUF cbuf,
WN_PRAGMA_ID  id,
WN **  next_clause 
) [private]
void W2CF_TRANSLATOR::_Clause_Exprs_To_String ( ANL_CBUF cbuf,
WN_PRAGMA_ID  id,
WN **  next_clause 
) [private]

Definition at line 338 of file w2cf_translator.cxx.

References A_Pragma_Expr_To_String(), FALSE, NULL, OPR_XPRAGMA, TRUE, WN_next(), WN_operator(), WN_pragma(), ANL_CBUF::Write_Char(), and ANL_CBUF::Write_String().

Referenced by ClauseList_To_String().

Here is the call graph for this function:

void W2CF_TRANSLATOR::_Clause_Symbols_To_String ( ANL_CBUF cbuf,
WN_PRAGMA_ID  id,
WN **  next_clause 
) [private]
void W2CF_TRANSLATOR::_Default_Kind_To_String ( ANL_CBUF cbuf,
WN_PRAGMA_DEFAULT_KIND  kind 
) [private]

Definition at line 312 of file w2cf_translator.cxx.

References WN_PRAGMA_DEFAULT_NONE, WN_PRAGMA_DEFAULT_PRIVATE, WN_PRAGMA_DEFAULT_SHARED, and ANL_CBUF::Write_String().

Here is the call graph for this function:

TY_IDX W2CF_TRANSLATOR::_Get_Expr_Pointed_Ty ( WN wn  )  [static, private]
void W2CF_TRANSLATOR::_Get_Ftn_Name ( ANL_CBUF cbuf,
const ST st 
) [static, private]
BOOL W2CF_TRANSLATOR::_Is_Ptr_Expr ( WN wn  )  [static, private]

Definition at line 166 of file w2cf_translator.cxx.

References FALSE, OPR_ADD, OPR_ARRAY, OPR_ILOAD, OPR_LDA, OPR_LDID, TRUE, TY_IS_POINTER, WN_kid0(), WN_kid1(), WN_operator(), and WN_ty().

Referenced by _Get_Expr_Pointed_Ty(), A_Pragma_Expr_To_String(), and Prefetch_Attributes_To_String().

Here is the call graph for this function:

void W2CF_TRANSLATOR::_Istore_Lhs_To_String ( ANL_CBUF cbuf,
WN lhs,
STAB_OFFSET  ofst,
TY_IDX  ty,
MTYPE  mtype 
) [private]
void W2CF_TRANSLATOR::_Mp_Schedtype_To_String ( ANL_CBUF cbuf,
WN_PRAGMA_SCHEDTYPE_KIND  kind 
) [private]
void W2CF_TRANSLATOR::_Prefetch_Attributes_To_String ( ANL_CBUF cbuf,
WN prefetch,
INT32  size 
) [private]
void W2CF_TRANSLATOR::_Reuse_Ptr ( TY_IDX  ptr  )  [private]
void W2CF_TRANSLATOR::_Rev_Clause_Exprs_To_String ( ANL_CBUF cbuf,
WN_PRAGMA_ID  id,
WN **  next_clause 
) [private]
void W2CF_TRANSLATOR::_Skip_Ignored_Clauses ( WN **  next_clause  )  [private]
void W2CF_TRANSLATOR::A_Pragma_Expr_To_String ( ANL_CBUF cbuf,
WN apragma 
)
void W2CF_TRANSLATOR::ClauseList_To_String ( ANL_CBUF cbuf,
WN **  clause_list 
)
void W2CF_TRANSLATOR::Expr_To_File ( ANL_FILE_MNGR file_mngr,
WN expr 
)

Definition at line 625 of file w2cf_translator.cxx.

References _pu, _translate_to_c, ANL_FILE_MNGR::File(), W2C_Pop_PU(), W2C_Push_PU(), W2C_Translate_Wn(), W2F_Pop_PU(), W2F_Push_PU(), and W2F_Translate_Wn().

Here is the call graph for this function:

void W2CF_TRANSLATOR::Expr_To_String ( ANL_CBUF cbuf,
WN expr 
)
TY_IDX W2CF_TRANSLATOR::Get_Pointer_To ( TY_IDX  pointed_ty  ) 

Definition at line 580 of file w2cf_translator.cxx.

References FALSE, Make_Pointer_Type(), NULL, and TY_pointer().

Referenced by A_Pragma_Expr_To_String(), and Prefetch_Attributes_To_String().

Here is the call graph for this function:

BOOL W2CF_TRANSLATOR::Is_A_Pragma_Clause ( WN clause  )  const
BOOL W2CF_TRANSLATOR::Language_is_C (  )  const [inline]
void W2CF_TRANSLATOR::Nest_Clauses_To_String ( ANL_CBUF cbuf,
WN nest_region,
INT  nest_levels 
)
void W2CF_TRANSLATOR::Original_Symname_To_String ( ANL_CBUF cbuf,
ST sym 
)
void W2CF_TRANSLATOR::Prefetch_Attributes_To_String ( ANL_CBUF cbuf,
WN prefetch,
INT32  size 
)
void W2CF_TRANSLATOR::Stid_Lhs_To_String ( ANL_CBUF cbuf,
ST st,
STAB_OFFSET  ofst,
TY_IDX  ty,
MTYPE  mtype 
)
void W2CF_TRANSLATOR::Transformed_Symname_To_String ( ANL_CBUF cbuf,
ST sym 
)

Definition at line 703 of file w2cf_translator.cxx.

References _pu, _translate_to_c, W2C_Object_Name(), W2C_Pop_PU(), W2C_Push_PU(), W2F_Object_Name(), W2F_Pop_PU(), W2F_Push_PU(), WN_func_body, and ANL_CBUF::Write_String().

Here is the call graph for this function:

BOOL W2CF_TRANSLATOR::Whileloop_Looks_Like_Forloop ( WN stmt  )  const

Member Data Documentation

const INT W2CF_TRANSLATOR::_Max_W2cf_String_Size = 1024*5 [static, private]

Definition at line 71 of file w2cf_translator.h.

Referenced by W2CF_TRANSLATOR(), and ~W2CF_TRANSLATOR().

char* W2CF_TRANSLATOR::_strbuf [private]

The documentation for this class was generated from the following files:

Generated on Tue Nov 17 06:42:08 2009 for Open64 (mfef90, whirl2f, and IR tools) by  doxygen 1.6.1