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

#include <IntraProcAliasAnalysis.h>

Inheritance diagram for CompactRepresentation:
Collaboration diagram for CompactRepresentation:

Public Member Functions

unordered_map< SgNode
*, SgGraphNode * > 
getNodesMapping ()
 Get the Mapping from SgNode to SgGraphNode. More...
 
 CompactRepresentation ()
 
SgIncidenceDirectedGraphgetGraph () const
 Get the Graph. More...
 
unsigned long getHash () const
 Get the Hash. More...
 
 CompactRepresentation (const CompactRepresentation &copy)
 Copy constructor for CompactRepresentation. More...
 
CompactRepresentationoperator= (const CompactRepresentation &p)
 Assignment operator overload for Compactrepresentation. More...
 
void computeAliases (SgVariableSymbol *var, int derefLevel, vector< SgGraphNode * > &nodes)
 Given a VariableSymbol and Dereference level return list of aliases. More...
 
void computeAliases (SgGraphNode *node, int derefLevel, vector< SgGraphNode * > &)
 Given a graph node and Dereference level return list of aliases. More...
 
void addMustAliasRelation (const AliasRelationNode &left, const AliasRelationNode &right)
 Add a Must Relation to CompactRepresntation. More...
 
void addMayAliasRelation (const AliasRelationNode &left, const AliasRelationNode &right)
 Add a May Relation to CompactRepresntation. More...
 
void merge (const CompReprBase &that)
 Merge two CompactRepresentations. More...
 
bool operator== (const CompactRepresentation &that) const
 == Operator overload for CompactRepresentation. Implemented using hashing for efficiency More...
 
bool operator!= (const CompactRepresentation &that) const
 != Operator overload for CompactRepresentation. Implemented using hashing for efficiency More...
 
void toDot (const std::string &file_name)
 Prints CompactRepresentation to Dot File. More...
 
- Public Member Functions inherited from CompReprBase
 CompReprBase ()
 

Private Member Functions

SgGraphNodegetGraphNode (SgNode *node)
 Get Graph Node from SgNode. More...
 
void merge (SgIncidenceDirectedGraph *thatGraph)
 Merge a graph with this compact representation. More...
 
void updateHash (SgNode *from, SgNode *to)
 Update the Hash. More...
 
void init ()
 Initialize CompactRepresentation. More...
 
void addEdge (SgGraphNode *g_from, SgGraphNode *g_to)
 add a Graph Edge More...
 
void processNodes (std::ostream &o, SgGraphNode *n, std::set< SgGraphNode * > &explored)
 Process Nodes. More...
 
void printNodePlusEdges (std::ostream &o, SgGraphNode *node)
 Print Nodes and Edges. More...
 
void printNode (std::ostream &o, SgGraphNode *node)
 Print Nodes. More...
 
void printEdge (std::ostream &o, SgDirectedGraphEdge *edge, bool isInEdge)
 Print Edges. More...
 

Private Attributes

unordered_map< SgNode
*, SgGraphNode * > 
all_nodes
 A Map to hold the SgNode to SgGraphNode mapping. More...
 

Additional Inherited Members

- Protected Member Functions inherited from CompReprBase
 ~CompReprBase ()
 Protected Destructor to make sure the client code can't delete it. More...
 
- Protected Attributes inherited from CompReprBase
SgIncidenceDirectedGraphgraph
 
unsigned long hash
 

Detailed Description

Definition at line 114 of file IntraProcAliasAnalysis.h.

Constructor & Destructor Documentation

CompactRepresentation::CompactRepresentation ( )
inline

Definition at line 150 of file IntraProcAliasAnalysis.h.

References Dbg::init().

CompactRepresentation::CompactRepresentation ( const CompactRepresentation copy)

Copy constructor for CompactRepresentation.

Member Function Documentation

SgGraphNode* CompactRepresentation::getGraphNode ( SgNode node)
private

Get Graph Node from SgNode.

void CompactRepresentation::merge ( SgIncidenceDirectedGraph thatGraph)
private

Merge a graph with this compact representation.

void CompactRepresentation::updateHash ( SgNode from,
SgNode to 
)
private

Update the Hash.

void CompactRepresentation::init ( )
private

Initialize CompactRepresentation.

void CompactRepresentation::addEdge ( SgGraphNode g_from,
SgGraphNode g_to 
)
private

add a Graph Edge

void CompactRepresentation::processNodes ( std::ostream &  o,
SgGraphNode n,
std::set< SgGraphNode * > &  explored 
)
private

Process Nodes.

void CompactRepresentation::printNodePlusEdges ( std::ostream &  o,
SgGraphNode node 
)
private

Print Nodes and Edges.

void CompactRepresentation::printNode ( std::ostream &  o,
SgGraphNode node 
)
private

Print Nodes.

void CompactRepresentation::printEdge ( std::ostream &  o,
SgDirectedGraphEdge edge,
bool  isInEdge 
)
private

Print Edges.

unordered_map<SgNode *,SgGraphNode *> CompactRepresentation::getNodesMapping ( )
inline

Get the Mapping from SgNode to SgGraphNode.

Definition at line 149 of file IntraProcAliasAnalysis.h.

SgIncidenceDirectedGraph* CompactRepresentation::getGraph ( ) const
inlinevirtual

Get the Graph.

Implements CompReprBase.

Definition at line 153 of file IntraProcAliasAnalysis.h.

unsigned long CompactRepresentation::getHash ( ) const
inlinevirtual

Get the Hash.

Implements CompReprBase.

Definition at line 156 of file IntraProcAliasAnalysis.h.

CompactRepresentation& CompactRepresentation::operator= ( const CompactRepresentation p)

Assignment operator overload for Compactrepresentation.

void CompactRepresentation::computeAliases ( SgVariableSymbol var,
int  derefLevel,
vector< SgGraphNode * > &  nodes 
)
virtual

Given a VariableSymbol and Dereference level return list of aliases.

Implements CompReprBase.

void CompactRepresentation::computeAliases ( SgGraphNode node,
int  derefLevel,
vector< SgGraphNode * > &   
)
virtual

Given a graph node and Dereference level return list of aliases.

Implements CompReprBase.

void CompactRepresentation::addMustAliasRelation ( const AliasRelationNode left,
const AliasRelationNode right 
)
virtual

Add a Must Relation to CompactRepresntation.

Implements CompReprBase.

void CompactRepresentation::addMayAliasRelation ( const AliasRelationNode left,
const AliasRelationNode right 
)
virtual

Add a May Relation to CompactRepresntation.

Implements CompReprBase.

void CompactRepresentation::merge ( const CompReprBase that)
virtual

Merge two CompactRepresentations.

Implements CompReprBase.

bool CompactRepresentation::operator== ( const CompactRepresentation that) const

== Operator overload for CompactRepresentation. Implemented using hashing for efficiency

bool CompactRepresentation::operator!= ( const CompactRepresentation that) const

!= Operator overload for CompactRepresentation. Implemented using hashing for efficiency

void CompactRepresentation::toDot ( const std::string &  file_name)
virtual

Prints CompactRepresentation to Dot File.

Implements CompReprBase.

Member Data Documentation

unordered_map<SgNode *,SgGraphNode *> CompactRepresentation::all_nodes
private

A Map to hold the SgNode to SgGraphNode mapping.

Definition at line 117 of file IntraProcAliasAnalysis.h.


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