OpenASIP
2.0
|
#include <ProgramDependenceNode.hh>
Public Types | |
enum | NodeType { PDG_NODE_REGION, PDG_NODE_PREDICATE, PDG_NODE_MOVE, PDG_NODE_LOOPENTRY, PDG_NODE_LOOPCLOSE } |
typedef std::set< ProgramDependenceNode * > | NodesInfo |
Protected Member Functions | |
void | setPredicateMoveNode () |
void | addToRegion (ProgramDependenceNode &node) |
void | addToEEC (ProgramDependenceNode &node) |
Private Attributes | |
MoveNode * | mNode_ |
ControlDependenceNode * | cdgNode_ |
NodeType | type_ |
NodesInfo | region_ |
Stores "region" information for computing serialization information. More... | |
NodesInfo | eec_ |
Stores "eec" information for computing serialization information. More... | |
int | component_ |
Number of strong component the node belongs to. Node can be part of several strong components so this value have practical meaning only for loop close nodes - close just one loop, and loop entry nodes - marks a component in which node is loop entry. Still can be regular region of larger loop Full list of nodes that belongs to actual components is available in strongComponents_ vector in PDG. More... | |
BasicBlockNode * | newFirstBB_ |
First basic block of a subgraph of a region. More... | |
std::vector< BasicBlockNode * > | leafBlocks_ |
Vector of basic blocks of a subgraph that do not have outgoing edged and will need to get connected. More... | |
bool | lastNode_ |
Indicates that node must be scheduled last between it's siblings because it's subgraph contains close node and it's parent is entry. More... | |
Friends | |
class | ProgramDependenceGraph |
Definition at line 43 of file ProgramDependenceNode.hh.
typedef std::set<ProgramDependenceNode*> ProgramDependenceNode::NodesInfo |
Definition at line 64 of file ProgramDependenceNode.hh.
Enumerator | |
---|---|
PDG_NODE_REGION | |
PDG_NODE_PREDICATE | |
PDG_NODE_MOVE | |
PDG_NODE_LOOPENTRY | |
PDG_NODE_LOOPCLOSE |
Definition at line 45 of file ProgramDependenceNode.hh.
ProgramDependenceNode::ProgramDependenceNode | ( | NodeType | type = PDG_NODE_REGION | ) |
Constructor creating Program Dependence Node which is empty. Does not have related CDG node. For example Loop Close node.
type | Type of the node |
Definition at line 45 of file ProgramDependenceNode.cc.
ProgramDependenceNode::ProgramDependenceNode | ( | ControlDependenceNode & | cdgNode, |
NodeType | type = PDG_NODE_REGION |
||
) |
Constructor creating Program Dependence Node from Control Dependence region node.
cdgNode | node of CDG |
type | Type of the node |
Definition at line 59 of file ProgramDependenceNode.cc.
References mNode_.
ProgramDependenceNode::ProgramDependenceNode | ( | MoveNode & | mNode, |
NodeType | type = PDG_NODE_MOVE |
||
) |
Constructor creating Program Dependence Node from Data Dependence node.
mNode | MoveNode of DDG |
type | Type of the node |
Definition at line 72 of file ProgramDependenceNode.cc.
References cdgNode_.
|
virtual |
|
inline |
Definition at line 90 of file ProgramDependenceNode.hh.
References leafBlocks_.
Referenced by ProgramDependenceGraph::processPredicate(), and ProgramDependenceGraph::processRegion().
|
inline |
Definition at line 92 of file ProgramDependenceNode.hh.
References leafBlocks_.
Referenced by ProgramDependenceGraph::processRegion().
|
protected |
Add node to "eec" set for computing serialization information
node | Node to add to the set |
Definition at line 270 of file ProgramDependenceNode.cc.
References eec_.
Referenced by ProgramDependenceGraph::computeEECInfo(), ProgramDependenceGraph::copyRegionEECComponent(), and ProgramDependenceGraph::serializePDG().
|
protected |
Add node to "region" set for computing serialization information
node | Node to add to the set |
Definition at line 250 of file ProgramDependenceNode.cc.
References region_.
Referenced by ProgramDependenceGraph::computeRegionInfo(), ProgramDependenceGraph::copyRegionEECComponent(), ProgramDependenceGraph::regionHelper(), and ProgramDependenceGraph::serializePDG().
const ControlDependenceNode & ProgramDependenceNode::cdgNode | ( | ) |
Returns CDGNode corresponding to given node in CDG.
Returns CDGNode corresponding to given node in CDG as constant.
Definition at line 214 of file ProgramDependenceNode.cc.
References __func__, cdgNode_, PDG_NODE_LOOPCLOSE, PDG_NODE_LOOPENTRY, PDG_NODE_REGION, toString(), and type_.
Referenced by ProgramDependenceGraph::copyRegionEECComponent().
const ControlDependenceNode& ProgramDependenceNode::cdgNode | ( | ) | const |
|
inline |
Definition at line 76 of file ProgramDependenceNode.hh.
References component_.
Referenced by ProgramDependenceGraph::computeEECInfo(), ProgramDependenceGraph::computeRegionInfo(), ProgramDependenceGraph::copyRegionEECComponent(), isLoopEntryNode(), ProgramDependenceGraph::processLoopEntry(), setComponent(), and setLoopEntryNode().
|
virtual |
Returns content of a node as a string in .dot format.
Reimplemented from GraphNode.
Definition at line 140 of file ProgramDependenceNode.cc.
References isLoopCloseNode(), isLoopEntryNode(), isMoveNode(), isPredicateMoveNode(), isRegionNode(), moveNode(), and toString().
const ProgramDependenceNode::NodesInfo & ProgramDependenceNode::eec | ( | ) |
Returns the "eec" set for given node
Definition at line 281 of file ProgramDependenceNode.cc.
References eec_.
Referenced by ProgramDependenceGraph::compareSiblings(), and ProgramDependenceGraph::computeEECInfo().
|
inline |
Definition at line 72 of file ProgramDependenceNode.hh.
References lastNode_.
Referenced by ProgramDependenceGraph::compareSiblings(), and toString().
|
inline |
Definition at line 71 of file ProgramDependenceNode.hh.
References PDG_NODE_LOOPCLOSE, and type_.
Referenced by ProgramDependenceGraph::compareSiblings(), ProgramDependenceGraph::computeEECInfo(), ProgramDependenceGraph::computeRelations(), ProgramDependenceGraph::copyRegionEECComponent(), dotString(), ProgramDependenceGraph::processPredicate(), ProgramDependenceGraph::regionHelper(), and toString().
|
inline |
Definition at line 68 of file ProgramDependenceNode.hh.
References PDG_NODE_LOOPENTRY, and type_.
Referenced by ProgramDependenceGraph::compareSiblings(), ProgramDependenceGraph::computeRegionInfo(), ProgramDependenceGraph::computeRelations(), ProgramDependenceGraph::copyRegionEECComponent(), dotString(), ProgramDependenceGraph::processPredicate(), ProgramDependenceGraph::processRegion(), ProgramDependenceGraph::regionHelper(), and toString().
|
inline |
Definition at line 69 of file ProgramDependenceNode.hh.
References component(), component_, PDG_NODE_LOOPENTRY, and type_.
|
inline |
Definition at line 67 of file ProgramDependenceNode.hh.
References PDG_NODE_MOVE, and type_.
Referenced by ProgramDependenceGraph::compareSiblings(), dotString(), ProgramDependenceGraph::processRegion(), and ProgramDependenceGraph::ProgramDependenceGraph().
|
inline |
Definition at line 66 of file ProgramDependenceNode.hh.
References PDG_NODE_PREDICATE, and type_.
Referenced by ProgramDependenceGraph::compareSiblings(), ProgramDependenceGraph::computeRelations(), ProgramDependenceGraph::copyRegionEECComponent(), dotString(), ProgramDependenceGraph::ProgramDependenceGraph(), ProgramDependenceGraph::regionHelper(), and toString().
|
inline |
Definition at line 65 of file ProgramDependenceNode.hh.
References PDG_NODE_REGION, and type_.
Referenced by ProgramDependenceGraph::compareSiblings(), ProgramDependenceGraph::computeRelations(), ProgramDependenceGraph::copyRegionEECComponent(), dotString(), ProgramDependenceGraph::regionHelper(), and toString().
|
inline |
Definition at line 89 of file ProgramDependenceNode.hh.
References leafBlocks_.
Referenced by ProgramDependenceGraph::processRegion().
const MoveNode & ProgramDependenceNode::moveNode | ( | ) |
Returns MoveNode corresponding to given node in DDG.
Returns MoveNode corresponding to given node in DDG as constant.
Definition at line 182 of file ProgramDependenceNode.cc.
References __func__, mNode_, PDG_NODE_MOVE, PDG_NODE_PREDICATE, toString(), and type_.
Referenced by ProgramDependenceGraph::copyRegionEECComponent(), dotString(), ProgramDependenceGraph::processPredicate(), ProgramDependenceGraph::processRegion(), ProgramDependenceGraph::ProgramDependenceGraph(), and ProgramDependenceGraph::removeGuardedJump().
const MoveNode& ProgramDependenceNode::moveNode | ( | ) | const |
|
inline |
Definition at line 87 of file ProgramDependenceNode.hh.
References newFirstBB_.
Referenced by ProgramDependenceGraph::processPredicate(), and ProgramDependenceGraph::processRegion().
void ProgramDependenceNode::printRelations | ( | ) | const |
Definition at line 297 of file ProgramDependenceNode.cc.
References eec_, Application::logStream(), and region_.
Referenced by ProgramDependenceGraph::processRegion().
const ProgramDependenceNode::NodesInfo & ProgramDependenceNode::region | ( | ) |
Returns the "region" set for given node
Definition at line 260 of file ProgramDependenceNode.cc.
References region_.
Referenced by ProgramDependenceGraph::computeEECInfo(), ProgramDependenceGraph::computeRegionInfo(), and ProgramDependenceGraph::regionHelper().
|
inline |
Definition at line 74 of file ProgramDependenceNode.hh.
References component(), and component_.
Referenced by ProgramDependenceGraph::copyRegionEECComponent(), and ProgramDependenceGraph::detectStrongComponents().
|
inline |
Definition at line 75 of file ProgramDependenceNode.hh.
References lastNode_.
Referenced by ProgramDependenceGraph::copyRegionEECComponent(), and ProgramDependenceGraph::ProgramDependenceGraph().
void ProgramDependenceNode::setLoopEntryNode | ( | int | component | ) |
Sets the node to be loop entry node of a given component (loop)
component | Component of which the node is loop entry node |
Definition at line 292 of file ProgramDependenceNode.cc.
References component(), component_, PDG_NODE_LOOPENTRY, and type_.
Referenced by ProgramDependenceGraph::detectStrongComponents().
|
inline |
Definition at line 88 of file ProgramDependenceNode.hh.
References newFirstBB_.
Referenced by ProgramDependenceGraph::processLoopClose(), ProgramDependenceGraph::processPredicate(), and ProgramDependenceGraph::processRegion().
|
protected |
Sets node to be predicate node
Definition at line 168 of file ProgramDependenceNode.cc.
References __func__, PDG_NODE_MOVE, PDG_NODE_PREDICATE, toString(), and type_.
Referenced by ProgramDependenceGraph::removeGuardedJump().
|
virtual |
Returns content of a node as a string.
Node added during strong components detection to collect edges pointing to loop entry from outside the loop. Do not have cdg equivalent if analysis was done directly on pdg
Loop entry is region node converted during detection of loops Exists in CDG even if loop detection was done on PDG
Node added during strong components detection to collect edges pointing to loop entry from inside the loop. Do not have cdg equivalent if analysis was done directly on pdg
Reimplemented from GraphNode.
Definition at line 93 of file ProgramDependenceNode.cc.
References cdgNode_, isLastNode(), isLoopCloseNode(), isLoopEntryNode(), isPredicateMoveNode(), isRegionNode(), mNode_, GraphNode::nodeID(), Conversion::toString(), ControlDependenceNode::toString(), and MoveNode::toString().
Referenced by cdgNode(), ProgramDependenceGraph::computeEECInfo(), ProgramDependenceGraph::detectStrongComponents(), dotString(), moveNode(), ProgramDependenceGraph::processPredicate(), ProgramDependenceGraph::processRegion(), ProgramDependenceGraph::removeGuardedJump(), and setPredicateMoveNode().
|
friend |
Definition at line 97 of file ProgramDependenceNode.hh.
|
private |
Definition at line 103 of file ProgramDependenceNode.hh.
Referenced by cdgNode(), ProgramDependenceNode(), and toString().
|
private |
Number of strong component the node belongs to. Node can be part of several strong components so this value have practical meaning only for loop close nodes - close just one loop, and loop entry nodes - marks a component in which node is loop entry. Still can be regular region of larger loop Full list of nodes that belongs to actual components is available in strongComponents_ vector in PDG.
Definition at line 116 of file ProgramDependenceNode.hh.
Referenced by component(), isLoopEntryNode(), setComponent(), and setLoopEntryNode().
|
private |
Stores "eec" information for computing serialization information.
Definition at line 108 of file ProgramDependenceNode.hh.
Referenced by addToEEC(), eec(), printRelations(), and ~ProgramDependenceNode().
|
private |
Indicates that node must be scheduled last between it's siblings because it's subgraph contains close node and it's parent is entry.
Definition at line 124 of file ProgramDependenceNode.hh.
Referenced by isLastNode(), and setLastNode().
|
private |
Vector of basic blocks of a subgraph that do not have outgoing edged and will need to get connected.
Definition at line 121 of file ProgramDependenceNode.hh.
Referenced by addLeafBlock(), addLeafBlocks(), and leafBlocks().
|
private |
Definition at line 102 of file ProgramDependenceNode.hh.
Referenced by moveNode(), ProgramDependenceNode(), and toString().
|
private |
First basic block of a subgraph of a region.
Definition at line 118 of file ProgramDependenceNode.hh.
Referenced by newFirstBB(), and setNewFirstBB().
|
private |
Stores "region" information for computing serialization information.
Definition at line 106 of file ProgramDependenceNode.hh.
Referenced by addToRegion(), printRelations(), region(), and ~ProgramDependenceNode().
|
private |
Definition at line 104 of file ProgramDependenceNode.hh.
Referenced by cdgNode(), isLoopCloseNode(), isLoopEntryNode(), isMoveNode(), isPredicateMoveNode(), isRegionNode(), moveNode(), setLoopEntryNode(), and setPredicateMoveNode().