ROSE  0.9.6a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LivenessAnalysis Class Reference

#include <LivenessAnalysis.h>

Inheritance diagram for LivenessAnalysis:
Collaboration diagram for LivenessAnalysis:

Public Member Functions

 LivenessAnalysis (bool debug, DefUseAnalysis *dfa_p)
 
virtual ~LivenessAnalysis ()
 
SgFunctionDefinitiongetFunction (SgNode *node)
 
int getNumberOfNodesVisited ()
 
FilteredCFGNode< IsDFAFilterrun (SgFunctionDefinition *function, bool &abortme)
 
std::vector< SgInitializedName * > getIn (SgNode *sgNode)
 
std::vector< SgInitializedName * > getOut (SgNode *sgNode)
 
int getVisited (SgNode *n)
 
void setIn (SgNode *sgNode, std::vector< SgInitializedName * > vec)
 
void setOut (SgNode *sgNode, std::vector< SgInitializedName * > vec)
 
template<class T >
merge_no_dups (T &v1, T &v2)
 
void fixupStatementsINOUT (SgFunctionDefinition *funcDecl)
 
- Public Member Functions inherited from DefUseAnalysisAbstract
 DefUseAnalysisAbstract ()
 
virtual ~DefUseAnalysisAbstract ()
 
- Public Member Functions inherited from Support
template<typename T >
std::string ToString (T t)
 
std::string resBool (bool val)
 
template<typename T >
bool isContainedinVector (T filterNode, std::vector< T > worklist)
 
std::string getAppName (SgFunctionDeclaration *functionDeclaration)
 
std::string getFileNameString (std::string src)
 
std::string getFullName (SgFunctionDefinition *functionDef)
 

Private Member Functions

void printInAndOut (SgNode *sgNode)
 
template<typename T >
bool defuse (T cfgNode, bool *unhandled)
 
template<typename T >
bool hasANodeAboveCurrentChanged (T source)
 
template<class T >
void getAllNodesBelow (T source, std::vector< T > &visited)
 
template<class T >
void getAllNodesAbove (T source, std::vector< T > &visited)
 

Private Attributes

SgProjectproject
 
bool DEBUG_MODE
 
SgNodesearchNode
 
bool abort
 
int counter
 
std::map< SgNode
*, std::vector
< SgInitializedName * > > 
in
 
std::map< SgNode
*, std::vector
< SgInitializedName * > > 
out
 
int nrOfNodesVisitedPF
 
int breakPointForWhile
 
SgNodebreakPointForWhileNode
 
std::map< SgNode *, int > visited
 
bool forwardAlgo
 

Additional Inherited Members

- Protected Types inherited from DefUseAnalysisAbstract
typedef std::vector< std::pair
< SgInitializedName *, SgNode * > > 
multitype
 
typedef std::map< SgNode
*, multitype
tabletype
 
typedef FilteredCFGEdge
< IsDFAFilter
filteredCFGEdgeType
 
typedef FilteredCFGNode
< IsDFAFilter
filteredCFGNodeType
 
- Protected Member Functions inherited from DefUseAnalysisAbstract
bool searchMulti (const multitype *multi, SgInitializedName *initName)
 
bool searchVector (std::vector< filteredCFGNodeType > done, filteredCFGNodeType cfgNode)
 
SgInitializedNamegetInitName (SgNode *l_expr)
 
SgExpressionresolveCast (SgExpression *expr)
 
bool isDoubleExactEntry (const multitype *multi, SgInitializedName *name, SgNode *sgNode)
 
bool checkElementsForEquality (const multitype *t1, const multitype *t2)
 
template<typename T >
SgNodegetOtherInNode (T cfgNode, SgNode *oneNode)
 
template<typename T >
SgNodegetCFGPredNode (T cfgNode)
 
template<typename T >
void printCFGVector (std::vector< T > worklist)
 
- Protected Attributes inherited from DefUseAnalysisAbstract
bool DEBUG_MODE
 
bool DEBUG_MODE_EXTRA
 
DefUseAnalysisdfa
 
std::set< SgNode * > doNotVisitMap
 
std::map< SgNode *, bool > nodeChangedMap
 

Detailed Description

Definition at line 17 of file LivenessAnalysis.h.

Constructor & Destructor Documentation

LivenessAnalysis::LivenessAnalysis ( bool  debug,
DefUseAnalysis dfa_p 
)
inline

Definition at line 46 of file LivenessAnalysis.h.

virtual LivenessAnalysis::~LivenessAnalysis ( )
inlinevirtual

Definition at line 54 of file LivenessAnalysis.h.

Member Function Documentation

void LivenessAnalysis::printInAndOut ( SgNode sgNode)
private
template<typename T >
bool LivenessAnalysis::defuse ( cfgNode,
bool *  unhandled 
)
private
template<typename T >
bool LivenessAnalysis::hasANodeAboveCurrentChanged ( source)
private
template<class T >
void LivenessAnalysis::getAllNodesBelow ( source,
std::vector< T > &  visited 
)
private
template<class T >
void LivenessAnalysis::getAllNodesAbove ( source,
std::vector< T > &  visited 
)
private
SgFunctionDefinition* LivenessAnalysis::getFunction ( SgNode node)
int LivenessAnalysis::getNumberOfNodesVisited ( )
FilteredCFGNode< IsDFAFilter > LivenessAnalysis::run ( SgFunctionDefinition function,
bool &  abortme 
)
virtual
std::vector<SgInitializedName*> LivenessAnalysis::getIn ( SgNode sgNode)
inline
std::vector<SgInitializedName*> LivenessAnalysis::getOut ( SgNode sgNode)
inline
int LivenessAnalysis::getVisited ( SgNode n)
inline

Definition at line 64 of file LivenessAnalysis.h.

void LivenessAnalysis::setIn ( SgNode sgNode,
std::vector< SgInitializedName * >  vec 
)
inline
void LivenessAnalysis::setOut ( SgNode sgNode,
std::vector< SgInitializedName * >  vec 
)
inline
template<class T >
T LivenessAnalysis::merge_no_dups ( T &  v1,
T &  v2 
)
void LivenessAnalysis::fixupStatementsINOUT ( SgFunctionDefinition funcDecl)

Member Data Documentation

SgProject* LivenessAnalysis::project
private

Definition at line 19 of file LivenessAnalysis.h.

bool LivenessAnalysis::DEBUG_MODE
private

Definition at line 20 of file LivenessAnalysis.h.

SgNode* LivenessAnalysis::searchNode
private

Definition at line 22 of file LivenessAnalysis.h.

bool LivenessAnalysis::abort
private

Definition at line 25 of file LivenessAnalysis.h.

int LivenessAnalysis::counter
private

Definition at line 26 of file LivenessAnalysis.h.

std::map<SgNode*, std::vector<SgInitializedName*> > LivenessAnalysis::in
private

Definition at line 27 of file LivenessAnalysis.h.

std::map<SgNode*, std::vector<SgInitializedName*> > LivenessAnalysis::out
private

Definition at line 28 of file LivenessAnalysis.h.

int LivenessAnalysis::nrOfNodesVisitedPF
private

Definition at line 30 of file LivenessAnalysis.h.

int LivenessAnalysis::breakPointForWhile
private

Definition at line 33 of file LivenessAnalysis.h.

SgNode* LivenessAnalysis::breakPointForWhileNode
private

Definition at line 34 of file LivenessAnalysis.h.

std::map<SgNode*,int> LivenessAnalysis::visited
private

Definition at line 37 of file LivenessAnalysis.h.

bool LivenessAnalysis::forwardAlgo
private

Definition at line 43 of file LivenessAnalysis.h.


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