OpenASIP  2.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
MoveNode Class Reference

#include <MoveNode.hh>

Inheritance diagram for MoveNode:
Inheritance graph
Collaboration diagram for MoveNode:
Collaboration graph

Public Member Functions

 MoveNode (std::shared_ptr< TTAProgram::Move > newMove)
 
 MoveNode (std::shared_ptr< TTAProgram::Immediate > imm)
 
virtual ~MoveNode ()
 
MoveNodecopy ()
 
bool isSourceOperation () const
 
bool isGuardOperation () const
 
bool isDestinationOperation () const
 
unsigned int destinationOperationCount () const
 
bool isOperationMove () const
 
bool isSourceVariable () const
 
bool isSourceConstant () const
 
bool isSourceRA () const
 
bool isSourceImmediateRegister () const
 
bool isDestinationVariable () const
 
bool isBypass () const
 
bool isRegisterMove () const
 
bool inSameOperation (const MoveNode &other) const
 
bool isPlaced () const
 
bool isAssigned () const
 
bool isScheduled () const
 
void setCycle (const int newcycle)
 
void unsetCycle ()
 
int cycle () const
 
int earliestResultReadCycle () const
 
int latestTriggerWriteCycle () const
 
int guardLatency () const
 
Scopescope ()
 
ProgramOperationsourceOperation () const
 
ProgramOperationguardOperation () const
 
ProgramOperationdestinationOperation (unsigned int index=0) const
 
ProgramOperationPtr guardOperationPtr () const
 
ProgramOperationPtr sourceOperationPtr () const
 
ProgramOperationPtr destinationOperationPtr (unsigned int index=0) const
 
std::shared_ptr< TTAProgram::MovemovePtr ()
 
std::shared_ptr< const TTAProgram::MovemovePtr () const
 
std::shared_ptr< TTAProgram::ImmediateimmediatePtr ()
 
std::shared_ptr< const TTAProgram::ImmediateimmediatePtr () const
 
TTAProgram::Movemove ()
 
const TTAProgram::Movemove () const
 
TTAProgram::Immediateimmediate ()
 
const TTAProgram::Immediateimmediate () const
 
void addDestinationOperationPtr (ProgramOperationPtr po)
 
void setSourceOperationPtr (ProgramOperationPtr po)
 
void setGuardOperationPtr (ProgramOperationPtr po)
 
void clearDestinationOperation ()
 
void removeDestinationOperation (const ProgramOperation *po)
 
void unsetSourceOperation ()
 
void unsetGuardOperation ()
 
void finalize ()
 
bool isFinalized () const
 
void setIsInFrontier (bool inFrontier=true)
 
bool isInFrontier () const
 
bool isLastUnscheduledMoveOfDstOp () const
 
int type ()
 
std::string toString () const
 
std::string dotString () const
 
bool isMove () const
 
bool isImmediate () const
 
bool isSourceReg (const std::string &reg) const
 
 MoveNode ()
 Node can be entry node. More...
 
- Public Member Functions inherited from GraphNode
 GraphNode (int nodeID)
 
 GraphNode ()
 
virtual ~GraphNode ()
 
virtual GraphNodeclone () const
 
int nodeID () const
 

Private Member Functions

 MoveNode (const MoveNode &)
 Copying forbidden. Use copy() for a deep copy. More...
 
MoveNodeoperator= (const MoveNode &)
 Assignment forbidden. More...
 

Private Attributes

const std::shared_ptr< TTAProgram::Movemove_
 Pointer to Move this node represents, Node itself do not change move. More...
 
const std::shared_ptr< TTAProgram::Immediateimmediate_
 Pointer to Immediate this node represents, Node itself do not change move. More...
 
std::vector< ProgramOperationPtrdstOps_
 
ProgramOperationPtr srcOp_
 
ProgramOperationPtr guardOp_
 
int cycle_
 Cycle in which the node is placed. Each cycle uniquely identifies an instruction slot within the current scheduling scope. More...
 
bool placed_
 True when the node placed (is given a cycle in program). More...
 
bool finalized_
 The movenode cannot be unscheduled anymore, fixed in place. More...
 
bool isInFrontier_
 This is in scheduling frontier(used in Bubblefish scheduler) More...
 

Detailed Description

Node of the program representation.

A MoveNode represents one move of a TTA program.

Definition at line 65 of file MoveNode.hh.

Constructor & Destructor Documentation

◆ MoveNode() [1/4]

MoveNode::MoveNode ( std::shared_ptr< TTAProgram::Move newMove)
explicit

Constructor.

Creates a new node with a smart pointer to the given Move.

Parameters
newmovethe Move this node refers to.

Definition at line 75 of file MoveNode.cc.

75  :
76  move_(newMove), immediate_(nullptr), srcOp_(nullptr), guardOp_(nullptr),
77  cycle_(0), placed_(false), finalized_(false), isInFrontier_(false) {
78 }

◆ MoveNode() [2/4]

MoveNode::MoveNode ( std::shared_ptr< TTAProgram::Immediate imm)
explicit

Constructor.

Creates a new node with a smart pointer to the given immediate.

Parameters
immthe long immediate this node refers to.

Definition at line 87 of file MoveNode.cc.

87  :
88  move_(nullptr), immediate_(imm), srcOp_(nullptr), guardOp_(nullptr),
89  cycle_(0), placed_(false), finalized_(false), isInFrontier_(false) {
90 }

◆ ~MoveNode()

MoveNode::~MoveNode ( )
virtual

Destructor.

Deletes the owned Move instance. Does not unregister this movenode from ProgramOperations.

Definition at line 110 of file MoveNode.cc.

110  {
111 
112  if (isSourceOperation()) {
114  }
115  if (isGuardOperation()) {
117  }
118 
119  if (isDestinationOperation()) {
120  for (unsigned int i = 0; i < destinationOperationCount(); i++) {
122  }
123  }
124 }

References destinationOperation(), destinationOperationCount(), guardOperation(), isDestinationOperation(), isGuardOperation(), isSourceOperation(), ProgramOperation::removeGuardOutputNode(), ProgramOperation::removeInputNode(), ProgramOperation::removeOutputNode(), and sourceOperation().

Here is the call graph for this function:

◆ MoveNode() [3/4]

MoveNode::MoveNode ( )

Node can be entry node.

Constructor.

Creates a new node to be entry node.

Definition at line 99 of file MoveNode.cc.

99  :
100  move_(nullptr), immediate_(nullptr), srcOp_(nullptr), guardOp_(nullptr),
101  cycle_(0), placed_(false), finalized_(false), isInFrontier_(false) {
102 }

Referenced by copy().

◆ MoveNode() [4/4]

MoveNode::MoveNode ( const MoveNode )
private

Copying forbidden. Use copy() for a deep copy.

Member Function Documentation

◆ addDestinationOperationPtr()

void MoveNode::addDestinationOperationPtr ( ProgramOperationPtr  po)

◆ clearDestinationOperation()

void MoveNode::clearDestinationOperation ( )

Unsets destination operation.

Does not ask the ProgramOperation to remove this MoveNode from it's input moves.

Definition at line 730 of file MoveNode.cc.

730  {
731  dstOps_.clear();
732 }

References dstOps_.

Referenced by DataDependenceGraph::removeNode().

◆ copy()

MoveNode * MoveNode::copy ( )

Creates a deep copy of MoveNode.

Sets the source and destination operation of the copy to the same as original. Does not copy the cycle.

Returns
return copy of MoveNode.

Definition at line 135 of file MoveNode.cc.

135  {
136 
137  MoveNode* newNode = NULL;
138  if (move_ != NULL) {
139  newNode = new MoveNode(move_->copy());
140  } else {
141  if (immediate_) {
142  newNode = new MoveNode(immediate_->copy());
143  } else {
144  newNode = new MoveNode;
145  }
146  }
147 
148  if (isSourceOperation()) {
149  sourceOperation().addOutputNode(*newNode);
151  }
152 
153  if (isDestinationOperation()) {
154  for (unsigned int i = 0; i < destinationOperationCount(); i++) {
155  destinationOperation(i).addInputNode(*newNode);
157  }
158  }
159  return newNode;
160 }

References addDestinationOperationPtr(), ProgramOperation::addInputNode(), ProgramOperation::addOutputNode(), destinationOperation(), destinationOperationCount(), destinationOperationPtr(), immediate_, isDestinationOperation(), isSourceOperation(), move_, MoveNode(), setSourceOperationPtr(), sourceOperation(), and sourceOperationPtr().

Referenced by LoopPrologAndEpilogBuilder::build().

Here is the call graph for this function:

◆ cycle()

int MoveNode::cycle ( ) const

Returns the cycle (index) assigned to the node.

Returns
The cycle in which the node is placed.
Exceptions
InvalidDataif the node is not placed.

Definition at line 421 of file MoveNode.cc.

421  {
422  if (!isPlaced()){
423  std::string msg = "MoveNode was not placed yet: " + toString();
424  throw InvalidData(__FILE__, __LINE__, __func__, msg);
425  } else {
426  return cycle_;
427  }
428 }

References __func__, cycle_, isPlaced(), and toString().

Referenced by ResourceConstraintAnalyzer::analyze(), ResourceConstraintAnalyzer::analyzeMoveNode(), SimpleBrokerDirector::assign(), LoopPrologAndEpilogBuilder::build(), CycleLookBackSoftwareBypasser::bypass(), CycleLookBackSoftwareBypasser::bypassNode(), BUBasicBlockScheduler::bypassNode(), BFEarlyBypasser::bypassSourceLatestCycle(), SimpleBrokerDirector::canAssign(), ExecutionPipelineResource::canAssignSource(), CopyingDelaySlotFiller::checkIncomingDeps(), ExecutionPipelineResource::checkOperandAllowed(), BFOptimization::checkPrologDDG(), DataDependenceGraph::createRegisterAntiDependenciesBetweenNodes(), ResourceConstraintAnalyzer::dumpGraphWithStats(), DataDependenceGraph::earliestCycle(), ExecutionPipelineBroker::earliestFromDestination(), ExecutionPipelineBroker::earliestFromSource(), earliestResultReadCycle(), ExecutionPipelineResource::exclusiveMoves(), CopyingDelaySlotFiller::fillDelaySlots(), DataDependenceGraph::findLimitingAntidependenceDestination(), DataDependenceGraph::findLimitingAntidependenceSource(), DataDependenceGraph::firstRegisterCycle(), DataDependenceGraph::firstScheduledRegisterKill(), DataDependenceGraph::firstScheduledRegisterRead(), DataDependenceGraph::firstScheduledRegisterReads(), DataDependenceGraph::firstScheduledRegisterWrite(), DataDependenceGraph::firstScheduledRegisterWrites(), BasicBlockScheduler::handleRemovedResultMoves(), IUResource::immediateValue(), IUResource::immediateWriteCycle(), BFOptimization::jumpGuardAvailableCycle(), DataDependenceGraph::largestCycle(), DataDependenceGraph::lastGuardDefMove(), DataDependenceGraph::lastRegisterCycle(), DataDependenceGraph::lastScheduledRegisterGuardReads(), DataDependenceGraph::lastScheduledRegisterKill(), DataDependenceGraph::lastScheduledRegisterRead(), DataDependenceGraph::lastScheduledRegisterReads(), DataDependenceGraph::lastScheduledRegisterWrites(), DataDependenceGraph::latestCycle(), ExecutionPipelineBroker::latestFromDestination(), ExecutionPipelineBroker::latestFromSource(), latestTriggerWriteCycle(), ExecutionPipelineResource::latestTriggerWriteCycle(), DataDependenceGraph::movesAtCycle(), ExecutionPipelineResource::operandOverwritten(), ExecutionPipelineResource::operandSharePreventsTriggerForScheduledResult(), ExecutionPipelineResource::operandsOverwritten(), ExecutionPipelineResource::operandTooLate(), BFLateBypassGuard::operator()(), BFEarlyBypasser::operator()(), BFShareOperandsLate::operator()(), BFLateBypasses::operator()(), BFPostpassBypass::operator()(), BFPushAntidepsDown::operator()(), BFPushDepsUp::operator()(), BFRemoveGuardsFromSuccs::operator()(), BFRescheduleResultClose::operator()(), BFShareOperandWithScheduled::operator()(), BFPushMoveUp::operator()(), BFLateBypass::operator()(), BFRescheduleResultsClose::operator()(), BFPushMoveUp2::operator()(), BFRemoveGuardFromSucc::operator()(), BFShareOperandLate::operator()(), BUBasicBlockScheduler::ltstr::operator()(), ExecutionPipelineResource::otherTriggerBeforeMyTrigger(), BF2ScheduleFront::prefResultCycle(), LiveRangeData::registersAlive(), ExecutionPipelineResource::resultReadyCycle(), BasicBlockScheduler::scheduleInputOperandTempMoves(), BUBasicBlockScheduler::scheduleInputOperandTempMoves(), BasicBlockScheduler::scheduleMove(), BUBasicBlockScheduler::scheduleMove(), BUBasicBlockScheduler::scheduleOperand(), SequentialScheduler::scheduleOperandWrites(), BasicBlockScheduler::scheduleOperandWrites(), BUBasicBlockScheduler::scheduleOperandWrites(), BasicBlockScheduler::scheduleResultReads(), BUBasicBlockScheduler::scheduleResultReads(), BUBasicBlockScheduler::scheduleResultReadTempMoves(), BasicBlockScheduler::scheduleResultReadTempMoves(), BasicBlockScheduler::scheduleRRTempMoves(), BUBasicBlockScheduler::scheduleRRTempMoves(), AssignmentPlan::setRequest(), DataDependenceGraph::smallestCycle(), ExecutionPipelineResource::testTriggerResult(), toString(), ExecutionPipelineResource::triggerTooEarly(), CopyingDelaySlotFiller::tryToAssignNodes(), CopyingDelaySlotFiller::tryToAssignOtherMovesOfOp(), BasicBlockScheduler::tryToDelayOperands(), BasicBlockScheduler::tryToOptimizeWaw(), OutputFUBroker::unassign(), InputPSocketBroker::unassign(), OutputPSocketBroker::unassign(), IUResource::unassign(), ITemplateBroker::unassign(), InputFUBroker::unassign(), IUBroker::unassign(), SimpleBrokerDirector::unassign(), BusBroker::unassign(), BFOptimization::unassign(), ExecutionPipelineResource::unassignSource(), BFShareOperandLate::undoOnlyMe(), BFUnscheduleMove::unscheduleOriginal(), BFUnscheduleFromBody::unscheduleOriginal(), and DataDependenceGraph::writeToXMLFile().

Here is the call graph for this function:

◆ destinationOperation()

ProgramOperation& MoveNode::destinationOperation ( unsigned int  index = 0) const

Referenced by InputFUBroker::allAvailableResources(), BF2ScheduleFront::allNodesOfSameOperation(), ResourceConstraintAnalyzer::analyzeMoveNode(), Peel2BBLoops::appendBB(), BFOptimization::assign(), BFOptimization::assignCopyToPrologEpilog(), ExecutionPipelineResource::assignDestination(), MachineConnectivityCheck::busConnectedToAnyFU(), BusResource::canAssign(), BFOptimization::canAssign(), ExecutionPipelineResource::canAssignDestination(), BFOptimization::canBeSpeculated(), DataDependenceGraphBuilder::checkAndCreateMemDep(), PreOptimizer::checkGuardReversalAllowed(), ExecutionPipelineResource::checkOperandAllowed(), CopyingDelaySlotFiller::collectMoves(), copy(), dotString(), DataDependenceGraph::dotString(), ResourceConstraintAnalyzer::dumpGraphWithStats(), MoveNodeDuplicator::duplicateMove(), MoveNodeDuplicator::duplicateMoveNode(), DataDependenceGraph::earliestCycle(), ExecutionPipelineBroker::earliestFromDestination(), FUBroker::findDstFUOfMove(), BF2ScheduleFront::findInducingBypassSource(), MachineConnectivityCheck::findPossibleDestinationPorts(), BF2Scheduler::getDstUnit(), CopyingDelaySlotFiller::getMove(), BFOptimization::getSisterTrigger(), DataDependenceGraphBuilder::hasEarlierMemWriteToSameAddressWithSameGuard(), BFOptimization::immCountPreventsScheduling(), inSameOperation(), PreOptimizer::inverseGuardsOfHeads(), ExecutionPipelineResource::isDestOpOfMN(), isLastUnscheduledMoveOfDstOp(), ExecutionPipelineBroker::isMoveTrigger(), BF2Scheduler::isTrigger(), DataDependenceGraphBuilder::isTriggering(), DataDependenceGraph::latestCycle(), ExecutionPipelineBroker::latestFromDestination(), latestTriggerWriteCycle(), ExecutionPipelineResource::latestTriggerWriteCycle(), DataDependenceGraphBuilder::memoryCategory(), BUMoveNodeSelector::mightBeReady(), CriticalPathBBMoveNodeSelector::mightBeReady(), DataDependenceGraph::moveFUDependenciesToTrigger(), ExecutionPipelineResource::operandAllowedAtCycle(), ExecutionPipelineResource::operandOverwritten(), ExecutionPipelineResource::operandPort(), ExecutionPipelineResource::operandSharePreventsTriggerForScheduledResult(), ExecutionPipelineResource::operandsOverwritten(), ExecutionPipelineResource::operandTooLate(), BFRemoveLoopChecksAndJump::operator()(), BFPushMoveUp::operator()(), BFShareOperands::operator()(), BFScheduleBU::operator()(), BFShareOperandLate::operator()(), ResourceConstraintAnalyzer::optimalScheduleResourceUsage(), ExecutionPipelineResource::otherTriggerBeforeMyTrigger(), BF2Scheduler::preAllocateFunctionUnits(), DataDependenceGraph::predecessorsReady(), DataDependenceGraphBuilder::processMemWrite(), DataDependenceGraph::removeNode(), BFUnscheduleFromBody::returnOriginal(), BFUnscheduleMove::returnOriginal(), BFShareOperandLate::revert(), BFOptimization::RFReadPortCountPreventsScheduling(), BasicBlockScheduler::scheduleMove(), BUBasicBlockScheduler::scheduleMove(), SequentialScheduler::scheduleOperandWrites(), BUBasicBlockScheduler::scheduleOperandWrites(), SequentialScheduler::scheduleOperation(), BasicBlockScheduler::scheduleOperation(), BUBasicBlockScheduler::scheduleOperation(), DataDependenceGraph::successorsReady(), ExecutionPipelineResource::testTriggerResult(), ExecutionPipelineResource::triggerTooEarly(), CopyingDelaySlotFiller::tryToAssignOtherMovesOfDestOps(), ExecutionPipelineResource::unassignDestination(), BFLateBypass::undoOnlyMe(), BFUnscheduleMove::unscheduleOriginal(), BFUnscheduleFromBody::unscheduleOriginal(), DataDependenceGraph::writeToXMLFile(), and ~MoveNode().

◆ destinationOperationCount()

unsigned int MoveNode::destinationOperationCount ( ) const
inline

◆ destinationOperationPtr()

ProgramOperationPtr MoveNode::destinationOperationPtr ( unsigned int  index = 0) const

◆ dotString()

std::string MoveNode::dotString ( ) const
virtual

Returns Dot representation of the node.

Prints the disassembly of the move and sets the color of the node to red in case it's scheduled.

Returns
The string with node ID.

Reimplemented from GraphNode.

Definition at line 602 of file MoveNode.cc.

602  {
603 
604  std::string contents = GraphNode::dotString();
605  if (isOperationMove()) {
606  unsigned operationId = 0;
607 
608  // make the outline of the moves that belong to the same operation
609  // of the same color to aid in schedule debugging
610  if (isSourceOperation())
611  operationId = sourceOperation().poId();
612  else
613  operationId = destinationOperation().poId();
614 
615  // hash the colors so that they are easy to separate/recognise.
616  // srand();rand() pair only used as a hash function,
617  // this needs to be deterministic.
618  srand(operationId);
619  int operationColor = rand() / (RAND_MAX>>24);
620 
621  contents +=
622  (boost::format(
623  ",color=\"#%.6x\"") % operationColor).str();
624  }
625 
626  if (isScheduled()) {
627  if (isFinalized()) {
628  contents += ",shape=hexagon";
629  } else {
630  contents += ",shape=box";
631  }
632  } else {
633  if (!isInFrontier_) {
634  contents += ",shape=ellipse";
635  } else {
636  contents += ",shape=diamond";
637  }
638 
639  }
640  return contents;
641 }

References destinationOperation(), GraphNode::dotString(), isFinalized(), isInFrontier_, isOperationMove(), isScheduled(), isSourceOperation(), ProgramOperation::poId(), and sourceOperation().

Referenced by DataDependenceGraph::dotString(), and ResourceConstraintAnalyzer::dumpGraphWithStats().

Here is the call graph for this function:

◆ earliestResultReadCycle()

int MoveNode::earliestResultReadCycle ( ) const

Returns the cycle the given result move can be scheduled earliest, taking in the account the latency of the operation.

In case the trigger move has not been scheduled yet, returns INT_MAX.

Exceptions
IllegalObjectif this MoveNode is not a result read.

Definition at line 652 of file MoveNode.cc.

652  {
653 
654  const ProgramOperation* po;
655 
656  int outputIndex;
657  if (isSourceOperation()) {
658  po = &sourceOperation();
659  outputIndex = move_->source().operationIndex();
660  } else {
661  if (!isGuardOperation())
662  throw IllegalParameters(
663  __FILE__, __LINE__, __func__, "Not a result read move.");
664  po = &guardOperation();
665  outputIndex = po->outputIndexOfMove(*this);
666  }
667  try {
668  MoveNode* trigger = po->triggeringMove();
669  if (trigger == NULL || !trigger->isScheduled()) {
670  return INT_MAX;
671  }
672 
673  // find the latency of the operation output we are reading
674  const TTAMachine::HWOperation& hwop =
675  *trigger->move().destination().functionUnit().operation(
676  po->operation().name());
677 
678  return trigger->cycle() + hwop.latency(outputIndex);
679  } catch (const InvalidData& id) {
680  // triggeringMove() throws if the triggering move cannot be resolved
681  // again ignore this. causd by either
682  // incorrect scheduling order ( in RM tests) or
683  // broken machine ( catched by machinecheck now)
684  } catch (const Exception& e) {
686  }
687  return INT_MAX;
688 }

References __func__, abortWithError, cycle(), TTAProgram::Move::destination(), Exception::errorMessageStack(), TTAProgram::Terminal::functionUnit(), guardOperation(), isGuardOperation(), isScheduled(), isSourceOperation(), TTAMachine::HWOperation::latency(), move(), move_, Operation::name(), TTAMachine::FunctionUnit::operation(), ProgramOperation::operation(), ProgramOperation::outputIndexOfMove(), sourceOperation(), and ProgramOperation::triggeringMove().

Referenced by ExecutionPipelineResource::canAssignSource(), ExecutionPipelineBroker::earliestFromSource(), ExecutionPipelineBroker::latestFromSource(), BasicBlockScheduler::scheduleMove(), and SequentialScheduler::scheduleResultReads().

Here is the call graph for this function:

◆ finalize()

void MoveNode::finalize ( )

◆ guardLatency()

int MoveNode::guardLatency ( ) const

◆ guardOperation()

ProgramOperation & MoveNode::guardOperation ( ) const

◆ guardOperationPtr()

ProgramOperationPtr MoveNode::guardOperationPtr ( ) const

Definition at line 484 of file MoveNode.cc.

484  {
485  if (!isGuardOperation()){
486  std::string msg =
487  (boost::format(
488  "MoveNode: '%s' guard is not Operation.") % toString()).
489  str();
490  throw InvalidData(__FILE__, __LINE__, __func__, msg);
491  } else {
492  return guardOp_;
493  }
494 }

References __func__, guardOp_, isGuardOperation(), and toString().

Referenced by CopyingDelaySlotFiller::collectMoves(), MoveNodeDuplicator::duplicateMoveNode(), CopyingDelaySlotFiller::getMoveNode(), guardOperation(), CopyingDelaySlotFiller::tryToAssignNodes(), and CopyingDelaySlotFiller::tryToAssignOtherMovesOfOp().

Here is the call graph for this function:

◆ immediate() [1/2]

const TTAProgram::Immediate & MoveNode::immediate ( )

Definition at line 838 of file MoveNode.cc.

838  {
839  return *immediate_;
840 }

References immediate_.

Referenced by ITemplateBroker::assign(), ITemplateBroker::isAlreadyAssigned(), and ITemplateBroker::unassign().

◆ immediate() [2/2]

const TTAProgram::Immediate& MoveNode::immediate ( ) const

◆ immediatePtr() [1/2]

std::shared_ptr< TTAProgram::Immediate > MoveNode::immediatePtr ( )

Definition at line 846 of file MoveNode.cc.

846  {
847  return immediate_;
848 }

References immediate_.

Referenced by ITemplateBroker::allAvailableResources(), ITemplateBroker::assign(), and ITemplateBroker::unassign().

◆ immediatePtr() [2/2]

std::shared_ptr<const TTAProgram::Immediate> MoveNode::immediatePtr ( ) const

◆ inSameOperation()

bool MoveNode::inSameOperation ( const MoveNode other) const

Returns true if this MoveNode is in the same ProgramOperation as the given MoveNode.

Returns
True if both MoveNodes belong to the same ProgramOperation.

Definition at line 306 of file MoveNode.cc.

306  {
307 
308  if (other.isRegisterMove() || this->isRegisterMove())
309  return false;
310 
311  unsigned int dopCount1 = destinationOperationCount();
312  unsigned int dopCount2 = other.destinationOperationCount();
313 
314  if (isSourceOperation()) {
315  if (other.isSourceOperation()) {
316  if (&sourceOperation() == &other.sourceOperation()) {
317  return true;
318  }
319  }
320  for (unsigned int i = 0; i < dopCount2; i++) {
321  if (&other.destinationOperation(i) == &sourceOperation()) {
322  return true;
323  }
324  }
325  }
326 
327  for (unsigned int i = 0; i < dopCount1; i++) {
328  const ProgramOperation* dop = &destinationOperation(i);
329  if (other.isSourceOperation()) {
330  if (dop == &other.sourceOperation()) {
331  return true;
332  }
333  }
334 
335  for (unsigned int j = 0; j < dopCount2; j++) {
336  if (&other.destinationOperation(j) == dop) {
337  return true;
338  }
339  }
340  }
341  return false;
342 }

References destinationOperation(), destinationOperationCount(), isRegisterMove(), isSourceOperation(), and sourceOperation().

Referenced by DataDependenceGraph::earliestCycle(), DataDependenceGraph::edgeLatency(), DataDependenceGraph::latestCycle(), BUMoveNodeSelector::notifyScheduled(), and CriticalPathBBMoveNodeSelector::notifyScheduled().

Here is the call graph for this function:

◆ isAssigned()

bool MoveNode::isAssigned ( ) const

Tells whether the node is fully assigned.

A node is fully assigned when all the resources of the target processor necessary to carry out the transport it specifies are assigned to it.

Returns
True if all required scheduling resources of target machine are assigned to the node.

Machine found is NOT UniversalMachine - we are happy

Definition at line 367 of file MoveNode.cc.

367  {
368 
369  if (immediate_ != NULL) {
370  TTAProgram::Instruction* parent = immediate_->parent();
371  return parent != NULL &&
372  &parent->instructionTemplate() !=
373  &NullInstructionTemplate::instance();
374  }
375 
376  if (move_ == NULL) {
377  // probably a dummy ENTRYNODE or something
378  return false;
379  }
380 
381  /// Machine found is NOT UniversalMachine - we are happy
382  if (!move_->bus().machine()->isUniversalMachine()) {
383  if ((isSourceOperation() ||
384  isSourceVariable() ||
386  (move_->source().port().parentUnit()->machine() !=
387  move_->bus().machine())) {
388  return false;
389  }
391  (move_->destination().port().parentUnit()->machine() !=
392  move_->bus().machine())) {
393  return false;
394  }
395  return true;
396  }
397  return false;
398 }

References immediate_, TTAProgram::Instruction::instructionTemplate(), isDestinationOperation(), isDestinationVariable(), isSourceImmediateRegister(), isSourceOperation(), isSourceVariable(), and move_.

Referenced by ProgramOperation::areInputsAssigned(), ProgramOperation::areOutputsAssigned(), ProgramOperation::isAnyInputAssigned(), ProgramOperation::isAnyNodeAssigned(), ProgramOperation::isAnyOutputAssigned(), ProgramOperation::isAssigned(), isScheduled(), and DataDependenceEdge::latencySt().

Here is the call graph for this function:

◆ isBypass()

bool MoveNode::isBypass ( ) const

Tells whether the node is a `‘software bypass’' - both its source and its destination belong to operations.

Returns
True if both source and destination of the node are operation terminals.

Definition at line 280 of file MoveNode.cc.

280  {
282 }

References isDestinationOperation(), and isSourceOperation().

Referenced by CycleLookBackSoftwareBypasser::bypass(), and ResourceConstraintAnalyzer::dumpGraphWithStats().

Here is the call graph for this function:

◆ isDestinationOperation()

bool MoveNode::isDestinationOperation ( ) const
inline

Referenced by InputFUBroker::allAvailableResources(), CopyingDelaySlotFiller::allowedToSpeculate(), ResourceConstraintAnalyzer::analyzeMoveNode(), BFOptimization::assign(), BFOptimization::assignCopyToPrologEpilog(), ExecutionPipelineResource::assignDestination(), CycleLookBackSoftwareBypasser::bypass(), CycleLookBackSoftwareBypasser::bypassNode(), BFOptimization::canAssign(), ExecutionPipelineResource::canAssignDestination(), BFOptimization::canBeSpeculated(), PreOptimizer::checkGuardReversalAllowed(), CopyingDelaySlotFiller::collectMoves(), copy(), DataDependenceGraph::createSubgraph(), DataDependenceGraph::dotString(), ResourceConstraintAnalyzer::dumpGraphWithStats(), MoveNodeDuplicator::duplicateMove(), MoveNodeDuplicator::duplicateMoveNode(), DataDependenceGraph::earliestCycle(), ExecutionPipelineBroker::earliestFromDestination(), MachineConnectivityCheck::findPossibleDestinationPorts(), BF2Scheduler::getDstUnit(), CopyingDelaySlotFiller::getMove(), CopyingDelaySlotFiller::getMoveNode(), CopyingDelaySlotFiller::getProgramOperationPtr(), BFOptimization::getSisterTrigger(), BFOptimization::hasAmbiguousResources(), BFOptimization::immCountPreventsScheduling(), BUMoveNodeSelector::initializeReadylist(), CriticalPathBBMoveNodeSelector::initializeReadylist(), isAssigned(), isBypass(), ExecutionPipelineBroker::isMoveTrigger(), isOperationMove(), isRegisterMove(), DataDependenceGraph::latestCycle(), latestTriggerWriteCycle(), ExecutionPipelineResource::latestTriggerWriteCycle(), DataDependenceGraphBuilder::memoryCategory(), DataDependenceGraph::mergeAndKeepSource(), CriticalPathBBMoveNodeSelector::mightBeReady(), DataDependenceGraph::moveFUDependenciesToTrigger(), ExecutionPipelineResource::operandAllowedAtCycle(), ExecutionPipelineResource::operandPort(), BFRemoveLoopChecksAndJump::operator()(), BFPostpassBypass::operator()(), BFPushMoveUp::operator()(), BFScheduleBU::operator()(), ResourceConstraintAnalyzer::optimalScheduleResourceUsage(), DataDependenceGraph::predecessorsReady(), BF2ScheduleFront::prefResultCycle(), BFRemoveLoopChecksAndJump::queueAliveMove(), BFRemoveLoopChecksAndJump::removeMoveFromQueue(), DataDependenceGraph::removeNode(), BFRemoveLoopChecksAndJump::removePoFromQueue(), BFUnscheduleFromBody::returnOriginal(), BFUnscheduleMove::returnOriginal(), BFOptimization::RFReadPortCountPreventsScheduling(), SequentialScheduler::scheduleMove(), BasicBlockScheduler::scheduleMove(), BUBasicBlockScheduler::scheduleMove(), SequentialScheduler::scheduleOperandWrites(), BasicBlockScheduler::scheduleOperandWrites(), BUBasicBlockScheduler::scheduleOperandWrites(), BasicBlockScheduler::scheduleOperation(), BUBasicBlockScheduler::scheduleOperation(), BFOptimization::setPrologDstFUAnno(), DataDependenceGraph::successorsReady(), CopyingDelaySlotFiller::tryToAssignNodes(), CopyingDelaySlotFiller::tryToAssignOtherMovesOfOp(), BasicBlockScheduler::tryToDelayOperands(), ExecutionPipelineResource::unassignDestination(), BFUnscheduleMove::unscheduleOriginal(), BFUnscheduleFromBody::unscheduleOriginal(), DataDependenceGraph::writeToXMLFile(), and ~MoveNode().

◆ isDestinationVariable()

bool MoveNode::isDestinationVariable ( ) const

Tells whether the node (move) writes a program variable or, if assigned, a GPR.

Returns
True if the destination of the node is a variable or GPR.

Definition at line 264 of file MoveNode.cc.

264  {
265  if (move_ == NULL) {
266  return false;
267  }
268  return move_->destination().isGPR();
269 }

References move_.

Referenced by CycleLookBackSoftwareBypasser::bypassNode(), BUBasicBlockScheduler::bypassNode(), BUBasicBlockScheduler::finalizeSchedule(), isAssigned(), BF2Scheduler::isDestinationUniversalReg(), CriticalPathBBMoveNodeSelector::mightBeReady(), BFEarlyBypass::operator()(), BFScheduleTD::operator()(), BFRescheduleResultsClose::operator()(), BFScheduleBU::operator()(), and BF2ScheduleFront::tryToScheduleMoveOuter().

◆ isFinalized()

bool MoveNode::isFinalized ( ) const

◆ isGuardOperation()

bool MoveNode::isGuardOperation ( ) const

◆ isImmediate()

bool MoveNode::isImmediate ( ) const
inline

◆ isInFrontier()

bool MoveNode::isInFrontier ( ) const

◆ isLastUnscheduledMoveOfDstOp()

bool MoveNode::isLastUnscheduledMoveOfDstOp ( ) const

Definition at line 817 of file MoveNode.cc.

817  {
818  for (unsigned int i = 0; i < destinationOperationCount(); i++) {
819  const ProgramOperation& po = destinationOperation(i);
820  // ignore ops with just one input
821  if (po.inputMoveCount() == 1) {
822  continue;
823  }
824  bool fail = false;
825  for (int j = 0; j < po.inputMoveCount(); j++) {
826  MoveNode& inputNode = po.inputMove(j);
827  if (&inputNode != this && !inputNode.isScheduled()) {
828  fail = true;
829  break;
830  }
831  }
832  if (!fail)
833  return true;
834  }
835  return false;
836 }

References destinationOperation(), destinationOperationCount(), ProgramOperation::inputMove(), ProgramOperation::inputMoveCount(), and isScheduled().

Here is the call graph for this function:

◆ isMove()

bool MoveNode::isMove ( ) const
inline

Referenced by DataDependenceGraph::addNode(), ITemplateBroker::allAvailableResources(), PRegionAliasAnalyzer::analyze(), SimpleBrokerDirector::assign(), IUResource::canAssign(), SimpleBrokerDirector::canAssign(), CopyingDelaySlotFiller::checkIncomingDeps(), DataDependenceGraph::createSubgraph(), DataDependenceGraph::dotString(), DataDependenceGraph::edgeWeight(), DataDependenceGraph::exclusingGuards(), ExecutionPipelineResource::exclusiveMoves(), BF2Scheduler::findJump(), ResourceConstraintAnalyzer::findResourceConstrainedParent(), ConstantAliasAnalyzer::getConstantAddress(), StackAliasAnalyzer::getStackOffset(), guardLatency(), BUBasicBlockScheduler::handleDDG(), BasicBlockScheduler::handleDDG(), BUBasicBlockScheduler::handleLoopDDG(), BasicBlockScheduler::handleLoopDDG(), OutputFUBroker::isApplicable(), InputFUBroker::isApplicable(), InputPSocketBroker::isApplicable(), OutputPSocketBroker::isApplicable(), IUBroker::isApplicable(), BusBroker::isApplicable(), isSourceReg(), DataDependenceGraph::mergeAndKeepAllowed(), ProgramDependenceGraph::processRegion(), ProgramDependenceGraph::ProgramDependenceGraph(), DataDependenceGraph::removeNode(), RegisterRenamer::renameDestinationRegister(), RegisterRenamer::renameSourceRegister(), DataDependenceGraph::resultUsed(), DataDependenceGraph::sameGuards(), DataDependenceEdge::saveState(), ITemplateBroker::unassign(), SimpleBrokerDirector::unassign(), DataDependenceGraph::updateRegWrite(), MoveNodeGroup::writesJumpGuard(), and DataDependenceGraph::writeToXMLFile().

◆ isOperationMove()

bool MoveNode::isOperationMove ( ) const

Tells whether the move belongs to an operation execution.

Returns
True if the the node belongs to an operation.

Definition at line 253 of file MoveNode.cc.

253  {
255 }

References isDestinationOperation(), and isSourceOperation().

Referenced by dotString(), DataDependenceGraph::dotString(), SequentialScheduler::handleBasicBlock(), BUBasicBlockScheduler::handleDDG(), BasicBlockScheduler::handleDDG(), BUBasicBlockScheduler::handleLoopDDG(), and BasicBlockScheduler::handleLoopDDG().

Here is the call graph for this function:

◆ isPlaced()

bool MoveNode::isPlaced ( ) const

Tells whether is placed in the program representation, that is, has a cycle assigned to it.

Returns
True if a cycle is assigned to the node.

Definition at line 352 of file MoveNode.cc.

352  {
353  return placed_;
354 }

References placed_.

Referenced by SimpleBrokerDirector::assign(), SimpleBrokerDirector::canAssign(), ExecutionPipelineResource::canAssignSource(), ExecutionPipelineResource::checkOperandAllowed(), DataDependenceGraph::createRegisterAntiDependenciesBetweenNodes(), cycle(), DataDependenceGraph::earliestCycle(), ExecutionPipelineResource::exclusiveMoves(), DataDependenceGraph::findLimitingAntidependenceDestination(), DataDependenceGraph::findLimitingAntidependenceSource(), DataDependenceGraph::firstRegisterCycle(), DataDependenceGraph::firstScheduledRegisterKill(), DataDependenceGraph::firstScheduledRegisterRead(), DataDependenceGraph::firstScheduledRegisterReads(), DataDependenceGraph::firstScheduledRegisterWrite(), DataDependenceGraph::firstScheduledRegisterWrites(), isScheduled(), DataDependenceGraph::largestCycle(), DataDependenceGraph::lastRegisterCycle(), DataDependenceGraph::lastScheduledRegisterGuardReads(), DataDependenceGraph::lastScheduledRegisterKill(), DataDependenceGraph::lastScheduledRegisterRead(), DataDependenceGraph::lastScheduledRegisterReads(), DataDependenceGraph::lastScheduledRegisterWrites(), DataDependenceGraph::latestCycle(), ResourceConstraintAnalyzer::memoryBoundScheduleResourceUsage(), DataDependenceGraph::movesAtCycle(), ExecutionPipelineResource::operandAllowedAtCycle(), ExecutionPipelineResource::operandOverwritten(), ExecutionPipelineResource::operandsOverwritten(), ExecutionPipelineResource::operandTooLate(), DataDependenceGraph::otherSuccessorsScheduled(), DataDependenceGraph::predecessorsReady(), DataDependenceGraph::regRawSuccessorCount(), AssignmentPlan::resetAssignments(), ExecutionPipelineResource::resultReadyCycle(), DataDependenceGraph::scheduledMoves(), DataDependenceGraph::scheduledNodeCount(), AssignmentPlan::setRequest(), DataDependenceGraph::smallestCycle(), DataDependenceGraph::successorsReady(), ExecutionPipelineResource::testTriggerResult(), toString(), ExecutionPipelineResource::triggerTooEarly(), SimpleBrokerDirector::unassign(), BasicBlockScheduler::unschedule(), SequentialScheduler::unschedule(), DataDependenceGraph::unscheduledMoves(), and DataDependenceGraph::writeToXMLFile().

◆ isRegisterMove()

bool MoveNode::isRegisterMove ( ) const

Tells whether the node is a register move, thus not belong to any particular ProgramOperation.

It's either an immediate move to an register or a register to register copy.

Returns
True if the move is a register to register copy.

Definition at line 294 of file MoveNode.cc.

294  {
296 }

References isDestinationOperation(), and isSourceOperation().

Referenced by inSameOperation().

Here is the call graph for this function:

◆ isScheduled()

bool MoveNode::isScheduled ( ) const

Tells whether the node is completely scheduled.

A node is completely scheduled only if it is assigned to a program cycle and the necessary resources of the target processor are assigned to it.

Returns
True if the node is placed and assigned.

Definition at line 409 of file MoveNode.cc.

409  {
410  return isPlaced() && isAssigned();
411 }

References isAssigned(), and isPlaced().

Referenced by BFSwapOperands::BFSwapOperands(), CycleLookBackSoftwareBypasser::bypass(), CycleLookBackSoftwareBypasser::bypassNode(), BUBasicBlockScheduler::bypassNode(), BFEarlyBypasser::bypassSourceLatestCycle(), SimpleBrokerDirector::canAssign(), CopyingDelaySlotFiller::checkIncomingDeps(), BFOptimization::checkPrologDDG(), BUBasicBlockScheduler::clearRemovedNodes(), MoveNodeDuplicator::disposeMoveNode(), dotString(), MoveNodeDuplicator::duplicateMove(), ExecutionPipelineBroker::earliestFromDestination(), ExecutionPipelineBroker::earliestFromSource(), earliestResultReadCycle(), BUBasicBlockScheduler::finalizeSchedule(), BF2Scheduler::finalizeSchedule(), BUBasicBlockScheduler::findBypassDestinations(), MachineConnectivityCheck::findPossibleDestinationPorts(), MachineConnectivityCheck::findPossibleSourcePorts(), BF2Scheduler::getDstUnit(), BF2ScheduleFront::getMoveNodeFromFrontBU(), BUBasicBlockScheduler::handleDDG(), BF2Scheduler::handleLoopDDG(), BasicBlockScheduler::handleRemovedResultMoves(), BFOptimization::immCountPreventsScheduling(), isLastUnscheduledMoveOfDstOp(), ExecutionPipelineBroker::isMoveTrigger(), BFOptimization::jumpGuardAvailableCycle(), ExecutionPipelineBroker::latestFromDestination(), ExecutionPipelineBroker::latestFromSource(), latestTriggerWriteCycle(), ExecutionPipelineResource::latestTriggerWriteCycle(), CopyingDelaySlotFiller::loseCopies(), BUMoveNodeSelector::mightBeReady(), CriticalPathBBMoveNodeSelector::mightBeReady(), BUMoveNodeSelector::notifyScheduled(), CriticalPathBBMoveNodeSelector::notifyScheduled(), ExecutionPipelineResource::operandSharePreventsTriggerForScheduledResult(), RegisterCopyAdder::operandsScheduled(), BFLateBypassGuard::operator()(), BFEarlyBypass::operator()(), BFDRELate::operator()(), BFEarlyBypasser::operator()(), BFLateBypasses::operator()(), BFPostpassBypass::operator()(), BFPushAntidepsDown::operator()(), BFPushDepsUp::operator()(), BFRemoveGuardsFromSuccs::operator()(), BFScheduleTD::operator()(), BFPushMoveUp::operator()(), BFRescheduleResultsClose::operator()(), BFPushMoveUp2::operator()(), BFScheduleBU::operator()(), ExecutionPipelineResource::otherTriggerBeforeMyTrigger(), BUBasicBlockScheduler::precedingTempMove(), BF2ScheduleFront::prefResultCycle(), LiveRangeData::registersAlive(), CycleLookBackSoftwareBypasser::removeBypass(), CycleLookBackSoftwareBypasser::removeDeadResults(), ExecutionPipelineResource::resultCausesTriggerBetweenOperandSharing(), RegisterCopyAdder::resultsScheduled(), BFOptimization::RFReadPortCountPreventsScheduling(), BF2Scheduler::scheduleDDG(), BasicBlockScheduler::scheduleInputOperandTempMoves(), BUBasicBlockScheduler::scheduleInputOperandTempMoves(), SequentialScheduler::scheduleMove(), BasicBlockScheduler::scheduleMove(), BUBasicBlockScheduler::scheduleMove(), BUBasicBlockScheduler::scheduleOperand(), SequentialScheduler::scheduleOperandWrites(), BasicBlockScheduler::scheduleOperandWrites(), BUBasicBlockScheduler::scheduleOperandWrites(), BasicBlockScheduler::scheduleOperation(), BUBasicBlockScheduler::scheduleOperation(), SequentialScheduler::scheduleResultReads(), BasicBlockScheduler::scheduleResultReads(), BUBasicBlockScheduler::scheduleResultReads(), BUBasicBlockScheduler::scheduleResultReadTempMoves(), BasicBlockScheduler::scheduleResultReadTempMoves(), BasicBlockScheduler::scheduleRRTempMoves(), BUBasicBlockScheduler::scheduleRRTempMoves(), BasicBlockScheduler::succeedingTempMove(), toString(), CopyingDelaySlotFiller::tryToAssignNodes(), CopyingDelaySlotFiller::tryToAssignOtherMovesOfOp(), BUBasicBlockScheduler::tryToOptimizeWaw(), BasicBlockScheduler::tryToOptimizeWaw(), BUBasicBlockScheduler::undoBypass(), BFRegCopy::undoDDG(), BFScheduleMove::undoOnlyMe(), BFDRELoop::undoOnlyMe(), BFRescheduleMove::undoOnlyMe(), BFScheduleTD::undoOnlyMe(), BFScheduleBU::undoOnlyMe(), BasicBlockScheduler::unschedule(), SequentialScheduler::unschedule(), and BUBasicBlockScheduler::unscheduleAllNodes().

Here is the call graph for this function:

◆ isSourceConstant()

bool MoveNode::isSourceConstant ( ) const

◆ isSourceImmediateRegister()

bool MoveNode::isSourceImmediateRegister ( ) const

Tells whether the node (move) reads a Immediate Register

Returns
True if the source of the node is Immediate register.

Definition at line 223 of file MoveNode.cc.

223  {
224  if (move_ == NULL) {
225  return false;
226  }
227  return move_->source().isImmediateRegister();
228 }

References move_.

Referenced by ITemplateBroker::assign(), SimpleBrokerDirector::assign(), BFOptimization::assignCopyToPrologEpilog(), BFOptimization::canAssign(), IUBroker::immediateValue(), IUBroker::immediateWriteCycle(), IUBroker::isApplicable(), isAssigned(), BFOptimization::rmEC(), BFOptimization::rmLC(), and SimpleBrokerDirector::unassign().

◆ isSourceOperation()

bool MoveNode::isSourceOperation ( ) const

Tells whether the source of the MoveNode (move) belongs to an operation.

Returns
True if the source of the MoveNode is an operation output.

Definition at line 168 of file MoveNode.cc.

168  {
169  if (move_ == NULL) {
170  return false;
171  }
172  return srcOp_.get() != NULL;
173 }

References move_, and srcOp_.

Referenced by OutputFUBroker::allAvailableResources(), BF2ScheduleFront::allNodesOfSameOperation(), CopyingDelaySlotFiller::allowedToSpeculate(), LoopAnalyzer::analyze(), OffsetAliasAnalyzer::analyze(), ResourceConstraintAnalyzer::analyzeMoveNode(), OutputFUBroker::assign(), BFOptimization::assign(), ExecutionPipelineResource::assignSource(), CycleLookBackSoftwareBypasser::bypass(), CycleLookBackSoftwareBypasser::bypassNode(), BFEarlyBypasser::bypassSourceLatestCycle(), ExecutionPipelineResource::canAssignSource(), CopyingDelaySlotFiller::collectMoves(), copy(), TTAProgram::CodeGenerator::createForLoopBufferInit(), DataDependenceGraph::createSubgraph(), MemoryAliasAnalyzer::detectConstantScale(), dotString(), DataDependenceGraph::dotString(), MoveNodeDuplicator::duplicateMove(), MoveNodeDuplicator::duplicateMoveNode(), MoveNodeGroup::earliestCycle(), DataDependenceGraph::earliestCycle(), ExecutionPipelineBroker::earliestFromSource(), earliestResultReadCycle(), DataDependenceGraph::edgeLatency(), LoopAnalyzer::findEndCond(), MemoryAliasAnalyzer::findIncrement(), BF2ScheduleFront::findInducingBypassSource(), LoopAnalyzer::findInitAndUpdate(), DataDependenceGraph::findLoopIndexUpdate(), DataDependenceGraph::findLoopLimitAndIndex(), MachineConnectivityCheck::findPossibleDestinationPorts(), MachineConnectivityCheck::findPossibleSourcePorts(), ConstantAliasAnalyzer::getConstantAddress(), CopyingDelaySlotFiller::getMove(), CopyingDelaySlotFiller::getMoveNode(), CopyingDelaySlotFiller::getProgramOperationPtr(), StackAliasAnalyzer::getStackOffset(), BFOptimization::hasAmbiguousResources(), inSameOperation(), OffsetAliasAnalyzer::isAddressTraceable(), isAssigned(), isBypass(), isOperationMove(), isRegisterMove(), DataDependenceGraph::latestCycle(), ExecutionPipelineBroker::latestFromDestination(), ExecutionPipelineBroker::latestFromSource(), DataDependenceGraph::mergeAndKeepUser(), BUMoveNodeSelector::mightBeReady(), CriticalPathBBMoveNodeSelector::mightBeReady(), ExecutionPipelineResource::nextResultCycle(), BFLateBypassGuard::operator()(), BFLateBypasses::operator()(), BFUpdateMoveOnBypass::operator()(), BFPostpassBypass::operator()(), BFPushDepsUp::operator()(), BFScheduleTD::operator()(), BFPushMoveUp2::operator()(), BFScheduleExact::operator()(), BFScheduleBU::operator()(), ProgramOperation::outputIndexOfMove(), DataDependenceGraph::predecessorsReady(), BF2ScheduleFront::prefResultCycle(), BFRemoveLoopChecksAndJump::queueAliveMove(), BFRemoveLoopChecksAndJump::removeMoveFromQueue(), DataDependenceGraph::removeNode(), BFRemoveLoopChecksAndJump::removePoFromQueue(), ExecutionPipelineResource::resultCausesTriggerBetweenOperandSharing(), ExecutionPipelineResource::resultPort(), BFUnscheduleFromBody::returnOriginal(), BFUnscheduleMove::returnOriginal(), BasicBlockScheduler::scheduleMove(), BUBasicBlockScheduler::scheduleMove(), BasicBlockScheduler::scheduleOperandWrites(), BUBasicBlockScheduler::scheduleOperandWrites(), SequentialScheduler::scheduleOperation(), BasicBlockScheduler::scheduleOperation(), BUBasicBlockScheduler::scheduleOperation(), SequentialScheduler::scheduleResultReads(), BasicBlockScheduler::scheduleResultReads(), BUBasicBlockScheduler::scheduleResultReads(), BFOptimization::setPrologSrcFUAnno(), sourceOperationPtr(), DataDependenceGraph::successorsReady(), ExecutionPipelineResource::testTriggerResult(), PreOptimizer::tryToRemoveEq(), LoopAnalyzer::tryTrackCommonAncestor(), ExecutionPipelineResource::unassignSource(), BFUpdateMoveOnBypass::undoOnlyMe(), DataDependenceGraph::unMergeUser(), BFUnscheduleMove::unscheduleOriginal(), BFUnscheduleFromBody::unscheduleOriginal(), and ~MoveNode().

◆ isSourceRA()

bool MoveNode::isSourceRA ( ) const

Tells whether the node (move) reads the return address port. GPR.

Returns
True if the source of the node is the return address port.

Definition at line 210 of file MoveNode.cc.

210  {
211  if (move_ == NULL) {
212  return false;
213  }
214  return move_->source().isRA();
215 }

References move_.

Referenced by DataDependenceGraph::mergeAndKeepUser(), and BFMergeAndKeepUser::updateEdges().

◆ isSourceReg()

bool MoveNode::isSourceReg ( const std::string &  reg) const

Checks if the source of the movenode is the given reg.

This method assumes incoming reg name is in correct rf.number format, and does not check it, due performance reasons.

Parameters
regregister to check against source of the movenode
Returns
true if the source of the movenode is the given reg. false if some other reg or not reg.

Definition at line 798 of file MoveNode.cc.

798  {
799  if (!isMove()) {
800  return false;
801  }
802  if (!move().source().isGPR()) {
803  return false;
804  }
805 
806  // try to do as quickly as possible,
807  // compare the reg in string and reg in terminalregister.
808  size_t dotPlace = reg.find('.');
809  const std::string& rfName = move().source().registerFile().name();
810  if (reg.compare(0, dotPlace, rfName) != 0) {
811  return false;
812  }
813 
814  return atoi(reg.c_str()+dotPlace+1) == move().source().index();
815 }

References TTAProgram::Terminal::index(), isMove(), move(), TTAMachine::Component::name(), TTAProgram::Terminal::registerFile(), and TTAProgram::Move::source().

Referenced by StackAliasAnalyzer::getStackOffset(), and DataDependenceGraph::onlyRegisterRawAncestor().

Here is the call graph for this function:

◆ isSourceVariable()

bool MoveNode::isSourceVariable ( ) const

◆ latestTriggerWriteCycle()

int MoveNode::latestTriggerWriteCycle ( ) const

Returns the lates cycle the given trigger move can be scheduled at, taking in the account the latency of the operation results.

In case the none of the result moves has been scheduled yet, returns INT_MAX.

Exceptions
IllegalObjectif this MoveNode is not a result read.

Definition at line 698 of file MoveNode.cc.

698  {
699 
700  if (!isDestinationOperation())
701  throw IllegalParameters(
702  __FILE__, __LINE__, __func__, "Not a result read move.");
703 
705  int latestTrigger = INT_MAX;
706  for (int i = 0; i < po.outputMoveCount(); i++){
707  MoveNode& result = po.outputMove(i);
708  if (!result.isScheduled()) {
709  continue;
710  }
711  // find the latency of the operation output we are testing
712  const TTAMachine::HWOperation& hwop =
713  *result.move().source().functionUnit().operation(
714  po.operation().name());
715  // find the OSAL id of the operand of the output we are testing
716  const int outputIndex = result.move().source().operationIndex();
717  int latency = hwop.latency(outputIndex);
718  latestTrigger = std::min(latestTrigger, result.cycle() - latency);
719  }
720  return latestTrigger;
721 }

References __func__, cycle(), destinationOperation(), TTAProgram::Terminal::functionUnit(), isDestinationOperation(), isScheduled(), TTAMachine::HWOperation::latency(), move(), Operation::name(), TTAMachine::FunctionUnit::operation(), ProgramOperation::operation(), TTAProgram::Terminal::operationIndex(), ProgramOperation::outputMove(), ProgramOperation::outputMoveCount(), and TTAProgram::Move::source().

Referenced by BUBasicBlockScheduler::scheduleMove(), and BUBasicBlockScheduler::scheduleOperandWrites().

Here is the call graph for this function:

◆ move() [1/2]

TTAProgram::Move& MoveNode::move ( )

Referenced by RegisterCopyAdder::addCandidateSetAnnotations(), RegisterCopyAdder::addConnectionRegisterCopies(), RegisterCopyAdder::addConnectionRegisterCopiesImmediate(), ProgramOperation::addInputNode(), BFOptimization::addJumpGuardIfNeeded(), ProgramOperation::addNode(), DataDependenceGraph::addNode(), ProgramOperation::addOutputNode(), OutputFUBroker::allAvailableResources(), InputFUBroker::allAvailableResources(), IUBroker::allAvailableResources(), CopyingDelaySlotFiller::allowedToSpeculate(), LoopAnalyzer::analyze(), PRegionAliasAnalyzer::analyze(), OffsetAliasAnalyzer::analyze(), ResourceConstraintAnalyzer::analyze(), ResourceConstraintAnalyzer::analyzeMoveNode(), ResourceConstraintAnalyzer::analyzeRegisterAntideps(), annotateAllInputs(), annotateAllOutputs(), OutputPSocketResource::assign(), InputPSocketBroker::assign(), OutputPSocketBroker::assign(), IUResource::assign(), ITemplateBroker::assign(), SimpleBrokerDirector::assign(), IUBroker::assign(), BFOptimization::assign(), BFOptimization::assignCopyToPrologEpilog(), ExecutionPipelineResource::assignDestination(), BFSwapOperands::BFSwapOperands(), LoopPrologAndEpilogBuilder::build(), LLVMTCEDataDependenceGraphBuilder::buildLocalDDG(), MachineConnectivityCheck::busConnectedToAnyFU(), MachineConnectivityCheck::busConnectedToDestination(), CycleLookBackSoftwareBypasser::bypass(), CycleLookBackSoftwareBypasser::bypassNode(), InputPSocketResource::canAssign(), PSocketResource::canAssign(), OutputPSocketResource::canAssign(), BusResource::canAssign(), IUResource::canAssign(), SimpleBrokerDirector::canAssign(), BFOptimization::canAssign(), ExecutionPipelineResource::canAssignDestination(), ExecutionPipelineResource::canAssignSource(), MachineConnectivityCheck::canBypass(), MachineConnectivityCheck::canBypassOpToDst(), MachineConnectivityCheck::canSourceWriteToAnyDestinationPort(), BusBroker::canTransportImmediate(), DataDependenceGraphBuilder::checkAndCreateMemAntideps(), ExecutionPipelineResource::checkOperandAllowed(), CopyingDelaySlotFiller::collectMoves(), MachineConnectivityCheck::copyOpFUs(), RegisterCopyAdder::countAndAddConnectionRegisterCopiesToRR(), BF2Scheduler::countLoopInvariantValueUsages(), BFRegCopy::createAntidepsForReg(), RegisterCopyAdder::createAntidepsForReg(), TTAProgram::CodeGenerator::createBreakOperation(), TTAProgram::CodeGenerator::createForLoopBufferInit(), DataDependenceGraph::createRegisterAntiDependenciesBetweenNodes(), DataDependenceGraph::createSubgraph(), DataDependenceGraphBuilder::createTriggerDependencies(), BFOptimization::destinationFU(), DataDependenceGraph::destRenamed(), MemoryAliasAnalyzer::detectConstantScale(), MoveNodeDuplicator::disposeMoveNode(), DataDependenceGraph::dotString(), MoveNodeDuplicator::duplicateMoveNode(), ExecutionPipelineBroker::earliestFromDestination(), ExecutionPipelineBroker::earliestFromSource(), earliestResultReadCycle(), DataDependenceGraph::edgeWeight(), DataDependenceGraph::exclusingGuards(), ExecutionPipelineResource::exclusiveMoves(), BUBasicBlockScheduler::finalizeSchedule(), BUBasicBlockScheduler::findBypassDestinations(), FUBroker::findDstFUOfMove(), LoopAnalyzer::findEndCond(), RegisterRenamer::findGuardRegisters(), MemoryAliasAnalyzer::findIncrement(), LoopAnalyzer::findInitAndUpdate(), BF2Scheduler::findJump(), DataDependenceGraph::findLiveRange(), DataDependenceGraph::findLoopIndexUpdate(), DataDependenceGraph::findLoopLimitAndIndex(), MachineConnectivityCheck::findPossibleDestinationPorts(), MachineConnectivityCheck::findPossibleSourcePorts(), DataDependenceGraph::firstRegisterCycle(), DataDependenceGraph::firstScheduledRegisterKill(), DataDependenceGraph::firstScheduledRegisterRead(), DataDependenceGraph::firstScheduledRegisterReads(), DataDependenceGraph::firstScheduledRegisterWrite(), DataDependenceGraph::firstScheduledRegisterWrites(), ConstantAliasAnalyzer::getConstantAddress(), BF2Scheduler::getDstUnit(), CopyingDelaySlotFiller::getMoveNode(), BF2ScheduleFront::getPreferredLimits(), StackAliasAnalyzer::getStackOffset(), DataDependenceGraph::guardRenamed(), DataDependenceGraph::guardRestored(), DataDependenceGraph::guardsAllowBypass(), SequentialScheduler::handleBasicBlock(), BUBasicBlockScheduler::handleDDG(), BasicBlockScheduler::handleDDG(), BUBasicBlockScheduler::handleLoopDDG(), BasicBlockScheduler::handleLoopDDG(), BasicBlockScheduler::handleRemovedResultMoves(), BFOptimization::hasAmbiguousResources(), ProgramOperation::hasMoveNodeForMove(), BFOptimization::immCountPreventsScheduling(), IUResource::immediateValue(), IUResource::immediateWriteCycle(), RegisterRenamer::initializeFreeRegisters(), BUMoveNodeSelector::initializeReadylist(), CriticalPathBBMoveNodeSelector::initializeReadylist(), PreOptimizer::inverseGuardsOfHeads(), OffsetAliasAnalyzer::isAddressTraceable(), RegisterCopyAdder::isAllowedUnit(), OutputPSocketBroker::isAlreadyAssigned(), DataDependenceGraphBuilder::isAlwaysDifferentFU(), OutputPSocketBroker::isApplicable(), IUBroker::isApplicable(), BF2Scheduler::isDestinationUniversalReg(), ProgramOperation::isLegalFU(), ExecutionPipelineBroker::isMoveTrigger(), DataDependenceGraph::isNotAvoidable(), CriticalPathBBMoveNodeSelector::isReadyToBeScheduled(), isSourceReg(), BF2Scheduler::isSourceUniversalReg(), BF2Scheduler::isTrigger(), DataDependenceGraphBuilder::isTriggering(), BF2Scheduler::jumpGuard(), BFOptimization::jumpGuardAvailableCycle(), DataDependenceGraph::lastRegisterCycle(), DataDependenceGraph::lastScheduledRegisterGuardReads(), DataDependenceGraph::lastScheduledRegisterKill(), DataDependenceGraph::lastScheduledRegisterRead(), DataDependenceGraph::lastScheduledRegisterReads(), DataDependenceGraph::lastScheduledRegisterWrites(), DataDependenceEdge::latencySt(), ExecutionPipelineBroker::latestFromDestination(), ExecutionPipelineBroker::latestFromSource(), latestTriggerWriteCycle(), DataDependenceGraphBuilder::memoryCategory(), DataDependenceGraph::mergeAndKeepSource(), DataDependenceGraph::mergeAndKeepUser(), BUMoveNodeSelector::mightBeReady(), CriticalPathBBMoveNodeSelector::mightBeReady(), ProgramOperation::moveNode(), BF2Scheduler::mustBeTrigger(), ExecutionPipelineResource::operandAllowedAtCycle(), ExecutionPipelineResource::operandOverwritten(), ExecutionPipelineResource::operandPort(), ExecutionPipelineResource::operandSharePreventsTriggerForScheduledResult(), ExecutionPipelineResource::operandTooLate(), BFRemoveLoopChecksAndJump::operator()(), BFLateBypassGuard::operator()(), BFEarlyGuardBypass::operator()(), BFSchedulePreLoopShared::operator()(), BFDropPreShared::operator()(), BFShareOperandsLate::operator()(), BFRenameSource::operator()(), BFLateBypasses::operator()(), BFShareOperand::operator()(), BFTryRemoveGuard::operator()(), BFUpdateMoveOnBypass::operator()(), BFPostpassBypass::operator()(), BFRegCopy::operator()(), BFRescheduleResultClose::operator()(), BFRemoveGuardsFromSuccs::operator()(), BFShareOperandWithScheduled::operator()(), BFLateBypass::operator()(), BFScheduleTD::operator()(), BFShareOperands::operator()(), BFPushMoveUp::operator()(), BFPushAntidepDown::operator()(), BFRemoveGuard::operator()(), BFPushMoveUp2::operator()(), BFScheduleBU::operator()(), BFScheduleExact::operator()(), BFRemoveGuardFromSucc::operator()(), BFShareOperandLate::operator()(), RLBUPriorityCriticalPath::operator()(), ResourceConstraintAnalyzer::optimalScheduleResourceUsage(), ProgramOperation::outputIndexFromGuardOfMove(), ProgramOperation::outputIndexOfMove(), ExecutionPipelineResource::poConflictsWithInputPort(), BF2Scheduler::possibleTempRegRFs(), BF2Scheduler::preAllocateFunctionUnits(), BUBasicBlockScheduler::precedingTempMove(), BF2ScheduleFront::prefResultCycle(), DataDependenceGraphBuilder::processDestination(), DataDependenceGraphBuilder::processGuard(), DataDependenceGraphBuilder::processMemWrite(), DataDependenceGraphBuilder::processOperand(), ProgramDependenceGraph::processPredicate(), ProgramDependenceGraph::processRegion(), DataDependenceGraphBuilder::processRegWrite(), DataDependenceGraphBuilder::processResultRead(), DataDependenceGraphBuilder::processSource(), DataDependenceGraphBuilder::processTriggerMemoryAndFUStates(), DataDependenceGraphBuilder::processTriggerPO(), DataDependenceGraphBuilder::processTriggerRegistersAndOperations(), ProgramDependenceGraph::ProgramDependenceGraph(), CycleLookBackSoftwareBypasser::removeBypass(), CycleLookBackSoftwareBypasser::removeDeadResults(), ProgramDependenceGraph::removeGuardedJump(), ProgramOperation::removeInputNode(), DataDependenceGraph::removeNode(), ProgramOperation::removeOutputNode(), RegisterRenamer::renameDestinationRegister(), RegisterRenamer::renameLiveRange(), RegisterRenamer::renameSourceRegister(), AssignmentPlan::resetAssignments(), ExecutionPipelineResource::resourcesAllowTrigger(), ExecutionPipelineResource::resultAllowedAtCycle(), ExecutionPipelineResource::resultCausesTriggerBetweenOperandSharing(), ExecutionPipelineResource::resultPort(), DataDependenceGraph::resultUsed(), BFUnscheduleFromBody::returnOriginal(), BFUnscheduleMove::returnOriginal(), BF2Scheduler::revertBBLiveRangeBookkeepingForDestination(), BF2Scheduler::revertBBLiveRangeBookkeepingForSource(), BFOptimization::RFReadPortCountPreventsScheduling(), BFOptimization::rmEC(), BFOptimization::rmLC(), DataDependenceGraph::rWawRawEdgesOutUncond(), DataDependenceGraph::sameGuards(), DataDependenceGraph::sanityCheck(), DataDependenceEdge::saveState(), BF2ScheduleFront::scheduleFrontFromMove(), BasicBlockScheduler::scheduleInputOperandTempMoves(), BUBasicBlockScheduler::scheduleInputOperandTempMoves(), SequentialScheduler::scheduleMove(), BasicBlockScheduler::scheduleMove(), BUBasicBlockScheduler::scheduleMove(), BUBasicBlockScheduler::scheduleOperand(), SequentialScheduler::scheduleOperandWrites(), BasicBlockScheduler::scheduleOperandWrites(), BUBasicBlockScheduler::scheduleOperandWrites(), BasicBlockScheduler::scheduleResultReads(), BUBasicBlockScheduler::scheduleResultReads(), BUBasicBlockScheduler::scheduleResultReadTempMoves(), BasicBlockScheduler::scheduleResultReadTempMoves(), BUBasicBlockScheduler::scheduleRRMove(), BasicBlockScheduler::scheduleRRTempMoves(), BUBasicBlockScheduler::scheduleRRTempMoves(), MemoryAliasAnalyzer::searchLoopIndexBasedIncrement(), BFOptimization::setJumpGuard(), ProgramOperation::setOperation(), BFOptimization::setPrologDstFUAnno(), BFOptimization::setPrologSrcFUAnno(), BFOptimization::sourceFU(), DataDependenceGraph::sourceRenamed(), BFCopyRegWithOp::splitMove(), BFRegCopyAfter::splitMove(), BFRegCopyBefore::splitMove(), BasicBlockScheduler::succeedingTempMove(), ProgramOperation::switchInputs(), ExecutionPipelineResource::testTriggerResult(), ProgramOperation::triggeringMove(), ExecutionPipelineResource::triggerTooEarly(), CopyingDelaySlotFiller::tryToAssignNodes(), CopyingDelaySlotFiller::tryToAssignOtherMovesOfOp(), BasicBlockScheduler::tryToDelayOperands(), PreOptimizer::tryToOptimizeAddressReg(), BUBasicBlockScheduler::tryToOptimizeWaw(), BasicBlockScheduler::tryToOptimizeWaw(), PreOptimizer::tryToPrecalcConstantAdd(), PreOptimizer::tryToRemoveEq(), PreOptimizer::tryToRemoveGuardInversingOp(), PreOptimizer::tryToRemoveXor(), BUBasicBlockScheduler::tryToSwitchInputs(), BasicBlockScheduler::tryToSwitchInputs(), LoopAnalyzer::tryTrackCommonAncestor(), OutputFUBroker::unassign(), IUResource::unassign(), ITemplateBroker::unassign(), SimpleBrokerDirector::unassign(), ExecutionPipelineResource::unassignDestination(), BUBasicBlockScheduler::undoBypass(), BFEarlyGuardBypass::undoOnlyMe(), BFLateBypassGuard::undoOnlyMe(), BFUpdateMoveOnBypass::undoOnlyMe(), BFRescheduleMove::undoOnlyMe(), BFScheduleTD::undoOnlyMe(), BFRemoveGuard::undoOnlyMe(), BFScheduleBU::undoOnlyMe(), BFRemoveGuardFromSucc::undoOnlyMe(), BFCopyRegWithOp::undoSplit(), BFRegCopyAfter::undoSplit(), BFRegCopyBefore::undoSplit(), DataDependenceGraph::unMergeUser(), BF2Scheduler::unreservePreallocatedFUs(), BasicBlockScheduler::unschedule(), SequentialScheduler::unschedule(), BFUnscheduleMove::unscheduleOriginal(), BFUnscheduleFromBody::unscheduleOriginal(), BFOptimization::unsetJumpGuard(), BFMergeAndKeepUser::updateEdges(), BFOptimization::usePrologMove(), MoveNodeGroup::writesJumpGuard(), and DataDependenceGraph::writeToXMLFile().

◆ move() [2/2]

const TTAProgram::Move& MoveNode::move ( ) const

◆ movePtr() [1/2]

std::shared_ptr<TTAProgram::Move> MoveNode::movePtr ( )

◆ movePtr() [2/2]

std::shared_ptr<const TTAProgram::Move> MoveNode::movePtr ( ) const

◆ operator=()

MoveNode& MoveNode::operator= ( const MoveNode )
private

Assignment forbidden.

◆ removeDestinationOperation()

void MoveNode::removeDestinationOperation ( const ProgramOperation ptr)

Unsets destination operation.

Does not ask the ProgramOperation to remove this MoveNode from it's input moves.

Definition at line 741 of file MoveNode.cc.

741  {
742  for (std::vector<ProgramOperationPtr>::iterator i = dstOps_.begin();
743  i != dstOps_.end(); i++) {
744  if (((*i).get()) == ptr) {
745  dstOps_.erase(i);
746  return;
747  }
748  }
749  std::string msg = "Removed destination op not found in MoveNode";
750  throw InvalidData(__FILE__, __LINE__, __func__, msg);
751 }

References __func__, and dstOps_.

Referenced by BFShareOperand::operator()(), BFShareOperand::undoOnlyMe(), BFCopyRegWithOp::undoSplit(), and ProgramOperation::~ProgramOperation().

◆ scope()

Scope & MoveNode::scope ( )

Returns the enclosing scheduling scope of the node.

Returns
A scheduling scope.

TODO: Intentionally falsified code Class Scope does not exists so far in real

Definition at line 436 of file MoveNode.cc.

436  {
437  ///TODO: Intentionally falsified code
438  /// Class Scope does not exists so far in real
439  Scope* ns = new Scope;
440  return *ns;
441 }

◆ setCycle()

void MoveNode::setCycle ( const int  newcycle)

Set cycle for a node, also sets placed_

Parameters
newcycleCycle to which node is placed_
Exceptions
InvalidDataIf node is already placed in cycle different from newcycle

Definition at line 503 of file MoveNode.cc.

503  {
504  if (placed_ == true && cycle_ != newcycle) {
505  std::string msg = "MoveNode is already placed in cycle ";
506  msg += cycle_;
507  msg += ".";
508  throw InvalidData(__FILE__, __LINE__, __func__, msg);
509  }
510  cycle_ = newcycle;
511  placed_ = true;
512 }

References __func__, cycle_, and placed_.

Referenced by LoopPrologAndEpilogBuilder::build(), SimpleBrokerDirector::canAssign(), ResourceConstraintAnalyzer::memoryBoundScheduleResourceUsage(), AssignmentPlan::setRequest(), and AssignmentPlan::tryCachedAssignment().

◆ setGuardOperationPtr()

void MoveNode::setGuardOperationPtr ( ProgramOperationPtr  po)

Set a guard src of MoveNode to ProgramOperation

Parameters
poProgram operation that is source of MoveNode

Definition at line 550 of file MoveNode.cc.

550  {
551  guardOp_ = po;
552 }

References guardOp_.

Referenced by CopyingDelaySlotFiller::collectMoves(), MoveNodeDuplicator::duplicateMoveNode(), CopyingDelaySlotFiller::getMoveNode(), and DataDependenceGraph::guardConverted().

◆ setIsInFrontier()

void MoveNode::setIsInFrontier ( bool  inFrontier = true)

◆ setSourceOperationPtr()

void MoveNode::setSourceOperationPtr ( ProgramOperationPtr  po)

◆ sourceOperation()

ProgramOperation & MoveNode::sourceOperation ( ) const

Returns the instance of operation in the program whose output is the source of this node.

Returns
A program operation.
Exceptions
InvalidDataif the given node does not read an operation output.

Definition at line 453 of file MoveNode.cc.

453  {
454  return *sourceOperationPtr().get();
455 }

References sourceOperationPtr().

Referenced by OutputFUBroker::allAvailableResources(), BF2ScheduleFront::allNodesOfSameOperation(), CopyingDelaySlotFiller::allowedToSpeculate(), LoopAnalyzer::analyze(), OffsetAliasAnalyzer::analyze(), ResourceConstraintAnalyzer::analyzeMoveNode(), BFOptimization::assign(), ExecutionPipelineResource::assignSource(), BFEarlyBypasser::bypassSourceLatestCycle(), ExecutionPipelineResource::canAssignSource(), copy(), MemoryAliasAnalyzer::detectConstantScale(), dotString(), DataDependenceGraph::dotString(), ResourceConstraintAnalyzer::dumpGraphWithStats(), MoveNodeDuplicator::duplicateMove(), MoveNodeDuplicator::duplicateMoveNode(), DataDependenceGraph::earliestCycle(), ExecutionPipelineBroker::earliestFromSource(), earliestResultReadCycle(), LoopAnalyzer::findEndCond(), MemoryAliasAnalyzer::findIncrement(), BF2ScheduleFront::findInducingBypassSource(), LoopAnalyzer::findInitAndUpdate(), DataDependenceGraph::findLoopIndexUpdate(), DataDependenceGraph::findLoopLimitAndIndex(), MachineConnectivityCheck::findPossibleDestinationPorts(), MachineConnectivityCheck::findPossibleSourcePorts(), CopyingDelaySlotFiller::getMove(), DataDependenceGraph::guardRestored(), inSameOperation(), OffsetAliasAnalyzer::isAddressTraceable(), DataDependenceGraph::latestCycle(), ExecutionPipelineBroker::latestFromDestination(), ExecutionPipelineBroker::latestFromSource(), BUMoveNodeSelector::mightBeReady(), CriticalPathBBMoveNodeSelector::mightBeReady(), ExecutionPipelineResource::nextResultCycle(), BFLateBypassGuard::operator()(), BFPushMoveUp2::operator()(), ProgramOperation::outputIndexOfMove(), DataDependenceGraph::predecessorsReady(), BF2ScheduleFront::prefResultCycle(), DataDependenceGraph::removeNode(), ExecutionPipelineResource::resultCausesTriggerBetweenOperandSharing(), ExecutionPipelineResource::resultPort(), BFUnscheduleFromBody::returnOriginal(), BFUnscheduleMove::returnOriginal(), BasicBlockScheduler::scheduleMove(), BUBasicBlockScheduler::scheduleMove(), BUBasicBlockScheduler::scheduleOperandWrites(), SequentialScheduler::scheduleOperation(), BasicBlockScheduler::scheduleOperation(), BUBasicBlockScheduler::scheduleOperation(), MemoryAliasAnalyzer::searchLoopIndexBasedIncrement(), DataDependenceGraph::successorsReady(), ExecutionPipelineResource::testTriggerResult(), PreOptimizer::tryToRemoveEq(), LoopAnalyzer::tryTrackCommonAncestor(), ExecutionPipelineResource::unassignSource(), BFUpdateMoveOnBypass::undoOnlyMe(), DataDependenceGraph::unMergeUser(), BFUnscheduleFromBody::unscheduleOriginal(), BFUnscheduleMove::unscheduleOriginal(), ~MoveNode(), and ProgramOperation::~ProgramOperation().

Here is the call graph for this function:

◆ sourceOperationPtr()

ProgramOperationPtr MoveNode::sourceOperationPtr ( ) const

Definition at line 458 of file MoveNode.cc.

458  {
459  if (!isSourceOperation()){
460  std::string msg =
461  (boost::format(
462  "MoveNode: '%s' source is not Operation.") % toString()).
463  str();
464  throw InvalidData(__FILE__, __LINE__, __func__, msg);
465  } else {
466  return srcOp_;
467  }
468 }

References __func__, isSourceOperation(), srcOp_, and toString().

Referenced by copy(), DataDependenceGraph::createSubgraph(), MoveNodeDuplicator::duplicateMoveNode(), CopyingDelaySlotFiller::getMoveNode(), DataDependenceGraph::guardConverted(), DataDependenceGraph::mergeAndKeepUser(), BFEarlyGuardBypass::operator()(), BFUpdateMoveOnBypass::operator()(), BFRemoveLoopChecksAndJump::queueAliveMove(), BFRemoveLoopChecksAndJump::removeMoveFromQueue(), BFRemoveLoopChecksAndJump::removePoFromQueue(), and sourceOperation().

Here is the call graph for this function:

◆ toString()

std::string MoveNode::toString ( ) const
virtual

Returns string with ID of the MoveNode.

Not yet used anywhere except printing graph in .dot file. Returns the disassembly of the move along with its id.

Returns
The string with node ID.

Reimplemented from GraphNode.

Definition at line 576 of file MoveNode.cc.

576  {
577  if (move_ == NULL) {
578  return "-1:\tENTRYNODE";
579  }
580 #ifdef PRINT_ID
581  std::string content = Conversion::toString(nodeID()) + " ";
582 #else
583  std::string content;
584 #endif
585  content += (isPlaced() ? Conversion::toString(cycle()) + " " :
586  std::string()) + POMDisassembler::disassemble(*move_);
587  if (isScheduled()) {
588  content += " Bus: " + move_->bus().name();
589  }
590  return content;
591 }

References cycle(), POMDisassembler::disassemble(), isPlaced(), isScheduled(), move_, GraphNode::nodeID(), and Conversion::toString().

Referenced by RegisterCopyAdder::addConnectionRegisterCopies(), RegisterCopyAdder::addConnectionRegisterCopiesImmediate(), RegisterCopyAdder::addRegisterCopies(), RegisterCopyAdder::addRegisterCopiesToRRMove(), OutputFUBroker::allAvailableResources(), ResourceConstraintAnalyzer::analyzeMoveNode(), ResourceConstraintAnalyzer::analyzeRegisterAntideps(), SimpleResourceManager::assign(), SimpleBrokerDirector::assign(), IUBroker::assign(), BFOptimization::assign(), BFOptimization::assignCopyToPrologEpilog(), ExecutionPipelineResource::assignDestination(), BFSwapOperands::BFSwapOperands(), LoopPrologAndEpilogBuilder::build(), MoveNodeGroupBuilder::build(), BUBasicBlockScheduler::bypassNode(), BFEarlyBypasser::bypassSourceLatestCycle(), SimpleResourceManager::canAssign(), SimpleBrokerDirector::canAssign(), BFOptimization::canAssign(), ExecutionPipelineResource::canAssignDestination(), ExecutionPipelineResource::canAssignSource(), BUMoveNodeSelector::candidates(), ExecutionPipelineResource::checkOperandAllowed(), BFOptimization::checkPrologDDG(), DataDependenceGraph::copyDepsOver(), RegisterCopyAdder::countAndAddConnectionRegisterCopiesToRR(), BF2Scheduler::countLoopInvariantValueUsages(), cycle(), MoveNodeDuplicator::disposeMoveNode(), DataDependenceGraph::dotString(), ResourceConstraintAnalyzer::dumpGraphWithStats(), MoveNodeGroup::earliestCycle(), SimpleResourceManager::earliestCycle(), BUBasicBlockScheduler::finalizeSchedule(), BF2Scheduler::finalizeSchedule(), LoopAnalyzer::findEndCond(), LoopAnalyzer::findInitAndUpdate(), MachineConnectivityCheck::findPossibleDestinationPorts(), DataDependenceGraph::getBasicBlockNode(), BF2Scheduler::getDstUnit(), BF2ScheduleFront::getMoveNodeFromFrontBU(), BF2ScheduleFront::getPreferredLimits(), guardOperationPtr(), SequentialScheduler::handleBasicBlock(), BBSchedulerController::handleBasicBlock(), BUBasicBlockScheduler::handleDDG(), BasicBlockScheduler::handleDDG(), BF2Scheduler::handleLoopDDG(), BasicBlockScheduler::handleRemovedResultMoves(), BUMoveNodeSelector::initializeReadylist(), BF2Scheduler::jumpGuard(), BFOptimization::jumpGuardAvailableCycle(), SimpleResourceManager::latestCycle(), ExecutionPipelineBroker::latestFromSource(), ResourceConstraintAnalyzer::memoryBoundScheduleResourceUsage(), DataDependenceGraphBuilder::memoryCategory(), DataDependenceGraph::mergeAndKeepAllowed(), ExecutionPipelineResource::operandAllowedAtCycle(), ExecutionPipelineResource::operandOverwritten(), BFLateBypassGuard::operator()(), BFSchedulePreLoopShared::operator()(), BFEarlyBypass::operator()(), BFDRELate::operator()(), BFEarlyBypasser::operator()(), BFShareOperandsLate::operator()(), BFDropPreShared::operator()(), BFLateBypasses::operator()(), BFShareOperand::operator()(), BFRemoveEdge::operator()(), BFPushAntidepsDown::operator()(), BFPostpassBypass::operator()(), BFPostpassLoopDRE::operator()(), BFPushDepsUp::operator()(), BFRemoveGuardsFromSuccs::operator()(), BFRescheduleResultClose::operator()(), BFDRELoop::operator()(), BFShareOperandWithScheduled::operator()(), BFLateBypass::operator()(), BFScheduleTD::operator()(), BFShareOperands::operator()(), BFPushMoveUp::operator()(), BFPushAntidepDown::operator()(), BFRemoveGuard::operator()(), BF2ScheduleFront::operator()(), BFPushMoveUp2::operator()(), BFScheduleExact::operator()(), BFScheduleBU::operator()(), BFRemoveGuardFromSucc::operator()(), BFShareOperandLate::operator()(), BF2Scheduler::possibleTempRegRFs(), BF2Scheduler::preAllocateFunctionUnits(), BF2ScheduleFront::prefResultCycle(), DataDependenceGraphBuilder::processDestination(), DataDependenceGraphBuilder::processGuard(), BFRemoveLoopChecksAndJump::queueAliveMove(), BFRemoveLoopChecksAndJump::removeMoveFromQueue(), DataDependenceGraph::removeRAWEdges(), RegisterRenamer::renameLiveRange(), ExecutionPipelineResource::resultAllowedAtCycle(), BFUnscheduleFromBody::returnOriginal(), BFUnscheduleMove::returnOriginal(), BFShareOperandLate::revert(), BF2Scheduler::revertBBLiveRangeBookkeepingForDestination(), BF2Scheduler::revertBBLiveRangeBookkeepingForSource(), BFOptimization::rmEC(), BFOptimization::rmLC(), DataDependenceGraph::sanityCheck(), BF2Scheduler::scheduleDDG(), BF2ScheduleFront::scheduleFrontFromMove(), BUBasicBlockScheduler::scheduleInputOperandTempMoves(), BF2ScheduleFront::scheduleMove(), SequentialScheduler::scheduleMove(), BasicBlockScheduler::scheduleMove(), BUBasicBlockScheduler::scheduleMove(), BasicBlockScheduler::scheduleOperandWrites(), BUBasicBlockScheduler::scheduleOperandWrites(), SequentialScheduler::scheduleResultReads(), BasicBlockScheduler::scheduleResultReads(), BUBasicBlockScheduler::scheduleResultReads(), BUBasicBlockScheduler::scheduleRRTempMoves(), BFOptimization::setJumpGuard(), BFOptimization::setPrologDstFUAnno(), BFOptimization::setPrologSrcFUAnno(), AssignmentPlan::setRequest(), sourceOperationPtr(), BFRegCopyAfter::splitMove(), ExecutionPipelineResource::testTriggerResult(), MoveNodeGroup::toString(), ProgramDependenceNode::toString(), ExecutionPipelineResource::triggerTooEarly(), BF2ScheduleFront::tryRevertEarlierBypass(), BF2ScheduleFront::tryToScheduleMoveOuter(), SimpleResourceManager::unassign(), IUBroker::unassign(), SimpleBrokerDirector::unassign(), BFOptimization::unassign(), BFOptimization::unassignCopyFromPrologEpilog(), ExecutionPipelineResource::unassignDestination(), BUBasicBlockScheduler::undoBypass(), BFRegCopy::undoDDG(), BFLateBypassGuard::undoOnlyMe(), BFSchedulePreLoopShared::undoOnlyMe(), BFDropPreShared::undoOnlyMe(), BFScheduleMove::undoOnlyMe(), BFRemoveEdge::undoOnlyMe(), BFShareOperand::undoOnlyMe(), BFPostpassBypass::undoOnlyMe(), BFRescheduleMove::undoOnlyMe(), BFLateBypass::undoOnlyMe(), BFScheduleTD::undoOnlyMe(), BFShareOperandWithScheduled::undoOnlyMe(), BFScheduleBU::undoOnlyMe(), BFRemoveGuardFromSucc::undoOnlyMe(), BFRegCopyAfter::undoSplit(), BasicBlockScheduler::unschedule(), SequentialScheduler::unschedule(), BFUnscheduleMove::unscheduleOriginal(), BFUnscheduleFromBody::unscheduleOriginal(), BFOptimization::unsetJumpGuard(), and DataDependenceGraph::writeToXMLFile().

Here is the call graph for this function:

◆ type()

int MoveNode::type ( )

Returns type of the MoveNode.

Not yet used anywhere and types not decided so current dummy implementation returns -1

Returns
type of the node

Definition at line 563 of file MoveNode.cc.

563  {
564  return -1;
565 }

◆ unsetCycle()

void MoveNode::unsetCycle ( )

Unset cycle from nodes

Exceptions
InvalidDataIf node is not placed

Definition at line 519 of file MoveNode.cc.

519  {
520  if (placed_ == false ) {
521  std::string msg = "MoveNode is not placed.";
522  throw InvalidData(__FILE__, __LINE__, __func__, msg);
523  }
524  cycle_ = 0;
525  placed_ = false;
526 }

References __func__, cycle_, and placed_.

Referenced by AssignmentPlan::resetAssignments(), and AssignmentPlan::tryCachedAssignment().

◆ unsetGuardOperation()

void MoveNode::unsetGuardOperation ( )

Unsets guard operation.

Does not ask the ProgramOperation to remove this MoveNode from it's output moves.

Definition at line 771 of file MoveNode.cc.

771  {
773 }

References guardOp_.

Referenced by DataDependenceGraph::guardRestored(), CopyingDelaySlotFiller::tryToAssignNodes(), CopyingDelaySlotFiller::tryToAssignOtherMovesOfOp(), and ProgramOperation::~ProgramOperation().

◆ unsetSourceOperation()

void MoveNode::unsetSourceOperation ( )

Unsets source operation.

Does not ask the ProgramOperation to remove this MoveNode from it's output moves.

Definition at line 760 of file MoveNode.cc.

760  {
762 }

References srcOp_.

Referenced by DataDependenceGraph::removeNode(), PreOptimizer::tryToPrecalcConstantAdd(), BFUpdateMoveOnBypass::undoOnlyMe(), BFCopyRegWithOp::undoSplit(), DataDependenceGraph::unMergeUser(), and ProgramOperation::~ProgramOperation().

Member Data Documentation

◆ cycle_

int MoveNode::cycle_
private

Cycle in which the node is placed. Each cycle uniquely identifies an instruction slot within the current scheduling scope.

Definition at line 168 of file MoveNode.hh.

Referenced by cycle(), setCycle(), and unsetCycle().

◆ dstOps_

std::vector<ProgramOperationPtr> MoveNode::dstOps_
private

◆ finalized_

bool MoveNode::finalized_
private

The movenode cannot be unscheduled anymore, fixed in place.

Definition at line 174 of file MoveNode.hh.

◆ guardOp_

ProgramOperationPtr MoveNode::guardOp_
private

◆ immediate_

const std::shared_ptr<TTAProgram::Immediate> MoveNode::immediate_
private

Pointer to Immediate this node represents, Node itself do not change move.

Definition at line 158 of file MoveNode.hh.

Referenced by copy(), immediate(), immediatePtr(), isAssigned(), and isImmediate().

◆ isInFrontier_

bool MoveNode::isInFrontier_
private

This is in scheduling frontier(used in Bubblefish scheduler)

Definition at line 177 of file MoveNode.hh.

Referenced by dotString().

◆ move_

const std::shared_ptr<TTAProgram::Move> MoveNode::move_
private

◆ placed_

bool MoveNode::placed_
private

True when the node placed (is given a cycle in program).

Definition at line 171 of file MoveNode.hh.

Referenced by isPlaced(), setCycle(), and unsetCycle().

◆ srcOp_

ProgramOperationPtr MoveNode::srcOp_
private

The documentation for this class was generated from the following files:
ProgramOperation::operation
const Operation & operation() const
Definition: ProgramOperation.cc:590
MoveNode::placed_
bool placed_
True when the node placed (is given a cycle in program).
Definition: MoveNode.hh:171
MoveNode::isDestinationVariable
bool isDestinationVariable() const
Definition: MoveNode.cc:264
ProgramOperation::removeInputNode
void removeInputNode(MoveNode &node)
Definition: ProgramOperation.cc:289
TTAMachine::Component::name
virtual TCEString name() const
Definition: MachinePart.cc:125
MoveNode::toString
std::string toString() const
Definition: MoveNode.cc:576
MoveNode::guardOperationPtr
ProgramOperationPtr guardOperationPtr() const
Definition: MoveNode.cc:484
TTAProgram::Terminal::index
virtual int index() const
Definition: Terminal.cc:274
TTAMachine::HWOperation
Definition: HWOperation.hh:52
MoveNode::finalized_
bool finalized_
The movenode cannot be unscheduled anymore, fixed in place.
Definition: MoveNode.hh:174
TTAProgram::Terminal::registerFile
virtual const TTAMachine::RegisterFile & registerFile() const
Definition: Terminal.cc:225
MoveNode::isDestinationOperation
bool isDestinationOperation() const
TTAProgram::Instruction
Definition: Instruction.hh:57
GraphNode::dotString
virtual std::string dotString() const
Definition: GraphNode.cc:76
MoveNode::isFinalized
bool isFinalized() const
TTAProgram::Move::destination
Terminal & destination() const
Definition: Move.cc:323
GraphNode::nodeID
int nodeID() const
ProgramOperation
Definition: ProgramOperation.hh:70
MoveNode
Definition: MoveNode.hh:65
Operation::name
virtual TCEString name() const
Definition: Operation.cc:93
Scope
Definition: MoveNode.hh:50
Conversion::toString
static std::string toString(const T &source)
ProgramOperation::triggeringMove
MoveNode * triggeringMove() const
Definition: ProgramOperation.cc:643
ProgramOperationPtr
std::shared_ptr< ProgramOperation > ProgramOperationPtr
Definition: MoveNode.hh:52
ProgramOperation::addOutputNode
void addOutputNode(MoveNode &node, int outputIndex)
Definition: ProgramOperation.cc:167
MoveNode::isSourceImmediateRegister
bool isSourceImmediateRegister() const
Definition: MoveNode.cc:223
MoveNode::MoveNode
MoveNode()
Node can be entry node.
Definition: MoveNode.cc:99
MoveNode::isPlaced
bool isPlaced() const
Definition: MoveNode.cc:352
MoveNode::srcOp_
ProgramOperationPtr srcOp_
Definition: MoveNode.hh:162
MoveNode::setSourceOperationPtr
void setSourceOperationPtr(ProgramOperationPtr po)
Definition: MoveNode.cc:541
MoveNode::sourceOperation
ProgramOperation & sourceOperation() const
Definition: MoveNode.cc:453
MoveNode::isMove
bool isMove() const
MoveNode::isGuardOperation
bool isGuardOperation() const
Definition: MoveNode.cc:181
IllegalParameters
Definition: Exception.hh:113
TTAProgram::Terminal::operationIndex
virtual int operationIndex() const
Definition: Terminal.cc:364
abortWithError
#define abortWithError(message)
Definition: Application.hh:72
MoveNode::cycle
int cycle() const
Definition: MoveNode.cc:421
InvalidData
Definition: Exception.hh:149
MoveNode::addDestinationOperationPtr
void addDestinationOperationPtr(ProgramOperationPtr po)
Definition: MoveNode.cc:533
__func__
#define __func__
Definition: Application.hh:67
MoveNode::guardOp_
ProgramOperationPtr guardOp_
Definition: MoveNode.hh:164
Exception::errorMessageStack
std::string errorMessageStack(bool messagesOnly=false) const
Definition: Exception.cc:138
MoveNode::isSourceOperation
bool isSourceOperation() const
Definition: MoveNode.cc:168
ProgramOperation::removeGuardOutputNode
void removeGuardOutputNode(MoveNode &node)
Definition: ProgramOperation.cc:249
Exception
Definition: Exception.hh:54
MoveNode::cycle_
int cycle_
Cycle in which the node is placed. Each cycle uniquely identifies an instruction slot within the curr...
Definition: MoveNode.hh:168
MoveNode::destinationOperationCount
unsigned int destinationOperationCount() const
ProgramOperation::inputMoveCount
int inputMoveCount() const
Definition: ProgramOperation.cc:600
MoveNode::dstOps_
std::vector< ProgramOperationPtr > dstOps_
Definition: MoveNode.hh:160
MoveNode::move_
const std::shared_ptr< TTAProgram::Move > move_
Pointer to Move this node represents, Node itself do not change move.
Definition: MoveNode.hh:155
ProgramOperation::outputMoveCount
int outputMoveCount() const
Definition: ProgramOperation.cc:610
TTAProgram::Instruction::instructionTemplate
const TTAMachine::InstructionTemplate & instructionTemplate() const
Definition: Instruction.cc:523
TTAProgram::Terminal::functionUnit
virtual const TTAMachine::FunctionUnit & functionUnit() const
Definition: Terminal.cc:251
MoveNode::isSourceVariable
bool isSourceVariable() const
Definition: MoveNode.cc:196
MoveNode::destinationOperation
ProgramOperation & destinationOperation(unsigned int index=0) const
ProgramOperation::addInputNode
void addInputNode(MoveNode &node)
Definition: ProgramOperation.cc:144
MoveNode::destinationOperationPtr
ProgramOperationPtr destinationOperationPtr(unsigned int index=0) const
MoveNode::move
TTAProgram::Move & move()
POMDisassembler::disassemble
static std::string disassemble(const TTAProgram::Move &move)
Definition: POMDisassembler.cc:629
MoveNode::isRegisterMove
bool isRegisterMove() const
Definition: MoveNode.cc:294
MoveNode::isOperationMove
bool isOperationMove() const
Definition: MoveNode.cc:253
MoveNode::sourceOperationPtr
ProgramOperationPtr sourceOperationPtr() const
Definition: MoveNode.cc:458
MoveNode::isScheduled
bool isScheduled() const
Definition: MoveNode.cc:409
TTAProgram::Move::source
Terminal & source() const
Definition: Move.cc:302
ProgramOperation::poId
unsigned int poId() const
Definition: ProgramOperation.cc:765
TTAMachine::FunctionUnit::operation
virtual HWOperation * operation(const std::string &name) const
Definition: FunctionUnit.cc:363
TTAMachine::HWOperation::latency
int latency() const
Definition: HWOperation.cc:216
MoveNode::isAssigned
bool isAssigned() const
Definition: MoveNode.cc:367
ProgramOperation::outputMove
MoveNode & outputMove(int index) const
Definition: ProgramOperation.cc:632
MoveNode::immediate_
const std::shared_ptr< TTAProgram::Immediate > immediate_
Pointer to Immediate this node represents, Node itself do not change move.
Definition: MoveNode.hh:158
MoveNode::isInFrontier_
bool isInFrontier_
This is in scheduling frontier(used in Bubblefish scheduler)
Definition: MoveNode.hh:177
ProgramOperation::outputIndexOfMove
int outputIndexOfMove(const MoveNode &mn) const
Definition: ProgramOperation.cc:886
ProgramOperation::removeOutputNode
void removeOutputNode(MoveNode &node, int outputIndex)
Definition: ProgramOperation.cc:214
ProgramOperation::inputMove
MoveNode & inputMove(int index) const
Definition: ProgramOperation.cc:621
MoveNode::guardOperation
ProgramOperation & guardOperation() const
Definition: MoveNode.cc:479