OpenADFortTk (including Open64 and OpenAnalysis references)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
OA::CallGraph::CallGraph Class Reference

#include <CallGraph.hpp>

Inheritance diagram for OA::CallGraph::CallGraph:
Inheritance graph
Collaboration diagram for OA::CallGraph::CallGraph:
Collaboration graph

Public Types

typedef std::map< SymHandle,
OA_ptr< Node > > 
SymToNodeMapType
 

Public Member Functions

 CallGraph (const SymHandle name)
 
 CallGraph ()
 
virtual ~CallGraph ()
 
void connect (OA_ptr< NodeInterface > src, OA_ptr< NodeInterface > dst, EdgeType type, CallHandle call)
 
void disconnect (OA_ptr< EdgeInterface > e)
 
OA_ptr< NodefindOrAddNode (SymHandle sym)
 
void addToCallProcSetMap (CallHandle call, ProcHandle proc)
 
void dump (std::ostream &os, OA_ptr< IRHandlesIRInterface > ir)
 
virtual void output (OA::IRHandlesIRInterface &ir)
 
const OA::SymHandle subprog_name ()
 
OA_ptr< NodesIteratorInterfacegetCallGraphNodesIterator () const
 
OA_ptr< EdgesIteratorInterfacegetCallGraphEdgesIterator () const
 
OA_ptr< NodesIteratorInterfacegetCallGraphReversePostDFSIterator (DGraph::DGraphEdgeDirection pOrient)
 
OA_ptr< NodesIteratorInterfacegetCallGraphDFSIterator (OA_ptr< NodeInterface > n)
 
OA_ptr< NodesIteratorInterfacegetCallGraphEntryNodesIterator () const
 
OA_ptr< NodesIteratorInterfacegetCallGraphExitNodesIterator () const
 
OA_ptr< ProcHandleIteratorgetCalleeProcIter (CallHandle call)
 
- Public Member Functions inherited from OA::CallGraph::CallGraphInterface
 ~CallGraphInterface ()
 
- Public Member Functions inherited from OA::DGraph::DGraphInterface
virtual ~DGraphInterface ()
 
- Public Member Functions inherited from OA::Annotation
 Annotation ()
 
virtual ~Annotation ()
 
- Public Member Functions inherited from OA::DGraph::DGraphImplement
 DGraphImplement ()
 
 ~DGraphImplement ()
 
OA_ptr< NodesIteratorInterfacegetNodesIterator () const
 
OA_ptr< NodesIteratorInterfacegetEntryNodesIterator () const
 
OA_ptr< NodesIteratorInterfacegetExitNodesIterator () const
 
OA_ptr< NodesIteratorInterfacegetReversePostDFSIterator (DGraph::DGraphEdgeDirection pOrient)
 
OA_ptr< NodesIteratorInterfacegetDFSIterator (OA_ptr< NodeInterface > n)
 
OA_ptr< EdgesIteratorInterfacegetEdgesIterator () const
 
void addNode (OA_ptr< NodeInterface > n)
 
void addEdge (OA_ptr< EdgeInterface > e)
 
void removeEdge (OA_ptr< EdgeInterface > e)
 
void removeNode (OA_ptr< NodeInterface > n)
 
int getNumNodes ()
 
int getNumEdges ()
 
void output (IRHandlesIRInterface &ir)
 
virtual std::string getGraphName ()
 
OA_ptr< NodeInterfacegetExprGraphRootNode () const
 

Private Attributes

const SymHandle mName
 
SymToNodeMapType mSymToNodeMap
 
std::map< CallHandle, OA_ptr
< std::set< ProcHandle > > > 
mCallToCalleeProcSetMap
 

Friends

class NodeLabelListIterator
 

Additional Inherited Members

- Static Public Member Functions inherited from OA::Annotation
static void configOutput (OA_ptr< OutputBuilder > ob)
 
- Static Protected Attributes inherited from OA::Annotation
static OA_ptr< OutputBuildersOutBuild
 

Detailed Description

Definition at line 300 of file CallGraph.hpp.

Member Typedef Documentation

Definition at line 331 of file CallGraph.hpp.

Constructor & Destructor Documentation

OA::CallGraph::CallGraph::CallGraph ( const SymHandle  name)

Definition at line 172 of file CallGraph.cpp.

References OA::CallGraph::debug, and OA_DEBUG_CTRL_MACRO.

OA::CallGraph::CallGraph::CallGraph ( )

Definition at line 178 of file CallGraph.cpp.

OA::CallGraph::CallGraph::~CallGraph ( )
virtual

Definition at line 184 of file CallGraph.cpp.

Member Function Documentation

void OA::CallGraph::CallGraph::addToCallProcSetMap ( CallHandle  call,
ProcHandle  proc 
)

Definition at line 400 of file CallGraph.cpp.

References OA::CallGraph::debug, mCallToCalleeProcSetMap, and NULL.

void OA::CallGraph::CallGraph::connect ( OA_ptr< NodeInterface src,
OA_ptr< NodeInterface dst,
EdgeType  type,
CallHandle  call 
)

Definition at line 364 of file CallGraph.cpp.

References OA::DGraph::DGraphImplement::addEdge().

Here is the call graph for this function:

void OA::CallGraph::CallGraph::disconnect ( OA_ptr< EdgeInterface e)

Definition at line 374 of file CallGraph.cpp.

References OA::DGraph::DGraphImplement::removeEdge().

Here is the call graph for this function:

void OA::CallGraph::CallGraph::dump ( std::ostream &  os,
OA_ptr< IRHandlesIRInterface ir 
)
virtual
    COMMENTED OUT BY plm 08/17/06

os << "===== CallGraph: " << ir->toString(mName) << " =====\n" << endl;

print the contents of all the nodes NodesIterator nodes_iter(*this); for ( ; nodes_iter.isValid(); ++nodes_iter) { OA_ptr<CallGraph::Node> node = nodes_iter.current(); node->longdump(os, ir); os << endl; }

os << "====================" << endl;

Implements OA::CallGraph::CallGraphInterface.

Definition at line 540 of file CallGraph.cpp.

Referenced by fortTkSupport::InterOAInfoMap::init().

OA_ptr< Node > OA::CallGraph::CallGraph::findOrAddNode ( SymHandle  sym)

Definition at line 381 of file CallGraph.cpp.

References OA::DGraph::DGraphImplement::addNode(), mSymToNodeMap, NULL, and OA::OA_ptr< T >::ptrEqual().

Here is the call graph for this function:

OA_ptr< ProcHandleIterator > OA::CallGraph::CallGraph::getCalleeProcIter ( CallHandle  call)
virtual

Returns an iterator over ProcHandles, of Procs that are may called from the given CallHandle

Implements OA::CallGraph::CallGraphInterface.

Definition at line 213 of file CallGraph.cpp.

References mCallToCalleeProcSetMap, NULL, and OA::OA_ptr< T >::ptrEqual().

Here is the call graph for this function:

OA_ptr< NodesIteratorInterface > OA::CallGraph::CallGraph::getCallGraphDFSIterator ( OA_ptr< NodeInterface n)
virtual

Implements OA::CallGraph::CallGraphInterface.

Definition at line 510 of file CallGraph.cpp.

References OA::DGraph::DGraphImplement::getDFSIterator().

Here is the call graph for this function:

OA_ptr< EdgesIteratorInterface > OA::CallGraph::CallGraph::getCallGraphEdgesIterator ( ) const
virtual

Implements OA::CallGraph::CallGraphInterface.

Definition at line 490 of file CallGraph.cpp.

References OA::DGraph::DGraphImplement::getEdgesIterator().

Here is the call graph for this function:

OA_ptr< NodesIteratorInterface > OA::CallGraph::CallGraph::getCallGraphEntryNodesIterator ( ) const
virtual

Implements OA::CallGraph::CallGraphInterface.

Definition at line 519 of file CallGraph.cpp.

References OA::DGraph::DGraphImplement::getEntryNodesIterator().

Here is the call graph for this function:

OA_ptr< NodesIteratorInterface > OA::CallGraph::CallGraph::getCallGraphExitNodesIterator ( ) const
virtual

Implements OA::CallGraph::CallGraphInterface.

Definition at line 528 of file CallGraph.cpp.

References OA::DGraph::DGraphImplement::getExitNodesIterator().

Here is the call graph for this function:

OA_ptr< NodesIteratorInterface > OA::CallGraph::CallGraph::getCallGraphNodesIterator ( ) const
virtual

Implements OA::CallGraph::CallGraphInterface.

Definition at line 481 of file CallGraph.cpp.

References OA::DGraph::DGraphImplement::getNodesIterator().

Here is the call graph for this function:

OA_ptr< NodesIteratorInterface > OA::CallGraph::CallGraph::getCallGraphReversePostDFSIterator ( DGraph::DGraphEdgeDirection  pOrient)
virtual

Implements OA::CallGraph::CallGraphInterface.

Definition at line 500 of file CallGraph.cpp.

References OA::DGraph::DGraphImplement::getReversePostDFSIterator().

Here is the call graph for this function:

const OA::SymHandle OA::CallGraph::CallGraph::subprog_name ( )
inlinevirtual

Implements OA::CallGraph::CallGraphInterface.

Definition at line 337 of file CallGraph.hpp.

References mName.

Friends And Related Function Documentation

friend class NodeLabelListIterator
friend

Definition at line 312 of file CallGraph.hpp.

Member Data Documentation

std::map<CallHandle, OA_ptr<std::set<ProcHandle> > > OA::CallGraph::CallGraph::mCallToCalleeProcSetMap
private

Definition at line 406 of file CallGraph.hpp.

Referenced by addToCallProcSetMap(), getCalleeProcIter(), and output().

const SymHandle OA::CallGraph::CallGraph::mName
private

Definition at line 402 of file CallGraph.hpp.

Referenced by subprog_name().

SymToNodeMapType OA::CallGraph::CallGraph::mSymToNodeMap
private

Definition at line 404 of file CallGraph.hpp.

Referenced by findOrAddNode().


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