OpenASIP
2.0
|
#include <MoveNodeGroup.hh>
Public Member Functions | |
MoveNodeGroup () | |
MoveNodeGroup (const DataDependenceGraph &ddg) | |
virtual | ~MoveNodeGroup () |
void | addNode (MoveNode &node) |
int | earliestCycle (bool assumeBypassing=false) const |
int | latestCycle () const |
int | maxSinkDistance () const |
int | maxSourceDistance () const |
int | nodeCount () const |
MoveNode & | node (int index) const |
bool | isPlaced () const |
bool | isScheduled () const |
std::string | toString () const |
bool | isAlive () const |
void | setProgramOperationPtr (ProgramOperationPtr op) |
in case this MNG contains strictly the nodes of a single operation, it can be set and queried with these methods More... | |
bool | isOperation () const |
ProgramOperationPtr | programOperationPtr () const |
bool | writesJumpGuard () const |
Private Attributes | |
std::vector< MoveNode * > | nodes_ |
const DataDependenceGraph * | ddg_ |
The data dependence graph the moves in this group belong to (optional). More... | |
ProgramOperationPtr | operation_ |
in case this MNG contains strictly the nodes of a single operation this can be set to point to it (optional) More... | |
Class which contains group of moves which are to be scheduled.
Definition at line 48 of file MoveNodeGroup.hh.
MoveNodeGroup::MoveNodeGroup | ( | ) |
MoveNodeGroup::MoveNodeGroup | ( | const DataDependenceGraph & | ddg | ) |
Constructor.
ddg | The data dependence graph the moves in the group belong to. |
Definition at line 53 of file MoveNodeGroup.cc.
|
virtual |
void MoveNodeGroup::addNode | ( | MoveNode & | node | ) |
Adds a node to the MoveNodeGroup.
node | The MoveNode being added to the group. |
Definition at line 70 of file MoveNodeGroup.cc.
References node(), and nodes_.
Referenced by MoveNodeGroupBuilder::build(), BasicBlockScheduler::handleLoopDDG(), BUMoveNodeSelector::mightBeReady(), and CriticalPathBBMoveNodeSelector::mightBeReady().
int MoveNodeGroup::earliestCycle | ( | bool | assumeBypassing = false | ) | const |
Calculates the earliest cycle in which dependences make it possible to try schedule the leader node.
In case the MoveNodeGroup is not (known) to be part of a DDG, or at least one of the predecessors of the MoveNodeGroup are unscheduled, this function returns INT_MAX. If the node is a root node, the function returns 0.
assumeBypassing | If set to true, assume we can software bypass all inputs from the original source. |
Definition at line 103 of file MoveNodeGroup.cc.
References ddg_, DataDependenceGraph::earliestCycle(), MoveNode::isSourceOperation(), Application::logStream(), node(), nodes_, and MoveNode::toString().
bool MoveNodeGroup::isAlive | ( | ) | const |
Returns true if all moves in the move group are alive.
An empty MoveNodeGroup is considered always alive.
Definition at line 190 of file MoveNodeGroup.cc.
References ddg_, BoostGraph< GraphNode, GraphEdge >::hasNode(), and nodes_.
Referenced by BUMoveNodeSelector::candidates(), and CriticalPathBBMoveNodeSelector::candidates().
|
inline |
Definition at line 74 of file MoveNodeGroup.hh.
References operation_.
Referenced by LLVMTCEDataDependenceGraphBuilder::buildLocalDDG(), and toString().
bool MoveNodeGroup::isPlaced | ( | ) | const |
bool MoveNodeGroup::isScheduled | ( | ) | const |
Returns true if all moves in the move group have been scheduled.
An empty MoveNodeGroup is considered always scheduled.
Definition at line 164 of file MoveNodeGroup.cc.
References nodes_.
Referenced by BUMoveNodeSelector::candidates(), CriticalPathBBMoveNodeSelector::candidates(), SequentialScheduler::handleBasicBlock(), BUBasicBlockScheduler::handleDDG(), BasicBlockScheduler::handleDDG(), BUBasicBlockScheduler::handleLoopDDG(), BasicBlockScheduler::handleLoopDDG(), RLPriorityCriticalPath::operator()(), RLPriorityNodeId::operator()(), and RLBUPriorityCriticalPath::operator()().
int MoveNodeGroup::latestCycle | ( | ) | const |
Calculates the last cycle in which dependences make it possible to try schedule the leader node.
Definition at line 81 of file MoveNodeGroup.cc.
References abortWithError.
int MoveNodeGroup::maxSinkDistance | ( | ) | const |
Returns the maximum distance from any movenode in the group to any sink.
Calling this may cause forever loop if the DDG has loops.
Definition at line 209 of file MoveNodeGroup.cc.
References ddg_, BoostGraph< GraphNode, GraphEdge >::maxSinkDistance(), node(), and nodeCount().
Referenced by RLPriorityCriticalPath::operator()(), and RLBUPriorityCriticalPath::operator()().
int MoveNodeGroup::maxSourceDistance | ( | ) | const |
Returns the maximum distance from any source node to any movenode in the group.
Calling this may cause forever loop if the DDG has loops.
Definition at line 230 of file MoveNodeGroup.cc.
References ddg_, BoostGraph< GraphNode, GraphEdge >::maxSourceDistance(), node(), and nodeCount().
Referenced by RLBUPriorityCriticalPath::operator()().
MoveNode & MoveNodeGroup::node | ( | int | index | ) | const |
Returns one MoveNode contained in this group.
index | The index of node which to return |
Definition at line 152 of file MoveNodeGroup.cc.
References nodes_.
Referenced by addNode(), LLVMTCEDataDependenceGraphBuilder::buildLocalDDG(), CycleLookBackSoftwareBypasser::bypass(), earliestCycle(), SequentialScheduler::handleBasicBlock(), BUBasicBlockScheduler::handleDDG(), BasicBlockScheduler::handleDDG(), BUBasicBlockScheduler::handleLoopDDG(), BasicBlockScheduler::handleLoopDDG(), BF2Scheduler::handleLoopDDG(), BUMoveNodeSelector::isReadyToBeScheduled(), maxSinkDistance(), maxSourceDistance(), ResourceConstraintAnalyzer::memoryBoundScheduleResourceUsage(), BasicBlockScheduler::notifyScheduled(), RLPriorityCriticalPath::operator()(), RLPriorityNodeId::operator()(), RLBUPriorityCriticalPath::operator()(), CycleLookBackSoftwareBypasser::removeBypass(), CycleLookBackSoftwareBypasser::removeDeadResults(), BF2Scheduler::scheduleDDG(), SequentialScheduler::scheduleOperandWrites(), BasicBlockScheduler::scheduleOperandWrites(), BUBasicBlockScheduler::scheduleOperandWrites(), SequentialScheduler::scheduleOperation(), BasicBlockScheduler::scheduleOperation(), BUBasicBlockScheduler::scheduleOperation(), SequentialScheduler::scheduleResultReads(), BasicBlockScheduler::scheduleResultReads(), BUBasicBlockScheduler::scheduleResultReads(), toString(), BasicBlockScheduler::tryToDelayOperands(), and SequentialMoveNodeSelector::~SequentialMoveNodeSelector().
int MoveNodeGroup::nodeCount | ( | ) | const |
Returns the number of movenodes in the group
Definition at line 140 of file MoveNodeGroup.cc.
References nodes_.
Referenced by MoveNodeGroupBuilder::build(), LLVMTCEDataDependenceGraphBuilder::buildLocalDDG(), CycleLookBackSoftwareBypasser::bypass(), SoftwareBypasser::bypass(), SequentialScheduler::handleBasicBlock(), BUBasicBlockScheduler::handleDDG(), BasicBlockScheduler::handleDDG(), BUBasicBlockScheduler::handleLoopDDG(), BasicBlockScheduler::handleLoopDDG(), BF2Scheduler::handleLoopDDG(), BUMoveNodeSelector::isReadyToBeScheduled(), maxSinkDistance(), maxSourceDistance(), ResourceConstraintAnalyzer::memoryBoundScheduleResourceUsage(), BUMoveNodeSelector::mightBeReady(), BasicBlockScheduler::notifyScheduled(), CycleLookBackSoftwareBypasser::removeBypass(), SoftwareBypasser::removeBypass(), CycleLookBackSoftwareBypasser::removeDeadResults(), SoftwareBypasser::removeDeadResults(), BF2Scheduler::scheduleDDG(), SequentialScheduler::scheduleOperandWrites(), BasicBlockScheduler::scheduleOperandWrites(), BUBasicBlockScheduler::scheduleOperandWrites(), SequentialScheduler::scheduleOperation(), BasicBlockScheduler::scheduleOperation(), BUBasicBlockScheduler::scheduleOperation(), SequentialScheduler::scheduleResultReads(), BasicBlockScheduler::scheduleResultReads(), BUBasicBlockScheduler::scheduleResultReads(), toString(), BasicBlockScheduler::tryToDelayOperands(), and SequentialMoveNodeSelector::~SequentialMoveNodeSelector().
|
inline |
Definition at line 75 of file MoveNodeGroup.hh.
References operation_.
Referenced by LLVMTCEDataDependenceGraphBuilder::buildLocalDDG(), ResourceConstraintAnalyzer::memoryBoundScheduleResourceUsage(), and toString().
|
inline |
in case this MNG contains strictly the nodes of a single operation, it can be set and queried with these methods
Definition at line 73 of file MoveNodeGroup.hh.
References operation_.
Referenced by MoveNodeGroupBuilder::build().
std::string MoveNodeGroup::toString | ( | ) | const |
Returns the disassembly of moves in NodeGroup as a string.
Definition at line 248 of file MoveNodeGroup.cc.
References isOperation(), node(), nodeCount(), programOperationPtr(), and MoveNode::toString().
Referenced by MoveNodeGroupBuilder::build(), BasicBlockScheduler::scheduleOperandWrites(), SequentialScheduler::scheduleOperation(), BasicBlockScheduler::scheduleOperation(), and BUBasicBlockScheduler::scheduleOperation().
bool MoveNodeGroup::writesJumpGuard | ( | ) | const |
Definition at line 260 of file MoveNodeGroup.cc.
References ddg_, DataDependenceEdge::EDGE_REGISTER, BoostGraph< GraphNode, GraphEdge >::hasNode(), BoostGraph< GraphNode, GraphEdge >::headNode(), TTAProgram::Move::isControlFlowMove(), MoveNode::isMove(), MoveNode::move(), nodes_, and BoostGraph< GraphNode, GraphEdge >::outEdges().
Referenced by RLBUPriorityCriticalPath::operator()().
|
private |
The data dependence graph the moves in this group belong to (optional).
Definition at line 82 of file MoveNodeGroup.hh.
Referenced by earliestCycle(), isAlive(), maxSinkDistance(), maxSourceDistance(), and writesJumpGuard().
|
private |
Definition at line 79 of file MoveNodeGroup.hh.
Referenced by addNode(), earliestCycle(), isAlive(), isPlaced(), isScheduled(), node(), nodeCount(), and writesJumpGuard().
|
private |
in case this MNG contains strictly the nodes of a single operation this can be set to point to it (optional)
Definition at line 85 of file MoveNodeGroup.hh.
Referenced by isOperation(), programOperationPtr(), and setProgramOperationPtr().