OpenADFortTk (basic)
whirl2xaif::PUXlationContext Class Reference

#include <PUXlationContext.h>

Collaboration diagram for whirl2xaif::PUXlationContext:

List of all members.

Public Member Functions

 PUXlationContext (const std::string &anOriginator, Open64IRInterface &anIrInterface)
 ~PUXlationContext ()
void createXlationContext ()
void createXlationContext (XlationContext::Flags_E f)
void createXlationContext (XlationContext::Flags_E f, WN *aWNp)
void deleteXlationContext ()
XlationContextcurrentXlationContext ()
WN * getMostRecentWN ()
WN * findParentWN (WN *)
WN * findParentBlockWN (WN *)
fortTkSupport::WhirlParentMapgetWNParentMap () const
void setWNParentMap (fortTkSupport::WhirlParentMap *aWhirlParentMapP)
fortTkSupport::SymTabId findSymTabId (ST_TAB *stab)
fortTkSupport::SymTabToSymTabIdMapgetSymTabToIdMap () const
void setSymTabToIdMap (fortTkSupport::SymTabToSymTabIdMap *aSymTabToSymTabIdMapP)
fortTkSupport::PUId findPUId (PU_Info *pu)
fortTkSupport::PUToPUIdMapgetPUToIdMap () const
void setPUToIdMap (fortTkSupport::PUToPUIdMap *aPUToPUIdMapP)
fortTkSupport::WNId findWNId (WN *wn)
fortTkSupport::WNToWNIdMapgetWNToIdMap () const
void setWNToIdMap (fortTkSupport::WNToWNIdMap *x)
int findUDDUChainId (WN *wnexpr)
OA::OA_ptr
< OA::XAIF::UDDUChainsXAIF > 
getUDDUChains () const
void setUDDUChains (OA::OA_ptr< OA::XAIF::UDDUChainsXAIF > x)
int findDoChainId (WN *wn)
OA::OA_ptr
< OA::XAIF::ReachDefsOverwriteXAIF > 
getDoChains () const
void setDoChains (OA::OA_ptr< OA::XAIF::ReachDefsOverwriteXAIF > x)
fortTkSupport::ScalarizedReffindScalarizedRef (WN *wn)
fortTkSupport::ScalarizedRefTab_W2XgetScalarizedRefTab () const
void setScalarizedRefTab (fortTkSupport::ScalarizedRefTab_W2X *aScalarizedRefTab_W2Xp)
int isActiveSym (ST *st)
int isActiveStmt (PU_Info *pu, WN *wn)
int isActiveVarRef (PU_Info *pu, WN *wn)
void setActivity (OA::OA_ptr< OA::Activity::InterActiveFortran > anActivityMap)
void setAlias (OA::OA_ptr< OA::Alias::InterAliasMap > anAliasMap)
int getAliasMapKey (WN *wnexpr)
void setAliasMapXAIF (OA::OA_ptr< OA::XAIF::AliasMapXAIF > anAliasMapXAIF)
void dump (std::ostream &o, const std::string &indent) const
void ddump () const
bool isF90 () const
void setF90 (bool aFlag)
Open64IRInterfacegetIrInterface ()

Private Types

typedef std::list< XlationContextXlationContextStack

Private Member Functions

 PUXlationContext (const XlationContext &x)
 PUXlationContext ()
PUXlationContextoperator= (const PUXlationContext &x)
void PushNewXlationContext (XlationContext::Flags_E f, WN *aWNp)

Private Attributes

fortTkSupport::WhirlParentMapmyWNParentMapP
fortTkSupport::SymTabToSymTabIdMapmyStab2idMapP
fortTkSupport::PUToPUIdMapmyPU2idMapP
fortTkSupport::WNToWNIdMapmyWN2idMapP
OA::OA_ptr
< OA::Activity::InterActiveFortran > 
myActivity
OA::OA_ptr
< OA::Alias::InterAliasMap > 
myAlias
OA::OA_ptr
< OA::XAIF::AliasMapXAIF > 
myAliasMapXAIF_p
OA::OA_ptr
< OA::XAIF::UDDUChainsXAIF > 
myUdduchains
OA::OA_ptr
< OA::XAIF::ReachDefsOverwriteXAIF > 
myDoChains
fortTkSupport::ScalarizedRefTab_W2XmyScalarizedRefTab_W2Xp
XlationContextStack myXlationContextStack
std::string myOriginator
bool myF90Flag
Open64IRInterfacemyIrInterface

Detailed Description

PUXlationContext for whirl2xaif: Represents information about a WHIRL->XAIF translation context. Designed to convey information about a parent context to children contexts.

PUXlationContext maintains an internal stack of XlationContexts, allowing users to 1) create new child contexts (push), 2) destroy and return to parent contexts (pop) and 3) query the current context. The current translation context provides information about the containing WHIRL context. There should always be at least one context on the stack. (Upon creation, one context exists on the stack.) Because this class is designed to represent information about one procedure (WHIRL PU) at a time, information that applies for a whole PU is located outside instead of inside the stack.

For whirl2xaif, a translation context for an XAIF construct corresponds to its parent construct. Thus there will be one translation context on the stack for every 'indendation' level. Context flags indicate significant facts about the parent construct and will typically correspond to XAIF concepts (as opposed to WHIRL).

Definition at line 46 of file PUXlationContext.h.


Member Typedef Documentation

Use a list instead a stack so that we can easily examine contents. The top of the stack will be the *front* of the list. (push_front, pop_front).

Definition at line 225 of file PUXlationContext.h.


Constructor & Destructor Documentation

whirl2xaif::PUXlationContext::PUXlationContext ( const std::string &  anOriginator,
Open64IRInterface anIrInterface 
)

the originator is some name that we can use for debugging purposes

Definition at line 10 of file PUXlationContext.cxx.

References myXlationContextStack.


Member Function Documentation

Create a new child context and make it the current context. We pass flags that should apply to the new context. Note that that these flags *do not* override any inherited flags.

Definition at line 31 of file PUXlationContext.cxx.

References PushNewXlationContext().

Here is the call graph for this function:

Create a new child context and make it the current context. We pass flags that should apply to the new context. Note that that these flags *do not* override any inherited flags. Also pass along a whirl node.

Definition at line 35 of file PUXlationContext.cxx.

References PushNewXlationContext().

Here is the call graph for this function:

Definition at line 520 of file PUXlationContext.cxx.

References dump().

Here is the call graph for this function:

void whirl2xaif::PUXlationContext::dump ( std::ostream &  o,
const std::string &  indent 
) const

Definition at line 511 of file PUXlationContext.cxx.

References myOriginator, and myXlationContextStack.

Referenced by ddump().

Definition at line 85 of file PUXlationContext.cxx.

References fortTkSupport::WhirlParentMap::FindBlock(), FORTTK_DIE, and myWNParentMapP.

Referenced by whirl2xaif::xlate_PassiveStmt().

Here is the call graph for this function:

Definition at line 138 of file PUXlationContext.cxx.

References fortTkSupport::BaseMap< FromTy, ToTy >::Find(), FORTTK_DIE, and myPU2idMapP.

Referenced by whirl2xaif::Whirl2Xaif::translatePU().

Here is the call graph for this function:

OA::OA_ptr< OA::XAIF::ReachDefsOverwriteXAIF > whirl2xaif::PUXlationContext::getDoChains ( ) const

Definition at line 355 of file PUXlationContext.cxx.

References FORTTK_DIE, and myDoChains.

get WN* the most recent non-NULL WN.

Definition at line 62 of file PUXlationContext.cxx.

References FORTTK_DIE, and myXlationContextStack.

Referenced by whirl2xaif::xlate_MemRef(), whirl2xaif::xlate_PregRef(), and whirl2xaif::xlate_SymRef().

OA::OA_ptr< OA::XAIF::UDDUChainsXAIF > whirl2xaif::PUXlationContext::getUDDUChains ( ) const

Definition at line 307 of file PUXlationContext.cxx.

References FORTTK_DIE, and myUdduchains.

int whirl2xaif::PUXlationContext::isActiveStmt ( PU_Info *  pu,
WN *  wn 
)

Definition at line 459 of file PUXlationContext.cxx.

References FORTTK_DIE, and myActivity.

int whirl2xaif::PUXlationContext::isActiveVarRef ( PU_Info *  pu,
WN *  wn 
)

Definition at line 468 of file PUXlationContext.cxx.

References FORTTK_DIE, and myActivity.

Definition at line 524 of file PUXlationContext.cxx.

References myF90Flag.

Referenced by whirl2xaif::TY2F_scalar().

PUXlationContext& whirl2xaif::PUXlationContext::operator= ( const PUXlationContext x) [private]

no def

void whirl2xaif::PUXlationContext::setActivity ( OA::OA_ptr< OA::Activity::InterActiveFortran >  anActivityMap)

Definition at line 477 of file PUXlationContext.cxx.

References FORTTK_DIE, and myActivity.

void whirl2xaif::PUXlationContext::setAlias ( OA::OA_ptr< OA::Alias::InterAliasMap >  anAliasMap)

Definition at line 485 of file PUXlationContext.cxx.

References FORTTK_DIE, and myAlias.

void whirl2xaif::PUXlationContext::setAliasMapXAIF ( OA::OA_ptr< OA::XAIF::AliasMapXAIF >  anAliasMapXAIF)

Definition at line 493 of file PUXlationContext.cxx.

References FORTTK_DIE, FORTTK_MSG, and myAliasMapXAIF_p.

Referenced by whirl2xaif::xlate_FUNC_ENTRY().

void whirl2xaif::PUXlationContext::setDoChains ( OA::OA_ptr< OA::XAIF::ReachDefsOverwriteXAIF >  x)

Definition at line 361 of file PUXlationContext.cxx.

References FORTTK_DIE, FORTTK_MSG, and myDoChains.

Referenced by whirl2xaif::xlate_FUNC_ENTRY().

Definition at line 528 of file PUXlationContext.cxx.

References myF90Flag.

Referenced by whirl2xaif::Whirl2Xaif::translatePU().

Definition at line 152 of file PUXlationContext.cxx.

References FORTTK_DIE, and myPU2idMapP.

Definition at line 130 of file PUXlationContext.cxx.

References FORTTK_DIE, and myStab2idMapP.

void whirl2xaif::PUXlationContext::setUDDUChains ( OA::OA_ptr< OA::XAIF::UDDUChainsXAIF >  x)

Definition at line 313 of file PUXlationContext.cxx.

References FORTTK_DIE, FORTTK_MSG, and myUdduchains.

Referenced by whirl2xaif::xlate_FUNC_ENTRY().


Member Data Documentation

OA::OA_ptr<OA::Activity::InterActiveFortran> whirl2xaif::PUXlationContext::myActivity [private]

we don't own this

Definition at line 193 of file PUXlationContext.h.

Referenced by isActiveStmt(), isActiveSym(), isActiveVarRef(), and setActivity().

OA::OA_ptr<OA::Alias::InterAliasMap> whirl2xaif::PUXlationContext::myAlias [private]

we don't own this

Definition at line 198 of file PUXlationContext.h.

Referenced by isActiveSym(), and setAlias().

OA::OA_ptr<OA::XAIF::AliasMapXAIF> whirl2xaif::PUXlationContext::myAliasMapXAIF_p [private]

we don't own this

Definition at line 203 of file PUXlationContext.h.

Referenced by getAliasMapKey(), and setAliasMapXAIF().

OA::OA_ptr<OA::XAIF::ReachDefsOverwriteXAIF> whirl2xaif::PUXlationContext::myDoChains [private]

we don't own this

Definition at line 213 of file PUXlationContext.h.

Referenced by findDoChainId(), getDoChains(), and setDoChains().

Definition at line 243 of file PUXlationContext.h.

Referenced by isF90(), and setF90().

some string passed to the ctor to indicate who created this

Definition at line 241 of file PUXlationContext.h.

Referenced by dump().

we don't own this

Definition at line 183 of file PUXlationContext.h.

Referenced by findPUId(), getPUToIdMap(), and setPUToIdMap().

OA::OA_ptr<OA::XAIF::UDDUChainsXAIF> whirl2xaif::PUXlationContext::myUdduchains [private]

we don't own this

Definition at line 208 of file PUXlationContext.h.

Referenced by findUDDUChainId(), getUDDUChains(), and setUDDUChains().

we don't own this

Definition at line 188 of file PUXlationContext.h.

Referenced by findWNId(), getWNToIdMap(), and setWNToIdMap().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines