OpenASIP  2.0
Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
BoostGraph< GraphNode, GraphEdge > Class Template Reference

#include <BoostGraph.hh>

Inheritance diagram for BoostGraph< GraphNode, GraphEdge >:
Inheritance graph
Collaboration diagram for BoostGraph< GraphNode, GraphEdge >:
Collaboration graph

Classes

class  GraphHashFunctions
 
struct  PathLengthHelper
 
struct  RemovedEdgeDatum
 

Public Types

typedef std::set< GraphNode *, typename GraphNode::ComparatorNodeSet
 
typedef std::set< GraphEdge *, typename GraphEdge::ComparatorEdgeSet
 
typedef GraphNode Node
 The (base) node type managed by this graph. More...
 
typedef GraphEdge Edge
 The (base) edge type managed by this graph. More...
 
- Public Types inherited from GraphBase< GraphNode, GraphEdge >
typedef std::set< GraphNode *, typename GraphNode::ComparatorNodeSet
 
typedef std::set< GraphEdge *, typename GraphEdge::ComparatorEdgeSet
 
typedef GraphNode Node
 Node type of this graph (possibly, a base class). More...
 
typedef GraphEdge Edge
 Edge type of this graph (possibly, a base class). More...
 

Public Member Functions

 BoostGraph (bool allowLoopEdges=true)
 
 BoostGraph (const TCEString &name, bool allowLoopEdges=true)
 
 BoostGraph (const BoostGraph &other, bool allowLoopEdges=true)
 
 ~BoostGraph ()
 
int nodeCount () const
 
int edgeCount () const
 
Nodenode (const int index) const
 
Nodenode (const int index, bool cacheResult) const
 
virtual Edgeedge (const int index) const
 
virtual void addNode (Node &node)
 
virtual EdgeoutEdge (const Node &node, const int index) const
 
virtual EdgeinEdge (const Node &node, const int index) const
 
virtual EdgeSet outEdges (const Node &node) const
 
virtual EdgeSet inEdges (const Node &node) const
 
virtual EdgeSet rootGraphOutEdges (const Node &node) const
 
virtual EdgeSet rootGraphInEdges (const Node &node) const
 
virtual EdgerootGraphInEdge (const Node &node, const int index) const
 
virtual EdgerootGraphOutEdge (const Node &node, const int index) const
 
virtual int rootGraphInDegree (const Node &node) const
 
virtual int rootGraphOutDegree (const Node &node) const
 
virtual int outDegree (const Node &node) const
 
virtual int inDegree (const Node &node) const
 
virtual NodetailNode (const Edge &edge) const
 
virtual NodeheadNode (const Edge &edge) const
 
virtual void connectNodes (const Node &nTail, const Node &nHead, Edge &e)
 
virtual void disconnectNodes (const Node &nTail, const Node &nHead)
 
virtual void moveInEdges (const Node &source, const Node &destination)
 
virtual void moveOutEdges (const Node &source, const Node &destination)
 
virtual void moveInEdge (const Node &source, const Node &destination, Edge &edge, const Node *tail=NULL, bool childs=false)
 
virtual void moveOutEdge (const Node &source, const Node &destination, Edge &edge, const Node *head=NULL, bool childs=false)
 
virtual void copyInEdge (const Node &destination, Edge &edge, const Node *tail=NULL)
 
virtual void copyOutEdge (const Node &destination, Edge &edge, const Node *head=NULL)
 
virtual void removeNode (Node &node)
 
virtual void removeEdge (Edge &e)
 
virtual void dropNode (Node &node)
 
virtual void dropEdge (Edge &edge)
 
virtual bool hasEdge (const Node &nTail, const Node &nHead) const
 
virtual NodeSet rootNodes () const
 useful utility functions More...
 
virtual NodeSet sinkNodes () const
 
virtual NodeSet successors (const Node &node, bool ignoreBackEdges=false, bool ignoreForwardEdges=false) const
 
virtual NodeSet predecessors (const Node &node, bool ignoreBackEdges=false, bool ignoreForwardEdges=false) const
 
int maxPathLength (const GraphNode &node) const
 
int maxSinkDistance (const GraphNode &node) const
 
int maxSourceDistance (const GraphNode &node) const
 
bool isInCriticalPath (const GraphNode &node) const
 
int height () const
 
void findAllPaths () const
 
void detachSubgraph (BoostGraph &subGraph)
 
BoostGraphparentGraph ()
 
BoostGraphrootGraph ()
 
const BoostGraphrootGraph () const
 
bool hasNode (const Node &) const
 
virtual const TCEStringname () const
 
void setName (const TCEString &newName)
 
bool hasPath (GraphNode &src, const GraphNode &dest) const
 
void restoreNodeFromParent (GraphNode &node)
 
bool detectIllegalCycles () const
 
EdgeSet connectingEdges (const Node &nTail, const Node &nHead) const
 
- Public Member Functions inherited from GraphBase< GraphNode, GraphEdge >
 GraphBase ()
 
virtual ~GraphBase ()
 
virtual TCEString dotString () const
 
virtual void writeToDotFile (const TCEString &fileName) const
 

Protected Types

typedef std::set< RemovedEdgeDatumRemovedEdgeMap
 
typedef boost::adjacency_list< boost::listS, boost::vecS, boost::bidirectionalS, Node *, Edge * > Graph
 Internal graph type, providing actual graph-like operations. This type definition relies on bundled properties of boost library, which need the host compiler to support partial template specialisation. More...
 
typedef boost::graph_traits< GraphGraphTraits
 Traits characterising the internal graph type. More...
 
typedef GraphTraits::out_edge_iterator OutEdgeIter
 Output edge iterator type. More...
 
typedef GraphTraits::in_edge_iterator InEdgeIter
 Input edge iterator type. More...
 
typedef GraphTraits::edge_iterator EdgeIter
 Iterator type for the list of all edges in the graph. More...
 
typedef GraphTraits::vertex_iterator NodeIter
 Iterator type for the list of all nodes in the graph. More...
 
typedef GraphTraits::edge_descriptor EdgeDescriptor
 Type with which edges of the graph are seen internally. More...
 
typedef GraphTraits::vertex_descriptor NodeDescriptor
 Type with which nodes of the graph are seen internally. More...
 
typedef hash_map< const Edge *, EdgeDescriptor, GraphHashFunctionsEdgeDescMap
 
typedef hash_map< const Node *, NodeDescriptor, GraphHashFunctionsNodeDescMap
 
typedef std::vector< std::vector< int > > PathCache
 

Protected Member Functions

void restoreRemovedEdges (RemovedEdgeMap removedEdges)
 
EdgeDescriptor descriptor (const Edge &e) const
 
EdgeDescriptor edgeDescriptor (const NodeDescriptor &tailNode, const Edge &e) const
 
EdgeDescriptor edgeDescriptor (const Edge &e, const NodeDescriptor &headNode) const
 
NodeDescriptor descriptor (const Node &n) const
 
bool hasEdge (const Node &nTail, const Node &nHead, const Edge &edge) const
 
bool hasEdge (const Edge &edge, const Node *nTail=NULL, const Node *nHead=NULL) const
 
EdgeDescriptor connectingEdge (const Node &nTail, const Node &nHead) const
 
NodetailNode (const Edge &edge, const NodeDescriptor &headNode) const
 
NodeheadNode (const Edge &edge, const NodeDescriptor &tailNode) const
 
void replaceNodeWithLastNode (GraphNode &dest)
 
void calculatePathLengths () const
 
void calculatePathLengthsFast () const
 
void calculateSinkDistance (const GraphNode &node, int len, bool looping=false) const
 
void calculateSourceDistances (const GraphNode *startNode=NULL, int startingLength=0, bool looping=false) const
 
void calculatePathLengthsOnConnect (const GraphNode &nTail, const GraphNode &nHead, GraphEdge &e)
 
void sinkDistDecreased (const GraphNode &n) const
 
void sourceDistDecreased (const GraphNode &n) const
 
virtual int edgeWeight (GraphEdge &e, const GraphNode &n) const
 
void clearDescriptorCache (EdgeSet edges)
 
virtual void removeNode (Node &node, BoostGraph *modifierGraph)
 
virtual void removeEdge (Edge &e, const GraphNode *tailNode, const GraphNode *headNode, BoostGraph *modifierGraph=NULL)
 
virtual void connectNodes (const Node &nTail, const Node &nHead, Edge &e, GraphBase< GraphNode, GraphEdge > *modifier, bool creatingSG=false)
 
void moveInEdges (const Node &source, const Node &destination, BoostGraph *modifierGraph)
 
virtual void moveOutEdges (const Node &source, const Node &destination, BoostGraph *modifierGraph)
 
void constructSubGraph (BoostGraph &subGraph, NodeSet &nodes)
 

Protected Attributes

std::map< const GraphNode *, int, typename GraphNode::ComparatorsourceDistances_
 
std::map< const GraphNode *, int, typename GraphNode::ComparatorsinkDistances_
 
std::map< const GraphNode *, int, typename GraphNode::ComparatorloopingSourceDistances_
 
std::map< const GraphNode *, int, typename GraphNode::ComparatorloopingSinkDistances_
 
int height_
 
Graph graph_
 The internal graph structure. More...
 
EdgeDescMap edgeDescriptors_
 
NodeDescMap nodeDescriptors_
 
BoostGraph< GraphNode, GraphEdge > * parentGraph_
 
std::vector< BoostGraph< GraphNode, GraphEdge > * > childGraphs_
 
TCEString name_
 
int sgCounter_
 
std::set< Edge * > ownedEdges_
 
bool allowLoopEdges_
 
PathCachepathCache_
 

Private Member Functions

BoostGraphoperator= (const BoostGraph &)
 Assignment forbidden. More...
 

Detailed Description

template<typename GraphNode, typename GraphEdge>
class BoostGraph< GraphNode, GraphEdge >

Graph-based program representation.

Boost::graph based implementation.

Definition at line 83 of file BoostGraph.hh.

Member Typedef Documentation

◆ Edge

template<typename GraphNode , typename GraphEdge >
typedef GraphEdge BoostGraph< GraphNode, GraphEdge >::Edge

The (base) edge type managed by this graph.

Definition at line 92 of file BoostGraph.hh.

◆ EdgeDescMap

template<typename GraphNode , typename GraphEdge >
typedef hash_map<const Edge*, EdgeDescriptor, GraphHashFunctions> BoostGraph< GraphNode, GraphEdge >::EdgeDescMap
protected

Definition at line 336 of file BoostGraph.hh.

◆ EdgeDescriptor

template<typename GraphNode , typename GraphEdge >
typedef GraphTraits::edge_descriptor BoostGraph< GraphNode, GraphEdge >::EdgeDescriptor
protected

Type with which edges of the graph are seen internally.

Definition at line 262 of file BoostGraph.hh.

◆ EdgeIter

template<typename GraphNode , typename GraphEdge >
typedef GraphTraits::edge_iterator BoostGraph< GraphNode, GraphEdge >::EdgeIter
protected

Iterator type for the list of all edges in the graph.

Definition at line 257 of file BoostGraph.hh.

◆ EdgeSet

template<typename GraphNode , typename GraphEdge >
typedef std::set<GraphEdge*, typename GraphEdge::Comparator > BoostGraph< GraphNode, GraphEdge >::EdgeSet

Definition at line 87 of file BoostGraph.hh.

◆ Graph

template<typename GraphNode , typename GraphEdge >
typedef boost::adjacency_list< boost::listS, boost::vecS, boost::bidirectionalS, Node*, Edge*> BoostGraph< GraphNode, GraphEdge >::Graph
protected

Internal graph type, providing actual graph-like operations. This type definition relies on bundled properties of boost library, which need the host compiler to support partial template specialisation.

Definition at line 247 of file BoostGraph.hh.

◆ GraphTraits

template<typename GraphNode , typename GraphEdge >
typedef boost::graph_traits<Graph> BoostGraph< GraphNode, GraphEdge >::GraphTraits
protected

Traits characterising the internal graph type.

Definition at line 250 of file BoostGraph.hh.

◆ InEdgeIter

template<typename GraphNode , typename GraphEdge >
typedef GraphTraits::in_edge_iterator BoostGraph< GraphNode, GraphEdge >::InEdgeIter
protected

Input edge iterator type.

Definition at line 255 of file BoostGraph.hh.

◆ Node

template<typename GraphNode , typename GraphEdge >
typedef GraphNode BoostGraph< GraphNode, GraphEdge >::Node

The (base) node type managed by this graph.

Todo:
What's the point of these typedefs?

Definition at line 90 of file BoostGraph.hh.

◆ NodeDescMap

template<typename GraphNode , typename GraphEdge >
typedef hash_map<const Node*, NodeDescriptor, GraphHashFunctions> BoostGraph< GraphNode, GraphEdge >::NodeDescMap
protected

Definition at line 338 of file BoostGraph.hh.

◆ NodeDescriptor

template<typename GraphNode , typename GraphEdge >
typedef GraphTraits::vertex_descriptor BoostGraph< GraphNode, GraphEdge >::NodeDescriptor
protected

Type with which nodes of the graph are seen internally.

Definition at line 264 of file BoostGraph.hh.

◆ NodeIter

template<typename GraphNode , typename GraphEdge >
typedef GraphTraits::vertex_iterator BoostGraph< GraphNode, GraphEdge >::NodeIter
protected

Iterator type for the list of all nodes in the graph.

Definition at line 259 of file BoostGraph.hh.

◆ NodeSet

template<typename GraphNode , typename GraphEdge >
typedef std::set<GraphNode*, typename GraphNode::Comparator > BoostGraph< GraphNode, GraphEdge >::NodeSet

Definition at line 86 of file BoostGraph.hh.

◆ OutEdgeIter

template<typename GraphNode , typename GraphEdge >
typedef GraphTraits::out_edge_iterator BoostGraph< GraphNode, GraphEdge >::OutEdgeIter
protected

Output edge iterator type.

Definition at line 253 of file BoostGraph.hh.

◆ PathCache

template<typename GraphNode , typename GraphEdge >
typedef std::vector<std::vector<int> > BoostGraph< GraphNode, GraphEdge >::PathCache
protected

Definition at line 387 of file BoostGraph.hh.

◆ RemovedEdgeMap

template<typename GraphNode , typename GraphEdge >
typedef std::set<RemovedEdgeDatum> BoostGraph< GraphNode, GraphEdge >::RemovedEdgeMap
protected

Definition at line 236 of file BoostGraph.hh.

Constructor & Destructor Documentation

◆ BoostGraph() [1/3]

template<typename GraphNode , typename GraphEdge >
BoostGraph< GraphNode, GraphEdge >::BoostGraph ( bool  allowLoopEdges = true)

◆ BoostGraph() [2/3]

template<typename GraphNode , typename GraphEdge >
BoostGraph< GraphNode, GraphEdge >::BoostGraph ( const TCEString name,
bool  allowLoopEdges = true 
)

◆ BoostGraph() [3/3]

template<typename GraphNode , typename GraphEdge >
BoostGraph< GraphNode, GraphEdge >::BoostGraph ( const BoostGraph< GraphNode, GraphEdge > &  other,
bool  allowLoopEdges = true 
)

◆ ~BoostGraph()

template<typename GraphNode , typename GraphEdge >
BoostGraph< GraphNode, GraphEdge >::~BoostGraph ( )

Member Function Documentation

◆ addNode()

template<typename GraphNode , typename GraphEdge >
virtual void BoostGraph< GraphNode, GraphEdge >::addNode ( Node node)
virtual

◆ calculatePathLengths()

template<typename GraphNode , typename GraphEdge >
void BoostGraph< GraphNode, GraphEdge >::calculatePathLengths ( ) const
protected

◆ calculatePathLengthsFast()

template<typename GraphNode , typename GraphEdge >
void BoostGraph< GraphNode, GraphEdge >::calculatePathLengthsFast ( ) const
protected

◆ calculatePathLengthsOnConnect()

template<typename GraphNode , typename GraphEdge >
void BoostGraph< GraphNode, GraphEdge >::calculatePathLengthsOnConnect ( const GraphNode nTail,
const GraphNode nHead,
GraphEdge e 
)
protected

◆ calculateSinkDistance()

template<typename GraphNode , typename GraphEdge >
void BoostGraph< GraphNode, GraphEdge >::calculateSinkDistance ( const GraphNode node,
int  len,
bool  looping = false 
) const
protected

◆ calculateSourceDistances()

template<typename GraphNode , typename GraphEdge >
void BoostGraph< GraphNode, GraphEdge >::calculateSourceDistances ( const GraphNode startNode = NULL,
int  startingLength = 0,
bool  looping = false 
) const
protected

◆ clearDescriptorCache()

template<typename GraphNode , typename GraphEdge >
void BoostGraph< GraphNode, GraphEdge >::clearDescriptorCache ( EdgeSet  edges)
protected

◆ connectingEdge()

template<typename GraphNode , typename GraphEdge >
EdgeDescriptor BoostGraph< GraphNode, GraphEdge >::connectingEdge ( const Node nTail,
const Node nHead 
) const
protected

◆ connectingEdges()

template<typename GraphNode , typename GraphEdge >
EdgeSet BoostGraph< GraphNode, GraphEdge >::connectingEdges ( const Node nTail,
const Node nHead 
) const
virtual

◆ connectNodes() [1/2]

template<typename GraphNode , typename GraphEdge >
virtual void BoostGraph< GraphNode, GraphEdge >::connectNodes ( const Node nTail,
const Node nHead,
Edge e 
)
virtual

◆ connectNodes() [2/2]

template<typename GraphNode , typename GraphEdge >
virtual void BoostGraph< GraphNode, GraphEdge >::connectNodes ( const Node nTail,
const Node nHead,
Edge e,
GraphBase< GraphNode, GraphEdge > *  modifier,
bool  creatingSG = false 
)
protectedvirtual

◆ constructSubGraph()

template<typename GraphNode , typename GraphEdge >
void BoostGraph< GraphNode, GraphEdge >::constructSubGraph ( BoostGraph< GraphNode, GraphEdge > &  subGraph,
NodeSet nodes 
)
protected

◆ copyInEdge()

template<typename GraphNode , typename GraphEdge >
virtual void BoostGraph< GraphNode, GraphEdge >::copyInEdge ( const Node destination,
Edge edge,
const Node tail = NULL 
)
virtual

◆ copyOutEdge()

template<typename GraphNode , typename GraphEdge >
virtual void BoostGraph< GraphNode, GraphEdge >::copyOutEdge ( const Node destination,
Edge edge,
const Node head = NULL 
)
virtual

◆ descriptor() [1/2]

template<typename GraphNode , typename GraphEdge >
EdgeDescriptor BoostGraph< GraphNode, GraphEdge >::descriptor ( const Edge e) const
protected

◆ descriptor() [2/2]

template<typename GraphNode , typename GraphEdge >
NodeDescriptor BoostGraph< GraphNode, GraphEdge >::descriptor ( const Node n) const
protected

◆ detachSubgraph()

template<typename GraphNode , typename GraphEdge >
void BoostGraph< GraphNode, GraphEdge >::detachSubgraph ( BoostGraph< GraphNode, GraphEdge > &  subGraph)

◆ detectIllegalCycles()

template<typename GraphNode , typename GraphEdge >
bool BoostGraph< GraphNode, GraphEdge >::detectIllegalCycles ( ) const

◆ disconnectNodes()

template<typename GraphNode , typename GraphEdge >
virtual void BoostGraph< GraphNode, GraphEdge >::disconnectNodes ( const Node nTail,
const Node nHead 
)
virtual

◆ dropEdge()

template<typename GraphNode , typename GraphEdge >
virtual void BoostGraph< GraphNode, GraphEdge >::dropEdge ( Edge edge)
virtual

◆ dropNode()

template<typename GraphNode , typename GraphEdge >
virtual void BoostGraph< GraphNode, GraphEdge >::dropNode ( Node node)
virtual

◆ edge()

template<typename GraphNode , typename GraphEdge >
virtual Edge& BoostGraph< GraphNode, GraphEdge >::edge ( const int  index) const
virtual

◆ edgeCount()

template<typename GraphNode , typename GraphEdge >
int BoostGraph< GraphNode, GraphEdge >::edgeCount ( ) const
virtual

◆ edgeDescriptor() [1/2]

template<typename GraphNode , typename GraphEdge >
EdgeDescriptor BoostGraph< GraphNode, GraphEdge >::edgeDescriptor ( const Edge e,
const NodeDescriptor headNode 
) const
protected

◆ edgeDescriptor() [2/2]

template<typename GraphNode , typename GraphEdge >
EdgeDescriptor BoostGraph< GraphNode, GraphEdge >::edgeDescriptor ( const NodeDescriptor tailNode,
const Edge e 
) const
protected

◆ edgeWeight()

template<typename GraphNode , typename GraphEdge >
virtual int BoostGraph< GraphNode, GraphEdge >::edgeWeight ( GraphEdge e,
const GraphNode n 
) const
protectedvirtual

Reimplemented in DataDependenceGraph.

◆ findAllPaths()

template<typename GraphNode , typename GraphEdge >
void BoostGraph< GraphNode, GraphEdge >::findAllPaths ( ) const

◆ hasEdge() [1/3]

template<typename GraphNode , typename GraphEdge >
bool BoostGraph< GraphNode, GraphEdge >::hasEdge ( const Edge edge,
const Node nTail = NULL,
const Node nHead = NULL 
) const
protected

◆ hasEdge() [2/3]

template<typename GraphNode , typename GraphEdge >
virtual bool BoostGraph< GraphNode, GraphEdge >::hasEdge ( const Node nTail,
const Node nHead 
) const
virtual

◆ hasEdge() [3/3]

template<typename GraphNode , typename GraphEdge >
bool BoostGraph< GraphNode, GraphEdge >::hasEdge ( const Node nTail,
const Node nHead,
const Edge edge 
) const
protected

◆ hasNode()

template<typename GraphNode , typename GraphEdge >
bool BoostGraph< GraphNode, GraphEdge >::hasNode ( const Node ) const
virtual

◆ hasPath()

template<typename GraphNode , typename GraphEdge >
bool BoostGraph< GraphNode, GraphEdge >::hasPath ( GraphNode src,
const GraphNode dest 
) const

◆ headNode() [1/2]

template<typename GraphNode , typename GraphEdge >
virtual Node& BoostGraph< GraphNode, GraphEdge >::headNode ( const Edge edge) const
virtual

Implements GraphBase< GraphNode, GraphEdge >.

Referenced by LoopPrologAndEpilogBuilder::addEpilogIntoCfg(), ResourceConstraintAnalyzer::analyzeRegisterAntideps(), BFEarlyBypasser::bypassSourceLatestCycle(), TDGen::canBeImmediate(), SimpleIfConverter::canConvert(), PreOptimizer::checkGuardReversalAllowed(), BFOptimization::checkPrologDDG(), TDGen::constantNodeString(), ControlDependenceGraph::createPostDominanceTree(), ControlDependenceGraph::detectControlDependencies(), SimpleIfConverter::detectDiamond(), SimpleIfConverter::detectTriangleViaFt(), SimpleIfConverter::detectTriangleViaJump(), ResourceConstraintAnalyzer::dumpGraphWithStats(), TDGen::emulatingOpNodeLLVMName(), OperationDAGSelector::findDags(), TDGen::immediateOperandNameForEmulatedOperation(), PreOptimizer::inverseGuardsOfHeads(), DataDependenceGraph::mergeAndKeepSource(), DataDependenceGraph::mergeAndKeepUser(), OperationDAGBehavior::OperationDAGBehavior(), BFRemoveLoopChecksAndJump::operator()(), BFPushAntidepsDown::operator()(), BFRemoveGuardsFromSuccs::operator()(), ProgramDependenceGraph::ProgramDependenceGraph(), LiveRangeData::registersAlive(), ProgramDependenceGraph::removeGuardedJump(), BFRegCopyAfter::splitMove(), BFRegCopyBefore::splitMove(), FUGen::subOpConnection(), SimpleIfConverter::successors(), Peel2BBLoops::testIf2BBLoop(), PreOptimizer::tryToOptimizeAddressReg(), SimpleIfConverter::updateCfg(), BFMergeAndKeepUser::updateEdges(), OperationDAGConverter::writeNode(), and MoveNodeGroup::writesJumpGuard().

◆ headNode() [2/2]

template<typename GraphNode , typename GraphEdge >
Node& BoostGraph< GraphNode, GraphEdge >::headNode ( const Edge edge,
const NodeDescriptor tailNode 
) const
protected

◆ height()

template<typename GraphNode , typename GraphEdge >
int BoostGraph< GraphNode, GraphEdge >::height ( ) const

◆ inDegree()

template<typename GraphNode , typename GraphEdge >
virtual int BoostGraph< GraphNode, GraphEdge >::inDegree ( const Node node) const
virtual

◆ inEdge()

template<typename GraphNode , typename GraphEdge >
virtual Edge& BoostGraph< GraphNode, GraphEdge >::inEdge ( const Node node,
const int  index 
) const
virtual

◆ inEdges()

template<typename GraphNode , typename GraphEdge >
virtual EdgeSet BoostGraph< GraphNode, GraphEdge >::inEdges ( const Node node) const
virtual

◆ isInCriticalPath()

template<typename GraphNode , typename GraphEdge >
bool BoostGraph< GraphNode, GraphEdge >::isInCriticalPath ( const GraphNode node) const
inline

Definition at line 179 of file BoostGraph.hh.

179  {
181  }

◆ maxPathLength()

template<typename GraphNode , typename GraphEdge >
int BoostGraph< GraphNode, GraphEdge >::maxPathLength ( const GraphNode node) const

◆ maxSinkDistance()

template<typename GraphNode , typename GraphEdge >
int BoostGraph< GraphNode, GraphEdge >::maxSinkDistance ( const GraphNode node) const

◆ maxSourceDistance()

template<typename GraphNode , typename GraphEdge >
int BoostGraph< GraphNode, GraphEdge >::maxSourceDistance ( const GraphNode node) const

◆ moveInEdge()

template<typename GraphNode , typename GraphEdge >
virtual void BoostGraph< GraphNode, GraphEdge >::moveInEdge ( const Node source,
const Node destination,
Edge edge,
const Node tail = NULL,
bool  childs = false 
)
virtual

◆ moveInEdges() [1/2]

template<typename GraphNode , typename GraphEdge >
virtual void BoostGraph< GraphNode, GraphEdge >::moveInEdges ( const Node source,
const Node destination 
)
virtual

◆ moveInEdges() [2/2]

template<typename GraphNode , typename GraphEdge >
void BoostGraph< GraphNode, GraphEdge >::moveInEdges ( const Node source,
const Node destination,
BoostGraph< GraphNode, GraphEdge > *  modifierGraph 
)
protected

◆ moveOutEdge()

template<typename GraphNode , typename GraphEdge >
virtual void BoostGraph< GraphNode, GraphEdge >::moveOutEdge ( const Node source,
const Node destination,
Edge edge,
const Node head = NULL,
bool  childs = false 
)
virtual

◆ moveOutEdges() [1/2]

template<typename GraphNode , typename GraphEdge >
virtual void BoostGraph< GraphNode, GraphEdge >::moveOutEdges ( const Node source,
const Node destination 
)
virtual

◆ moveOutEdges() [2/2]

template<typename GraphNode , typename GraphEdge >
virtual void BoostGraph< GraphNode, GraphEdge >::moveOutEdges ( const Node source,
const Node destination,
BoostGraph< GraphNode, GraphEdge > *  modifierGraph 
)
protectedvirtual

◆ name()

template<typename GraphNode , typename GraphEdge >
virtual const TCEString& BoostGraph< GraphNode, GraphEdge >::name ( ) const
virtual

◆ node() [1/2]

template<typename GraphNode , typename GraphEdge >
Node& BoostGraph< GraphNode, GraphEdge >::node ( const int  index) const
virtual

Implements GraphBase< GraphNode, GraphEdge >.

Referenced by ResourceConstraintAnalyzer::analyzeRegisterAntideps(), LoopPrologAndEpilogBuilder::build(), LLVMTCEDataDependenceGraphBuilder::buildFromCFG(), OperationDAGBehavior::canBeSimulated(), ProGeTools::canGenerateFromDAG(), Automagic::canGenerateFromDAG(), PreOptimizer::cfgAllowsJumpReversal(), DataDependenceGraphBuilder::clearUnneededBookkeeping(), ProcedurePass::copyCfgToProcedure(), OperationDAGSelector::countUnknownOperations(), OperationDAGConverter::createOsalCode(), ControlDependenceGraph::createPostDominanceTree(), OperationDAGConverter::createSimulationCode(), DataDependenceGraph::createSubgraph(), ControlDependenceGraph::detectControlDependencies(), ResourceConstraintAnalyzer::dumpGraphWithStats(), ControlFlowGraphPass::executeBasicBlockPass(), CopyingDelaySlotFiller::fillDelaySlots(), CompiledSimCodeGenerator::findBasicBlocks(), OperationDAGSelector::findDags(), BF2Scheduler::findJump(), DataDependenceGraphBuilder::findStaticRegisters(), BBSchedulerController::handleCFGDDG(), Peel2BBLoops::handleControlFlowGraph(), CallsToJumps::handleControlFlowGraph(), ScheduleEstimator::handleControlFlowGraph(), BUBasicBlockScheduler::handleDDG(), BasicBlockScheduler::handleDDG(), BUBasicBlockScheduler::handleLoopDDG(), BasicBlockScheduler::handleLoopDDG(), BF2Scheduler::handleLoopDDG(), DataDependenceGraphBuilder::initializeBBStates(), RegisterRenamer::initializeFreeRegisters(), BoostGraph< MoveNode, DataDependenceEdge >::isInCriticalPath(), OperationDAGBehavior::OperationDAGBehavior(), TDGen::operationDAGCanBeMatched(), BFRemoveLoopChecksAndJump::operator()(), BFPostpassBypasser::operator()(), BoostGraph< GraphNode, GraphEdge >::GraphHashFunctions::operator()(), ResourceConstraintAnalyzer::optimalScheduleResourceUsage(), ProgramDependenceGraph::ProgramDependenceGraph(), LiveRangeData::registersAlive(), SimpleIfConverter::searchCandidate(), and BF2Scheduler::unreservePreallocatedFUs().

◆ node() [2/2]

template<typename GraphNode , typename GraphEdge >
Node& BoostGraph< GraphNode, GraphEdge >::node ( const int  index,
bool  cacheResult 
) const

◆ nodeCount()

template<typename GraphNode , typename GraphEdge >
int BoostGraph< GraphNode, GraphEdge >::nodeCount ( ) const
virtual

Implements GraphBase< GraphNode, GraphEdge >.

Referenced by ResourceConstraintAnalyzer::analyzeRegisterAntideps(), LoopPrologAndEpilogBuilder::build(), LLVMTCEDataDependenceGraphBuilder::buildFromCFG(), llvm::LLVMTCEIRBuilder::buildTCECFG(), SoftwareBypasser::bypass(), OperationDAGBehavior::canBeSimulated(), BUMoveNodeSelector::candidates(), CriticalPathBBMoveNodeSelector::candidates(), Automagic::canGenerateFromDAG(), ProGeTools::canGenerateFromDAG(), PreOptimizer::cfgAllowsJumpReversal(), DataDependenceGraphBuilder::clearUnneededBookkeeping(), ProcedurePass::copyCfgToProcedure(), OperationDAGSelector::countUnknownOperations(), OperationDAGConverter::createOsalCode(), ControlDependenceGraph::createPostDominanceTree(), OperationDAGConverter::createSimulationCode(), DataDependenceGraph::createSubgraph(), ControlDependenceGraph::detectControlDependencies(), ProgramDependenceGraph::disassemble(), ResourceConstraintAnalyzer::dumpGraphWithStats(), ControlFlowGraphPass::executeBasicBlockPass(), CopyingDelaySlotFiller::fillDelaySlots(), CompiledSimCodeGenerator::findBasicBlocks(), OperationDAGSelector::findDags(), BF2Scheduler::findJump(), DataDependenceGraphBuilder::findStaticRegisters(), BBSchedulerController::handleBBNode(), BBSchedulerController::handleCFGDDG(), ControlDependenceGraphPass::handleControlDependenceGraph(), Peel2BBLoops::handleControlFlowGraph(), CallsToJumps::handleControlFlowGraph(), ScheduleEstimator::handleControlFlowGraph(), DDGPass::handleDDG(), BUBasicBlockScheduler::handleDDG(), BasicBlockScheduler::handleDDG(), BUBasicBlockScheduler::handleLoopDDG(), BasicBlockScheduler::handleLoopDDG(), BF2Scheduler::handleLoopDDG(), BBSchedulerController::handleProcedure(), DataDependenceGraphBuilder::initializeBBStates(), RegisterRenamer::initializeFreeRegisters(), CriticalPathBBMoveNodeSelector::isReadyToBeScheduled(), OperationDAGBehavior::OperationDAGBehavior(), TDGen::operationDAGCanBeMatched(), BFRemoveLoopChecksAndJump::operator()(), BFPostpassBypasser::operator()(), ResourceConstraintAnalyzer::optimalScheduleResourceUsage(), ProgramDependenceGraph::ProgramDependenceGraph(), LiveRangeData::registersAlive(), SoftwareBypasser::removeBypass(), SoftwareBypasser::removeDeadResults(), BF2Scheduler::scheduleDDG(), BasicBlockScheduler::scheduleMove(), SimpleIfConverter::searchCandidate(), OperationDAGSelector::OperationDAGList::smallestNodeCount(), and BF2Scheduler::unreservePreallocatedFUs().

◆ operator=()

template<typename GraphNode , typename GraphEdge >
BoostGraph& BoostGraph< GraphNode, GraphEdge >::operator= ( const BoostGraph< GraphNode, GraphEdge > &  )
private

Assignment forbidden.

◆ outDegree()

template<typename GraphNode , typename GraphEdge >
virtual int BoostGraph< GraphNode, GraphEdge >::outDegree ( const Node node) const
virtual

◆ outEdge()

template<typename GraphNode , typename GraphEdge >
virtual Edge& BoostGraph< GraphNode, GraphEdge >::outEdge ( const Node node,
const int  index 
) const
virtual

◆ outEdges()

template<typename GraphNode , typename GraphEdge >
virtual EdgeSet BoostGraph< GraphNode, GraphEdge >::outEdges ( const Node node) const
virtual

◆ parentGraph()

template<typename GraphNode , typename GraphEdge >
BoostGraph* BoostGraph< GraphNode, GraphEdge >::parentGraph ( )

◆ predecessors()

template<typename GraphNode , typename GraphEdge >
virtual NodeSet BoostGraph< GraphNode, GraphEdge >::predecessors ( const Node node,
bool  ignoreBackEdges = false,
bool  ignoreForwardEdges = false 
) const
virtual

◆ removeEdge() [1/2]

template<typename GraphNode , typename GraphEdge >
virtual void BoostGraph< GraphNode, GraphEdge >::removeEdge ( Edge e)
virtual

◆ removeEdge() [2/2]

template<typename GraphNode , typename GraphEdge >
virtual void BoostGraph< GraphNode, GraphEdge >::removeEdge ( Edge e,
const GraphNode tailNode,
const GraphNode headNode,
BoostGraph< GraphNode, GraphEdge > *  modifierGraph = NULL 
)
protectedvirtual

◆ removeNode() [1/2]

template<typename GraphNode , typename GraphEdge >
virtual void BoostGraph< GraphNode, GraphEdge >::removeNode ( Node node)
virtual

◆ removeNode() [2/2]

template<typename GraphNode , typename GraphEdge >
virtual void BoostGraph< GraphNode, GraphEdge >::removeNode ( Node node,
BoostGraph< GraphNode, GraphEdge > *  modifierGraph 
)
protectedvirtual

◆ replaceNodeWithLastNode()

template<typename GraphNode , typename GraphEdge >
void BoostGraph< GraphNode, GraphEdge >::replaceNodeWithLastNode ( GraphNode dest)
protected

◆ restoreNodeFromParent()

template<typename GraphNode , typename GraphEdge >
void BoostGraph< GraphNode, GraphEdge >::restoreNodeFromParent ( GraphNode node)

◆ restoreRemovedEdges()

template<typename GraphNode , typename GraphEdge >
void BoostGraph< GraphNode, GraphEdge >::restoreRemovedEdges ( RemovedEdgeMap  removedEdges)
protected

◆ rootGraph() [1/2]

template<typename GraphNode , typename GraphEdge >
BoostGraph* BoostGraph< GraphNode, GraphEdge >::rootGraph ( )

◆ rootGraph() [2/2]

template<typename GraphNode , typename GraphEdge >
const BoostGraph* BoostGraph< GraphNode, GraphEdge >::rootGraph ( ) const

◆ rootGraphInDegree()

template<typename GraphNode , typename GraphEdge >
virtual int BoostGraph< GraphNode, GraphEdge >::rootGraphInDegree ( const Node node) const
virtual

◆ rootGraphInEdge()

template<typename GraphNode , typename GraphEdge >
virtual Edge& BoostGraph< GraphNode, GraphEdge >::rootGraphInEdge ( const Node node,
const int  index 
) const
virtual

◆ rootGraphInEdges()

template<typename GraphNode , typename GraphEdge >
virtual EdgeSet BoostGraph< GraphNode, GraphEdge >::rootGraphInEdges ( const Node node) const
virtual

◆ rootGraphOutDegree()

template<typename GraphNode , typename GraphEdge >
virtual int BoostGraph< GraphNode, GraphEdge >::rootGraphOutDegree ( const Node node) const
virtual

◆ rootGraphOutEdge()

template<typename GraphNode , typename GraphEdge >
virtual Edge& BoostGraph< GraphNode, GraphEdge >::rootGraphOutEdge ( const Node node,
const int  index 
) const
virtual

◆ rootGraphOutEdges()

template<typename GraphNode , typename GraphEdge >
virtual EdgeSet BoostGraph< GraphNode, GraphEdge >::rootGraphOutEdges ( const Node node) const
virtual

◆ rootNodes()

template<typename GraphNode , typename GraphEdge >
virtual NodeSet BoostGraph< GraphNode, GraphEdge >::rootNodes ( ) const
virtual

◆ setName()

template<typename GraphNode , typename GraphEdge >
void BoostGraph< GraphNode, GraphEdge >::setName ( const TCEString newName)
inline

Definition at line 195 of file BoostGraph.hh.

195 { name_ = newName; }

◆ sinkDistDecreased()

template<typename GraphNode , typename GraphEdge >
void BoostGraph< GraphNode, GraphEdge >::sinkDistDecreased ( const GraphNode n) const
protected

◆ sinkNodes()

template<typename GraphNode , typename GraphEdge >
virtual NodeSet BoostGraph< GraphNode, GraphEdge >::sinkNodes ( ) const
virtual

◆ sourceDistDecreased()

template<typename GraphNode , typename GraphEdge >
void BoostGraph< GraphNode, GraphEdge >::sourceDistDecreased ( const GraphNode n) const
protected

◆ successors()

template<typename GraphNode , typename GraphEdge >
virtual NodeSet BoostGraph< GraphNode, GraphEdge >::successors ( const Node node,
bool  ignoreBackEdges = false,
bool  ignoreForwardEdges = false 
) const
virtual

◆ tailNode() [1/2]

template<typename GraphNode , typename GraphEdge >
virtual Node& BoostGraph< GraphNode, GraphEdge >::tailNode ( const Edge edge) const
virtual

◆ tailNode() [2/2]

template<typename GraphNode , typename GraphEdge >
Node& BoostGraph< GraphNode, GraphEdge >::tailNode ( const Edge edge,
const NodeDescriptor headNode 
) const
protected

Member Data Documentation

◆ allowLoopEdges_

template<typename GraphNode , typename GraphEdge >
bool BoostGraph< GraphNode, GraphEdge >::allowLoopEdges_
protected

Definition at line 384 of file BoostGraph.hh.

◆ childGraphs_

template<typename GraphNode , typename GraphEdge >
std::vector<BoostGraph<GraphNode,GraphEdge>*> BoostGraph< GraphNode, GraphEdge >::childGraphs_
protected

Definition at line 378 of file BoostGraph.hh.

◆ edgeDescriptors_

template<typename GraphNode , typename GraphEdge >
EdgeDescMap BoostGraph< GraphNode, GraphEdge >::edgeDescriptors_
mutableprotected

Definition at line 340 of file BoostGraph.hh.

◆ graph_

template<typename GraphNode , typename GraphEdge >
Graph BoostGraph< GraphNode, GraphEdge >::graph_
protected

The internal graph structure.

Definition at line 331 of file BoostGraph.hh.

◆ height_

template<typename GraphNode , typename GraphEdge >
int BoostGraph< GraphNode, GraphEdge >::height_
mutableprotected

Definition at line 328 of file BoostGraph.hh.

◆ loopingSinkDistances_

template<typename GraphNode , typename GraphEdge >
std::map<const GraphNode*,int, typename GraphNode::Comparator> BoostGraph< GraphNode, GraphEdge >::loopingSinkDistances_
mutableprotected

Definition at line 326 of file BoostGraph.hh.

◆ loopingSourceDistances_

template<typename GraphNode , typename GraphEdge >
std::map<const GraphNode*,int, typename GraphNode::Comparator> BoostGraph< GraphNode, GraphEdge >::loopingSourceDistances_
mutableprotected

Definition at line 324 of file BoostGraph.hh.

◆ name_

template<typename GraphNode , typename GraphEdge >
TCEString BoostGraph< GraphNode, GraphEdge >::name_
protected

Definition at line 380 of file BoostGraph.hh.

Referenced by BoostGraph< MoveNode, DataDependenceEdge >::setName().

◆ nodeDescriptors_

template<typename GraphNode , typename GraphEdge >
NodeDescMap BoostGraph< GraphNode, GraphEdge >::nodeDescriptors_
mutableprotected

Definition at line 341 of file BoostGraph.hh.

◆ ownedEdges_

template<typename GraphNode , typename GraphEdge >
std::set<Edge*> BoostGraph< GraphNode, GraphEdge >::ownedEdges_
protected

Definition at line 383 of file BoostGraph.hh.

◆ parentGraph_

template<typename GraphNode , typename GraphEdge >
BoostGraph<GraphNode, GraphEdge>* BoostGraph< GraphNode, GraphEdge >::parentGraph_
protected

Definition at line 377 of file BoostGraph.hh.

◆ pathCache_

template<typename GraphNode , typename GraphEdge >
PathCache* BoostGraph< GraphNode, GraphEdge >::pathCache_
mutableprotected

Definition at line 388 of file BoostGraph.hh.

◆ sgCounter_

template<typename GraphNode , typename GraphEdge >
int BoostGraph< GraphNode, GraphEdge >::sgCounter_
protected

Definition at line 381 of file BoostGraph.hh.

◆ sinkDistances_

template<typename GraphNode , typename GraphEdge >
std::map<const GraphNode*,int, typename GraphNode::Comparator> BoostGraph< GraphNode, GraphEdge >::sinkDistances_
mutableprotected

Definition at line 320 of file BoostGraph.hh.

◆ sourceDistances_

template<typename GraphNode , typename GraphEdge >
std::map<const GraphNode*,int, typename GraphNode::Comparator> BoostGraph< GraphNode, GraphEdge >::sourceDistances_
mutableprotected

Definition at line 318 of file BoostGraph.hh.


The documentation for this class was generated from the following file:
BoostGraph::name_
TCEString name_
Definition: BoostGraph.hh:380
BoostGraph::node
Node & node(const int index) const
BoostGraph::maxSourceDistance
int maxSourceDistance(const GraphNode &node) const
BoostGraph::maxSinkDistance
int maxSinkDistance(const GraphNode &node) const
BoostGraph::height
int height() const