OpenASIP 2.2
Loading...
Searching...
No Matches
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.
 
- 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.
 
MoveNodeoperator= (const MoveNode &)
 Assignment forbidden.
 

Private Attributes

const std::shared_ptr< TTAProgram::Movemove_
 Pointer to Move this node represents, Node itself do not change move.
 
const std::shared_ptr< TTAProgram::Immediateimmediate_
 Pointer to Immediate this node represents, Node itself do not change move.
 
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.
 
bool placed_
 True when the node placed (is given a cycle in program).
 
bool finalized_
 The movenode cannot be unscheduled anymore, fixed in place.
 
bool isInFrontier_
 This is in scheduling frontier(used in Bubblefish scheduler)
 

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}
bool isInFrontier_
This is in scheduling frontier(used in Bubblefish scheduler)
Definition MoveNode.hh:177
bool finalized_
The movenode cannot be unscheduled anymore, fixed in place.
Definition MoveNode.hh:174
bool placed_
True when the node placed (is given a cycle in program).
Definition MoveNode.hh:171
ProgramOperationPtr srcOp_
Definition MoveNode.hh:162
int cycle_
Cycle in which the node is placed. Each cycle uniquely identifies an instruction slot within the curr...
Definition MoveNode.hh:168
const std::shared_ptr< TTAProgram::Immediate > immediate_
Pointer to Immediate this node represents, Node itself do not change move.
Definition MoveNode.hh:158
ProgramOperationPtr guardOp_
Definition MoveNode.hh:164
const std::shared_ptr< TTAProgram::Move > move_
Pointer to Move this node represents, Node itself do not change move.
Definition MoveNode.hh:155

◆ 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
120 for (unsigned int i = 0; i < destinationOperationCount(); i++) {
122 }
123 }
124}
unsigned int destinationOperationCount() const
bool isGuardOperation() const
Definition MoveNode.cc:181
ProgramOperation & sourceOperation() const
Definition MoveNode.cc:453
bool isDestinationOperation() const
ProgramOperation & guardOperation() const
Definition MoveNode.cc:479
bool isSourceOperation() const
Definition MoveNode.cc:168
ProgramOperation & destinationOperation(unsigned int index=0) const
void removeInputNode(MoveNode &node)
void removeGuardOutputNode(MoveNode &node)
void removeOutputNode(MoveNode &node, int outputIndex)

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_.

◆ 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
154 for (unsigned int i = 0; i < destinationOperationCount(); i++) {
157 }
158 }
159 return newNode;
160}
void setSourceOperationPtr(ProgramOperationPtr po)
Definition MoveNode.cc:541
ProgramOperationPtr sourceOperationPtr() const
Definition MoveNode.cc:458
ProgramOperationPtr destinationOperationPtr(unsigned int index=0) const
void addDestinationOperationPtr(ProgramOperationPtr po)
Definition MoveNode.cc:533
MoveNode()
Node can be entry node.
Definition MoveNode.cc:99
void addOutputNode(MoveNode &node, int outputIndex)
void addInputNode(MoveNode &node)

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}
#define __func__
std::string toString() const
Definition MoveNode.cc:576
bool isPlaced() const
Definition MoveNode.cc:352

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

Referenced by ResourceConstraintAnalyzer::analyze(), ResourceConstraintAnalyzer::analyzeMoveNode(), SimpleBrokerDirector::assign(), LoopPrologAndEpilogBuilder::build(), CycleLookBackSoftwareBypasser::bypass(), BUBasicBlockScheduler::bypassNode(), CycleLookBackSoftwareBypasser::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(), BFEarlyBypasser::operator()(), BFLateBypass::operator()(), BFLateBypasses::operator()(), BFLateBypassGuard::operator()(), BFPushAntidepsDown::operator()(), BFPushDepsUp::operator()(), BFPushMoveUp::operator()(), BFPushMoveUp2::operator()(), BFRescheduleResultClose::operator()(), BFRescheduleResultsClose::operator()(), BFShareOperandLate::operator()(), BFShareOperandsLate::operator()(), BFShareOperandWithScheduled::operator()(), BFPostpassBypass::operator()(), BFRemoveGuardFromSucc::operator()(), BFRemoveGuardsFromSuccs::operator()(), BUBasicBlockScheduler::ltstr::operator()(), ExecutionPipelineResource::otherTriggerBeforeMyTrigger(), BF2ScheduleFront::prefResultCycle(), LiveRangeData::registersAlive(), ExecutionPipelineResource::resultReadyCycle(), BasicBlockScheduler::scheduleInputOperandTempMoves(), BUBasicBlockScheduler::scheduleInputOperandTempMoves(), BUBasicBlockScheduler::scheduleMove(), BasicBlockScheduler::scheduleMove(), BUBasicBlockScheduler::scheduleOperand(), BasicBlockScheduler::scheduleOperandWrites(), SequentialScheduler::scheduleOperandWrites(), BUBasicBlockScheduler::scheduleOperandWrites(), BasicBlockScheduler::scheduleResultReads(), BUBasicBlockScheduler::scheduleResultReads(), BasicBlockScheduler::scheduleResultReadTempMoves(), BUBasicBlockScheduler::scheduleResultReadTempMoves(), BasicBlockScheduler::scheduleRRTempMoves(), BUBasicBlockScheduler::scheduleRRTempMoves(), AssignmentPlan::setRequest(), DataDependenceGraph::smallestCycle(), ExecutionPipelineResource::testTriggerResult(), toString(), ExecutionPipelineResource::triggerTooEarly(), CopyingDelaySlotFiller::tryToAssignNodes(), CopyingDelaySlotFiller::tryToAssignOtherMovesOfOp(), BasicBlockScheduler::tryToDelayOperands(), BasicBlockScheduler::tryToOptimizeWaw(), IUResource::unassign(), BFOptimization::unassign(), BusBroker::unassign(), InputFUBroker::unassign(), InputPSocketBroker::unassign(), ITemplateBroker::unassign(), IUBroker::unassign(), OutputFUBroker::unassign(), OutputPSocketBroker::unassign(), SimpleBrokerDirector::unassign(), ExecutionPipelineResource::unassignSource(), BFShareOperandLate::undoOnlyMe(), BFUnscheduleFromBody::unscheduleOriginal(), BFUnscheduleMove::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(), DataDependenceGraph::dotString(), 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(), BFPushMoveUp::operator()(), BFRemoveLoopChecksAndJump::operator()(), BFScheduleBU::operator()(), BFShareOperandLate::operator()(), BFShareOperands::operator()(), ResourceConstraintAnalyzer::optimalScheduleResourceUsage(), ExecutionPipelineResource::otherTriggerBeforeMyTrigger(), BF2Scheduler::preAllocateFunctionUnits(), DataDependenceGraph::predecessorsReady(), DataDependenceGraphBuilder::processMemWrite(), BFUnscheduleFromBody::returnOriginal(), BFUnscheduleMove::returnOriginal(), BFShareOperandLate::revert(), BFOptimization::RFReadPortCountPreventsScheduling(), BUBasicBlockScheduler::scheduleMove(), BasicBlockScheduler::scheduleMove(), SequentialScheduler::scheduleOperandWrites(), BUBasicBlockScheduler::scheduleOperandWrites(), BasicBlockScheduler::scheduleOperation(), BUBasicBlockScheduler::scheduleOperation(), SequentialScheduler::scheduleOperation(), DataDependenceGraph::successorsReady(), ExecutionPipelineResource::testTriggerResult(), ExecutionPipelineResource::triggerTooEarly(), CopyingDelaySlotFiller::tryToAssignOtherMovesOfDestOps(), ExecutionPipelineResource::unassignDestination(), BFLateBypass::undoOnlyMe(), BFUnscheduleFromBody::unscheduleOriginal(), BFUnscheduleMove::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}
virtual std::string dotString() const
Definition GraphNode.cc:76
bool isOperationMove() const
Definition MoveNode.cc:253
bool isScheduled() const
Definition MoveNode.cc:409
bool isFinalized() const
unsigned int poId() const

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}
#define abortWithError(message)
std::string errorMessageStack(bool messagesOnly=false) const
Definition Exception.cc:138
int cycle() const
Definition MoveNode.cc:421
TTAProgram::Move & move()
virtual TCEString name() const
Definition Operation.cc:93
const Operation & operation() const
MoveNode * triggeringMove() const
int outputIndexOfMove(const MoveNode &mn) const
virtual HWOperation * operation(const std::string &name) const
Terminal & destination() const
Definition Move.cc:323
virtual const TTAMachine::FunctionUnit & functionUnit() const
Definition Terminal.cc:251

References __func__, abortWithError, cycle(), TTAProgram::Move::destination(), Exception::errorMessageStack(), TTAProgram::Terminal::functionUnit(), guardOperation(), isGuardOperation(), isScheduled(), isSourceOperation(), TTAMachine::HWOperation::latency(), move(), move_, Operation::name(), ProgramOperation::operation(), TTAMachine::FunctionUnit::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]

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

Definition at line 842 of file MoveNode.cc.

842 {
843 return *immediate_;
844}

References immediate_.

◆ 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}
bool isRegisterMove() const
Definition MoveNode.cc:294

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) {
371 return parent != NULL &&
372 &parent->instructionTemplate() !=
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() ||
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}
bool isSourceVariable() const
Definition MoveNode.cc:196
bool isSourceImmediateRegister() const
Definition MoveNode.cc:223
bool isDestinationVariable() const
Definition MoveNode.cc:264
static NullInstructionTemplate & instance()
CodeSnippet & parent() const
const TTAMachine::InstructionTemplate & instructionTemplate() const

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

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(), BFPushMoveUp::operator()(), BFRemoveLoopChecksAndJump::operator()(), BFScheduleBU::operator()(), BFPostpassBypass::operator()(), ResourceConstraintAnalyzer::optimalScheduleResourceUsage(), DataDependenceGraph::predecessorsReady(), BF2ScheduleFront::prefResultCycle(), BFRemoveLoopChecksAndJump::queueAliveMove(), BFRemoveLoopChecksAndJump::removeMoveFromQueue(), BFRemoveLoopChecksAndJump::removePoFromQueue(), BFUnscheduleFromBody::returnOriginal(), BFUnscheduleMove::returnOriginal(), BFOptimization::RFReadPortCountPreventsScheduling(), SequentialScheduler::scheduleMove(), BUBasicBlockScheduler::scheduleMove(), BasicBlockScheduler::scheduleMove(), BasicBlockScheduler::scheduleOperandWrites(), SequentialScheduler::scheduleOperandWrites(), BUBasicBlockScheduler::scheduleOperandWrites(), BasicBlockScheduler::scheduleOperation(), BUBasicBlockScheduler::scheduleOperation(), BFOptimization::setPrologDstFUAnno(), DataDependenceGraph::successorsReady(), CopyingDelaySlotFiller::tryToAssignNodes(), CopyingDelaySlotFiller::tryToAssignOtherMovesOfOp(), BasicBlockScheduler::tryToDelayOperands(), ExecutionPipelineResource::unassignDestination(), BFUnscheduleFromBody::unscheduleOriginal(), BFUnscheduleMove::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 BUBasicBlockScheduler::bypassNode(), CycleLookBackSoftwareBypasser::bypassNode(), BUBasicBlockScheduler::finalizeSchedule(), isAssigned(), BF2Scheduler::isDestinationUniversalReg(), CriticalPathBBMoveNodeSelector::mightBeReady(), BFRescheduleResultsClose::operator()(), BFScheduleBU::operator()(), BFScheduleTD::operator()(), BFEarlyBypass::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++) {
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}
int inputMoveCount() const
MoveNode & inputMove(int index) const

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::createSubgraph(), DataDependenceGraph::dotString(), DataDependenceGraph::edgeWeight(), DataDependenceGraph::exclusingGuards(), ExecutionPipelineResource::exclusiveMoves(), BF2Scheduler::findJump(), ResourceConstraintAnalyzer::findResourceConstrainedParent(), ConstantAliasAnalyzer::getConstantAddress(), StackAliasAnalyzer::getStackOffset(), guardLatency(), BUBasicBlockScheduler::handleDDG(), BasicBlockScheduler::handleDDG(), BasicBlockScheduler::handleLoopDDG(), BUBasicBlockScheduler::handleLoopDDG(), BusBroker::isApplicable(), OutputPSocketBroker::isApplicable(), OutputFUBroker::isApplicable(), InputFUBroker::isApplicable(), IUBroker::isApplicable(), InputPSocketBroker::isApplicable(), isSourceReg(), DataDependenceGraph::mergeAndKeepAllowed(), ProgramDependenceGraph::processRegion(), ProgramDependenceGraph::ProgramDependenceGraph(), 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 DataDependenceGraph::dotString(), dotString(), SequentialScheduler::handleBasicBlock(), BUBasicBlockScheduler::handleDDG(), BasicBlockScheduler::handleDDG(), BasicBlockScheduler::handleLoopDDG(), and BUBasicBlockScheduler::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}
bool isAssigned() const
Definition MoveNode.cc:367

References isAssigned(), and isPlaced().

Referenced by BFSwapOperands::BFSwapOperands(), CycleLookBackSoftwareBypasser::bypass(), BUBasicBlockScheduler::bypassNode(), CycleLookBackSoftwareBypasser::bypassNode(), BFEarlyBypasser::bypassSourceLatestCycle(), SimpleBrokerDirector::canAssign(), CopyingDelaySlotFiller::checkIncomingDeps(), BFOptimization::checkPrologDDG(), BUBasicBlockScheduler::clearRemovedNodes(), MoveNodeDuplicator::disposeMoveNode(), dotString(), MoveNodeDuplicator::duplicateMove(), ExecutionPipelineBroker::earliestFromDestination(), ExecutionPipelineBroker::earliestFromSource(), earliestResultReadCycle(), BF2Scheduler::finalizeSchedule(), BUBasicBlockScheduler::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(), BFDRELate::operator()(), BFEarlyBypasser::operator()(), BFLateBypasses::operator()(), BFLateBypassGuard::operator()(), BFPushAntidepsDown::operator()(), BFPushDepsUp::operator()(), BFPushMoveUp::operator()(), BFPushMoveUp2::operator()(), BFRescheduleResultsClose::operator()(), BFScheduleBU::operator()(), BFScheduleTD::operator()(), BFEarlyBypass::operator()(), BFPostpassBypass::operator()(), BFRemoveGuardsFromSuccs::operator()(), ExecutionPipelineResource::otherTriggerBeforeMyTrigger(), BUBasicBlockScheduler::precedingTempMove(), BF2ScheduleFront::prefResultCycle(), LiveRangeData::registersAlive(), CycleLookBackSoftwareBypasser::removeBypass(), CycleLookBackSoftwareBypasser::removeBypass(), CycleLookBackSoftwareBypasser::removeDeadResults(), ExecutionPipelineResource::resultCausesTriggerBetweenOperandSharing(), RegisterCopyAdder::resultsScheduled(), BFOptimization::RFReadPortCountPreventsScheduling(), BF2Scheduler::scheduleDDG(), BasicBlockScheduler::scheduleInputOperandTempMoves(), BUBasicBlockScheduler::scheduleInputOperandTempMoves(), SequentialScheduler::scheduleMove(), BUBasicBlockScheduler::scheduleMove(), BasicBlockScheduler::scheduleMove(), BUBasicBlockScheduler::scheduleOperand(), BasicBlockScheduler::scheduleOperandWrites(), SequentialScheduler::scheduleOperandWrites(), BUBasicBlockScheduler::scheduleOperandWrites(), BasicBlockScheduler::scheduleOperation(), BUBasicBlockScheduler::scheduleOperation(), SequentialScheduler::scheduleResultReads(), BasicBlockScheduler::scheduleResultReads(), BUBasicBlockScheduler::scheduleResultReads(), BasicBlockScheduler::scheduleResultReadTempMoves(), BUBasicBlockScheduler::scheduleResultReadTempMoves(), BasicBlockScheduler::scheduleRRTempMoves(), BUBasicBlockScheduler::scheduleRRTempMoves(), BasicBlockScheduler::succeedingTempMove(), toString(), CopyingDelaySlotFiller::tryToAssignNodes(), CopyingDelaySlotFiller::tryToAssignOtherMovesOfOp(), BasicBlockScheduler::tryToOptimizeWaw(), BUBasicBlockScheduler::tryToOptimizeWaw(), BUBasicBlockScheduler::undoBypass(), BFRegCopy::undoDDG(), BFDRELoop::undoOnlyMe(), BFRescheduleMove::undoOnlyMe(), BFScheduleBU::undoOnlyMe(), BFScheduleMove::undoOnlyMe(), BFScheduleTD::undoOnlyMe(), BasicBlockScheduler::unschedule(), SequentialScheduler::unschedule(), and BUBasicBlockScheduler::unscheduleAllNodes().

Here is the call graph for this function:

◆ isSourceConstant()

bool MoveNode::isSourceConstant ( ) const

Tells whether the source of the node (move) is a program constant. If assigned, the constant is an in-line immediate.

Returns
True if the source of the node is a constant.

Definition at line 238 of file MoveNode.cc.

238 {
239 if (move_ == NULL) {
240 return false;
241 }
242 return move_->source().isImmediate();
243}

References isImmediate(), and move_.

Referenced by RegisterCopyAdder::addConnectionRegisterCopiesImmediate(), OffsetAliasAnalyzer::analyze(), CycleLookBackSoftwareBypasser::bypassNode(), BusResource::canAssign(), MachineConnectivityCheck::canBypass(), MachineConnectivityCheck::canSourceWriteToAnyDestinationPort(), BF2Scheduler::countLoopInvariantValueUsages(), MemoryAliasAnalyzer::detectConstantScale(), ResourceConstraintAnalyzer::dumpGraphWithStats(), LoopAnalyzer::findEndCond(), LoopAnalyzer::findInitAndUpdate(), MachineConnectivityCheck::findPossibleSourcePorts(), StackAliasAnalyzer::getStackOffset(), BFOptimization::hasAmbiguousResources(), ProgramOperation::hasConstantOperand(), OutputPSocketBroker::isAlreadyAssigned(), OutputPSocketBroker::isApplicable(), IUBroker::isApplicable(), CriticalPathBBMoveNodeSelector::mightBeReady(), SequentialScheduler::scheduleMove(), BUBasicBlockScheduler::scheduleMove(), BasicBlockScheduler::scheduleMove(), MemoryAliasAnalyzer::searchLoopIndexBasedIncrement(), PreOptimizer::tryToPrecalcConstantAdd(), BasicBlockScheduler::tryToSwitchInputs(), BUBasicBlockScheduler::tryToSwitchInputs(), and ITemplateBroker::unassign().

Here is the call graph for this function:

◆ 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 SimpleBrokerDirector::assign(), ITemplateBroker::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(), BFOptimization::assign(), OutputFUBroker::assign(), ExecutionPipelineResource::assignSource(), CycleLookBackSoftwareBypasser::bypass(), CycleLookBackSoftwareBypasser::bypassNode(), BFEarlyBypasser::bypassSourceLatestCycle(), ExecutionPipelineResource::canAssignSource(), CopyingDelaySlotFiller::collectMoves(), copy(), TTAProgram::CodeGenerator::createForLoopBufferInit(), DataDependenceGraph::createSubgraph(), MemoryAliasAnalyzer::detectConstantScale(), DataDependenceGraph::dotString(), 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(), BFLateBypasses::operator()(), BFLateBypassGuard::operator()(), BFPushDepsUp::operator()(), BFPushMoveUp2::operator()(), BFScheduleBU::operator()(), BFScheduleExact::operator()(), BFScheduleTD::operator()(), BFPostpassBypass::operator()(), BFUpdateMoveOnBypass::operator()(), ProgramOperation::outputIndexOfMove(), DataDependenceGraph::predecessorsReady(), BF2ScheduleFront::prefResultCycle(), BFRemoveLoopChecksAndJump::queueAliveMove(), BFRemoveLoopChecksAndJump::removeMoveFromQueue(), BFRemoveLoopChecksAndJump::removePoFromQueue(), ExecutionPipelineResource::resultCausesTriggerBetweenOperandSharing(), ExecutionPipelineResource::resultPort(), BFUnscheduleFromBody::returnOriginal(), BFUnscheduleMove::returnOriginal(), BUBasicBlockScheduler::scheduleMove(), BasicBlockScheduler::scheduleMove(), BasicBlockScheduler::scheduleOperandWrites(), BUBasicBlockScheduler::scheduleOperandWrites(), BasicBlockScheduler::scheduleOperation(), BUBasicBlockScheduler::scheduleOperation(), SequentialScheduler::scheduleOperation(), SequentialScheduler::scheduleResultReads(), BasicBlockScheduler::scheduleResultReads(), BUBasicBlockScheduler::scheduleResultReads(), BFOptimization::setPrologSrcFUAnno(), sourceOperationPtr(), DataDependenceGraph::successorsReady(), ExecutionPipelineResource::testTriggerResult(), PreOptimizer::tryToRemoveEq(), LoopAnalyzer::tryTrackCommonAncestor(), ExecutionPipelineResource::unassignSource(), BFUpdateMoveOnBypass::undoOnlyMe(), DataDependenceGraph::unMergeUser(), BFUnscheduleFromBody::unscheduleOriginal(), BFUnscheduleMove::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}
virtual TCEString name() const
Terminal & source() const
Definition Move.cc:302
virtual int index() const
Definition Terminal.cc:274
virtual const TTAMachine::RegisterFile & registerFile() const
Definition Terminal.cc:225

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

Referenced by StackAliasAnalyzer::getStackOffset().

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
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}
int outputMoveCount() const
MoveNode & outputMove(int index) const
virtual int operationIndex() const
Definition Terminal.cc:364

References __func__, cycle(), destinationOperation(), TTAProgram::Terminal::functionUnit(), isDestinationOperation(), isScheduled(), TTAMachine::HWOperation::latency(), move(), Operation::name(), ProgramOperation::operation(), TTAMachine::FunctionUnit::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::addConnectionRegisterCopies(), RegisterCopyAdder::addConnectionRegisterCopiesImmediate(), ProgramOperation::addInputNode(), BFOptimization::addJumpGuardIfNeeded(), DataDependenceGraph::addNode(), ProgramOperation::addNode(), ProgramOperation::addOutputNode(), InputFUBroker::allAvailableResources(), OutputFUBroker::allAvailableResources(), IUBroker::allAvailableResources(), CopyingDelaySlotFiller::allowedToSpeculate(), ResourceConstraintAnalyzer::analyze(), LoopAnalyzer::analyze(), PRegionAliasAnalyzer::analyze(), OffsetAliasAnalyzer::analyze(), ResourceConstraintAnalyzer::analyzeMoveNode(), ResourceConstraintAnalyzer::analyzeRegisterAntideps(), annotateAllInputs(), annotateAllOutputs(), IUResource::assign(), OutputPSocketResource::assign(), IUResource::assign(), BFOptimization::assign(), SimpleBrokerDirector::assign(), InputPSocketBroker::assign(), ITemplateBroker::assign(), OutputPSocketBroker::assign(), IUBroker::assign(), BFOptimization::assignCopyToPrologEpilog(), ExecutionPipelineResource::assignDestination(), BFSwapOperands::BFSwapOperands(), LoopPrologAndEpilogBuilder::build(), LLVMTCEDataDependenceGraphBuilder::buildLocalDDG(), MachineConnectivityCheck::busConnectedToAnyFU(), MachineConnectivityCheck::busConnectedToDestination(), CycleLookBackSoftwareBypasser::bypass(), CycleLookBackSoftwareBypasser::bypassNode(), InputPSocketResource::canAssign(), OutputPSocketResource::canAssign(), PSocketResource::canAssign(), BusResource::canAssign(), IUResource::canAssign(), BFOptimization::canAssign(), SimpleBrokerDirector::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(), RegisterCopyAdder::createAntidepsForReg(), BFRegCopy::createAntidepsForReg(), TTAProgram::CodeGenerator::createBreakOperation(), TTAProgram::CodeGenerator::createForLoopBufferInit(), DataDependenceGraph::createRegisterAntiDependenciesBetweenNodes(), DataDependenceGraph::createSubgraph(), 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(), BasicBlockScheduler::handleLoopDDG(), BUBasicBlockScheduler::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(), BFDropPreShared::operator()(), BFLateBypass::operator()(), BFLateBypasses::operator()(), BFLateBypassGuard::operator()(), BFPushAntidepDown::operator()(), BFPushMoveUp::operator()(), BFPushMoveUp2::operator()(), BFRegCopy::operator()(), BFRemoveLoopChecksAndJump::operator()(), BFRenameSource::operator()(), BFRescheduleResultClose::operator()(), BFScheduleBU::operator()(), BFScheduleExact::operator()(), BFSchedulePreLoopShared::operator()(), BFScheduleTD::operator()(), BFShareOperand::operator()(), BFShareOperandLate::operator()(), BFShareOperands::operator()(), BFShareOperandsLate::operator()(), BFShareOperandWithScheduled::operator()(), BFEarlyGuardBypass::operator()(), BFPostpassBypass::operator()(), BFRemoveGuard::operator()(), BFRemoveGuardFromSucc::operator()(), BFRemoveGuardsFromSuccs::operator()(), BFTryRemoveGuard::operator()(), BFUpdateMoveOnBypass::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(), 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(), BUBasicBlockScheduler::scheduleMove(), BasicBlockScheduler::scheduleMove(), BUBasicBlockScheduler::scheduleOperand(), BasicBlockScheduler::scheduleOperandWrites(), SequentialScheduler::scheduleOperandWrites(), BUBasicBlockScheduler::scheduleOperandWrites(), BasicBlockScheduler::scheduleResultReads(), BUBasicBlockScheduler::scheduleResultReads(), BasicBlockScheduler::scheduleResultReadTempMoves(), BUBasicBlockScheduler::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(), BasicBlockScheduler::tryToOptimizeWaw(), BUBasicBlockScheduler::tryToOptimizeWaw(), PreOptimizer::tryToPrecalcConstantAdd(), PreOptimizer::tryToRemoveEq(), PreOptimizer::tryToRemoveGuardInversingOp(), PreOptimizer::tryToRemoveXor(), BasicBlockScheduler::tryToSwitchInputs(), BUBasicBlockScheduler::tryToSwitchInputs(), LoopAnalyzer::tryTrackCommonAncestor(), IUResource::unassign(), ITemplateBroker::unassign(), OutputFUBroker::unassign(), SimpleBrokerDirector::unassign(), ExecutionPipelineResource::unassignDestination(), BUBasicBlockScheduler::undoBypass(), BFLateBypassGuard::undoOnlyMe(), BFRescheduleMove::undoOnlyMe(), BFScheduleBU::undoOnlyMe(), BFScheduleTD::undoOnlyMe(), BFEarlyGuardBypass::undoOnlyMe(), BFRemoveGuard::undoOnlyMe(), BFRemoveGuardFromSucc::undoOnlyMe(), BFUpdateMoveOnBypass::undoOnlyMe(), BFCopyRegWithOp::undoSplit(), BFRegCopyAfter::undoSplit(), BFRegCopyBefore::undoSplit(), DataDependenceGraph::unMergeUser(), BF2Scheduler::unreservePreallocatedFUs(), BasicBlockScheduler::unschedule(), SequentialScheduler::unschedule(), BFUnscheduleFromBody::unscheduleOriginal(), BFUnscheduleMove::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(), DataDependenceGraph::dotString(), 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(), ExecutionPipelineResource::resultCausesTriggerBetweenOperandSharing(), ExecutionPipelineResource::resultPort(), BFUnscheduleFromBody::returnOriginal(), BFUnscheduleMove::returnOriginal(), BUBasicBlockScheduler::scheduleMove(), BasicBlockScheduler::scheduleMove(), BUBasicBlockScheduler::scheduleOperandWrites(), BasicBlockScheduler::scheduleOperation(), BUBasicBlockScheduler::scheduleOperation(), SequentialScheduler::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

◆ 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}
static std::string toString(const T &source)
int nodeID() const
static std::string disassemble(const TTAProgram::Move &move)

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

Referenced by RegisterCopyAdder::addConnectionRegisterCopies(), RegisterCopyAdder::addConnectionRegisterCopies(), RegisterCopyAdder::addConnectionRegisterCopiesImmediate(), RegisterCopyAdder::addRegisterCopies(), RegisterCopyAdder::addRegisterCopiesToRRMove(), OutputFUBroker::allAvailableResources(), ResourceConstraintAnalyzer::analyzeMoveNode(), ResourceConstraintAnalyzer::analyzeRegisterAntideps(), BFOptimization::assign(), SimpleResourceManager::assign(), SimpleBrokerDirector::assign(), IUBroker::assign(), BFOptimization::assignCopyToPrologEpilog(), ExecutionPipelineResource::assignDestination(), BFSwapOperands::BFSwapOperands(), LoopPrologAndEpilogBuilder::build(), MoveNodeGroupBuilder::build(), BUBasicBlockScheduler::bypassNode(), BFEarlyBypasser::bypassSourceLatestCycle(), BFOptimization::canAssign(), SimpleResourceManager::canAssign(), SimpleBrokerDirector::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(), SimpleResourceManager::earliestCycle(), BF2Scheduler::finalizeSchedule(), BUBasicBlockScheduler::finalizeSchedule(), LoopAnalyzer::findEndCond(), LoopAnalyzer::findInitAndUpdate(), MachineConnectivityCheck::findPossibleDestinationPorts(), DataDependenceGraph::getBasicBlockNode(), DataDependenceGraph::getBasicBlockNode(), BF2Scheduler::getDstUnit(), BF2ScheduleFront::getMoveNodeFromFrontBU(), BF2ScheduleFront::getPreferredLimits(), guardOperationPtr(), SequentialScheduler::handleBasicBlock(), BBSchedulerController::handleBasicBlock(), BUBasicBlockScheduler::handleDDG(), BasicBlockScheduler::handleDDG(), BF2Scheduler::handleLoopDDG(), BF2Scheduler::handleLoopDDG(), BasicBlockScheduler::handleRemovedResultMoves(), BUMoveNodeSelector::initializeReadylist(), BF2Scheduler::jumpGuard(), BFOptimization::jumpGuardAvailableCycle(), SimpleResourceManager::latestCycle(), SimpleResourceManager::latestCycle(), ExecutionPipelineBroker::latestFromSource(), ResourceConstraintAnalyzer::memoryBoundScheduleResourceUsage(), DataDependenceGraphBuilder::memoryCategory(), DataDependenceGraph::mergeAndKeepAllowed(), ExecutionPipelineResource::operandAllowedAtCycle(), ExecutionPipelineResource::operandOverwritten(), ExecutionPipelineResource::operandOverwritten(), BFDRELate::operator()(), BFDRELoop::operator()(), BFDropPreShared::operator()(), BFEarlyBypasser::operator()(), BFLateBypass::operator()(), BFLateBypasses::operator()(), BFLateBypassGuard::operator()(), BFPushAntidepDown::operator()(), BFPushAntidepsDown::operator()(), BFPushDepsUp::operator()(), BFPushMoveUp::operator()(), BFPushMoveUp2::operator()(), BFRescheduleResultClose::operator()(), BFScheduleBU::operator()(), BFScheduleExact::operator()(), BFSchedulePreLoopShared::operator()(), BFScheduleTD::operator()(), BFShareOperand::operator()(), BFShareOperandLate::operator()(), BFShareOperands::operator()(), BFShareOperandsLate::operator()(), BFShareOperandWithScheduled::operator()(), BF2ScheduleFront::operator()(), BFEarlyBypass::operator()(), BFPostpassBypass::operator()(), BFPostpassLoopDRE::operator()(), BFRemoveEdge::operator()(), BFRemoveGuard::operator()(), BFRemoveGuardFromSucc::operator()(), BFRemoveGuardsFromSuccs::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(), SequentialScheduler::scheduleMove(), BF2ScheduleFront::scheduleMove(), BUBasicBlockScheduler::scheduleMove(), BasicBlockScheduler::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(), ProgramDependenceNode::toString(), MoveNodeGroup::toString(), ExecutionPipelineResource::triggerTooEarly(), BF2ScheduleFront::tryRevertEarlierBypass(), BF2ScheduleFront::tryToScheduleMoveOuter(), BFOptimization::unassign(), IUBroker::unassign(), SimpleBrokerDirector::unassign(), SimpleResourceManager::unassign(), BFOptimization::unassignCopyFromPrologEpilog(), ExecutionPipelineResource::unassignDestination(), BUBasicBlockScheduler::undoBypass(), BFRegCopy::undoDDG(), BFDropPreShared::undoOnlyMe(), BFLateBypass::undoOnlyMe(), BFLateBypassGuard::undoOnlyMe(), BFRemoveLoopChecksAndJump::undoOnlyMe(), BFRescheduleMove::undoOnlyMe(), BFScheduleBU::undoOnlyMe(), BFScheduleMove::undoOnlyMe(), BFSchedulePreLoopShared::undoOnlyMe(), BFScheduleTD::undoOnlyMe(), BFShareOperand::undoOnlyMe(), BFShareOperandWithScheduled::undoOnlyMe(), BFPostpassBypass::undoOnlyMe(), BFRemoveEdge::undoOnlyMe(), BFRemoveGuardFromSucc::undoOnlyMe(), BFRegCopyAfter::undoSplit(), BasicBlockScheduler::unschedule(), SequentialScheduler::unschedule(), BFUnscheduleFromBody::unscheduleOriginal(), BFUnscheduleMove::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(), 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}
std::shared_ptr< ProgramOperation > ProgramOperationPtr
Definition MoveNode.hh:53

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 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(), 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: