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

#include <CallGraph.hpp>

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

Public Member Functions

 Node ()
 
 Node (SymHandle s)
 
 ~Node ()
 
bool isDefined () const
 getId: An id unique within instances of CallGraph::Node More...
 
bool isCalled () const
 
ProcHandle getProc () const
 
SymHandle getProcSym () const
 
virtual void output (OA::IRHandlesIRInterface &ir)
 
void dump (std::ostream &os)
 
void dump (std::ostream &os, OA_ptr< IRHandlesIRInterface > ir)
 
void longdump (std::ostream &os, OA_ptr< IRHandlesIRInterface > ir)
 
void add_def (ProcHandle h)
 
void add_call (CallHandle h)
 
OA_ptr< EdgesIteratorInterfacegetCallGraphIncomingEdgesIterator () const
 
OA_ptr< EdgesIteratorInterfacegetCallGraphOutgoingEdgesIterator () const
 
OA_ptr< NodesIteratorInterfacegetCallGraphSourceNodesIterator () const
 
OA_ptr< NodesIteratorInterfacegetCallGraphSinkNodesIterator () const
 
- Public Member Functions inherited from OA::CallGraph::NodeInterface
 ~NodeInterface ()
 
- Public Member Functions inherited from OA::DGraph::NodeImplement
 NodeImplement ()
 
unsigned int getId () const
 
int num_incoming () const
 
int num_outgoing () const
 
bool isAnEntry () const
 returns true if node is an entry node, IOW has no incoming edges More...
 
bool isAnExit () const
 returns true if node is an exit node, IOW has no outgoing edges More...
 
OA_ptr< EdgesIteratorInterfacegetIncomingEdgesIterator () const
 
OA_ptr< EdgesIteratorInterfacegetOutgoingEdgesIterator () const
 
OA_ptr< NodesIteratorInterfacegetSourceNodesIterator () const
 
OA_ptr< NodesIteratorInterfacegetSinkNodesIterator () const
 
bool operator== (NodeInterface &other)
 
bool operator< (NodeInterface &other)
 
void output (IRHandlesIRInterface &ir)
 
void dump (std::ostream &os)
 
void addIncomingEdge (OA_ptr< EdgeInterface > e)
 
void addOutgoingEdge (OA_ptr< EdgeInterface > e)
 
void removeIncomingEdge (OA_ptr< EdgeInterface > e)
 
void removeOutgoingEdge (OA_ptr< EdgeInterface > e)
 

Private Attributes

SymHandle mSym
 
ProcHandle mProc
 
std::list< CallHandlemCalls
 

Friends

class NodeCallsIterator
 

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 115 of file CallGraph.hpp.

Constructor & Destructor Documentation

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

Definition at line 85 of file CallGraph.cpp.

OA::CallGraph::Node::Node ( SymHandle  s)

Definition at line 87 of file CallGraph.cpp.

OA::CallGraph::Node::~Node ( )

Definition at line 90 of file CallGraph.cpp.

Member Function Documentation

void OA::CallGraph::Node::add_call ( CallHandle  h)

Definition at line 102 of file CallGraph.cpp.

References mCalls.

void OA::CallGraph::Node::add_def ( ProcHandle  h)

Definition at line 100 of file CallGraph.cpp.

References mProc.

void OA::CallGraph::Node::dump ( std::ostream &  os)
inlinevirtual

Implements OA::DGraph::NodeInterface.

Definition at line 167 of file CallGraph.hpp.

void OA::CallGraph::Node::dump ( std::ostream &  os,
OA_ptr< IRHandlesIRInterface ir 
)

Definition at line 609 of file CallGraph.cpp.

References OA::IRHandle::hval(), isDefined(), and mSym.

Here is the call graph for this function:

OA_ptr< EdgesIteratorInterface > OA::CallGraph::Node::getCallGraphIncomingEdgesIterator ( ) const
virtual

Implements OA::CallGraph::NodeInterface.

Definition at line 313 of file CallGraph.cpp.

References OA::DGraph::NodeImplement::getIncomingEdgesIterator().

Here is the call graph for this function:

OA_ptr< EdgesIteratorInterface > OA::CallGraph::Node::getCallGraphOutgoingEdgesIterator ( ) const
virtual

Implements OA::CallGraph::NodeInterface.

Definition at line 321 of file CallGraph.cpp.

References OA::DGraph::NodeImplement::getOutgoingEdgesIterator().

Here is the call graph for this function:

OA_ptr< NodesIteratorInterface > OA::CallGraph::Node::getCallGraphSinkNodesIterator ( ) const
virtual

Implements OA::CallGraph::NodeInterface.

Definition at line 337 of file CallGraph.cpp.

References OA::DGraph::NodeImplement::getSinkNodesIterator().

Here is the call graph for this function:

OA_ptr< NodesIteratorInterface > OA::CallGraph::Node::getCallGraphSourceNodesIterator ( ) const
virtual

Implements OA::CallGraph::NodeInterface.

Definition at line 329 of file CallGraph.cpp.

References OA::DGraph::NodeImplement::getSourceNodesIterator().

Here is the call graph for this function:

ProcHandle OA::CallGraph::Node::getProc ( ) const
virtual
SymHandle OA::CallGraph::Node::getProcSym ( ) const
virtual

Implements OA::CallGraph::NodeInterface.

Definition at line 98 of file CallGraph.cpp.

References mSym.

Referenced by fortTkSupport::MassageOACallGraphIntoXAIFCallGraph().

bool OA::CallGraph::Node::isCalled ( ) const
virtual

Implements OA::CallGraph::NodeInterface.

Definition at line 94 of file CallGraph.cpp.

References mCalls.

bool OA::CallGraph::Node::isDefined ( ) const
virtual

getId: An id unique within instances of CallGraph::Node

Implements OA::CallGraph::NodeInterface.

Definition at line 92 of file CallGraph.cpp.

References OA::IRHandle::hval(), and mProc.

Referenced by dump(), and output().

Here is the call graph for this function:

void OA::CallGraph::Node::longdump ( std::ostream &  os,
OA_ptr< IRHandlesIRInterface ir 
)
    Commented out by PLM 08/18/06

print the node ID os << "CallGraph Node: "; dump(os,ir);

if (isAnEntry()) { os << " (ENTRY)"; } else if (isAnExit()) { os << " (EXIT)"; } os << endl;

print the source(s) unsigned int count = 0; OA_ptr<NodesIterator> srcIt = getSourceNodesIterator(); for ( ; srcIt->isValid(); ++(*srcIt), ++count) { OA_ptr<Node> node = srcIt->current(); if (count == 0) { os << " <-- ("; } else { os << ", "; }

node->dump(os,ir); } if (count > 0) { os << ")" << endl; }

print the sink(s) count = 0; OutgoingEdgesIterator outIt(*this); OA_ptr<NodesIterator> outIt = getSinkNodesIterator(); for ( ; outIt->isValid(); ++(*outIt), ++count) { OA_ptr<Edge> edge = outIt.current(); OA_ptr<Node> node = edge->sink().convert<Node>(); OA_ptr<Node> node = outIt->current(); if (count == 0) { os << " --> ("; } else { os << ", "; }

node->dump(os,ir); os << " ["; edge->shortdump(os); os << "]"; } if (count > 0) { os << ")" << endl; }

Definition at line 633 of file CallGraph.cpp.

void OA::CallGraph::Node::output ( OA::IRHandlesIRInterface ir)
virtual

Implements OA::Annotation.

Definition at line 620 of file CallGraph.cpp.

References OA::IRHandle::hval(), isDefined(), mSym, OA::Annotation::sOutBuild, and OA::IRHandlesIRInterface::toString().

Here is the call graph for this function:

Friends And Related Function Documentation

friend class NodeCallsIterator
friend

Definition at line 171 of file CallGraph.hpp.

Member Data Documentation

std::list<CallHandle> OA::CallGraph::Node::mCalls
private

Definition at line 214 of file CallGraph.hpp.

Referenced by add_call(), and isCalled().

ProcHandle OA::CallGraph::Node::mProc
private

Definition at line 213 of file CallGraph.hpp.

Referenced by add_def(), getProc(), and isDefined().

SymHandle OA::CallGraph::Node::mSym
private

Definition at line 212 of file CallGraph.hpp.

Referenced by dump(), getProcSym(), and output().


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