Go to the documentation of this file.
41 #include <boost/format.hpp>
76 move_(newMove), immediate_(nullptr), srcOp_(nullptr), guardOp_(nullptr),
88 move_(nullptr), immediate_(imm), srcOp_(nullptr), guardOp_(nullptr),
100 move_(nullptr), immediate_(nullptr), srcOp_(nullptr), guardOp_(nullptr),
172 return srcOp_.get() != NULL;
200 return move_->source().isGPR();
214 return move_->source().isRA();
227 return move_->source().isImmediateRegister();
242 return move_->source().isImmediate();
268 return move_->destination().isGPR();
320 for (
unsigned int i = 0; i < dopCount2; i++) {
327 for (
unsigned int i = 0; i < dopCount1; i++) {
335 for (
unsigned int j = 0; j < dopCount2; j++) {
371 return parent != NULL &&
373 &NullInstructionTemplate::instance();
382 if (!
move_->bus().machine()->isUniversalMachine()) {
386 (
move_->source().port().parentUnit()->machine() !=
387 move_->bus().machine())) {
391 (
move_->destination().port().parentUnit()->machine() !=
392 move_->bus().machine())) {
423 std::string msg =
"MoveNode was not placed yet: " +
toString();
462 "MoveNode: '%s' source is not Operation.") %
toString()).
488 "MoveNode: '%s' guard is not Operation.") %
toString()).
505 std::string msg =
"MoveNode is already placed in cycle ";
521 std::string msg =
"MoveNode is not placed.";
578 return "-1:\tENTRYNODE";
588 content +=
" Bus: " +
move_->bus().name();
606 unsigned operationId = 0;
619 int operationColor = rand() / (RAND_MAX>>24);
623 ",color=\"#%.6x\"") % operationColor).str();
628 contents +=
",shape=hexagon";
630 contents +=
",shape=box";
634 contents +=
",shape=ellipse";
636 contents +=
",shape=diamond";
659 outputIndex =
move_->source().operationIndex();
663 __FILE__, __LINE__,
__func__,
"Not a result read move.");
702 __FILE__, __LINE__,
__func__,
"Not a result read move.");
705 int latestTrigger = INT_MAX;
717 int latency = hwop.
latency(outputIndex);
718 latestTrigger = std::min(latestTrigger, result.
cycle() - latency);
720 return latestTrigger;
742 for (std::vector<ProgramOperationPtr>::iterator i =
dstOps_.begin();
744 if (((*i).get()) == ptr) {
749 std::string msg =
"Removed destination op not found in MoveNode";
783 return move_->guardLatency();
802 if (!
move().source().isGPR()) {
808 size_t dotPlace = reg.find(
'.');
810 if (reg.compare(0, dotPlace, rfName) != 0) {
827 if (&inputNode !=
this && !inputNode.
isScheduled()) {
bool isLastUnscheduledMoveOfDstOp() const
const Operation & operation() const
std::string dotString() const
bool placed_
True when the node placed (is given a cycle in program).
bool isDestinationVariable() const
void removeInputNode(MoveNode &node)
virtual TCEString name() const
std::string toString() const
ProgramOperationPtr guardOperationPtr() const
virtual int index() const
virtual const TTAMachine::RegisterFile & registerFile() const
bool isDestinationOperation() const
virtual std::string dotString() const
Terminal & destination() const
void clearDestinationOperation()
bool isSourceReg(const std::string ®) const
bool isSourceConstant() const
virtual TCEString name() const
static std::string toString(const T &source)
MoveNode * triggeringMove() const
std::shared_ptr< ProgramOperation > ProgramOperationPtr
void addOutputNode(MoveNode &node, int outputIndex)
bool isSourceImmediateRegister() const
MoveNode()
Node can be entry node.
ProgramOperationPtr srcOp_
void setSourceOperationPtr(ProgramOperationPtr po)
ProgramOperation & sourceOperation() const
bool isGuardOperation() const
int earliestResultReadCycle() const
virtual int operationIndex() const
#define abortWithError(message)
void addDestinationOperationPtr(ProgramOperationPtr po)
ProgramOperationPtr guardOp_
int latestTriggerWriteCycle() const
std::string errorMessageStack(bool messagesOnly=false) const
bool isSourceOperation() const
void unsetSourceOperation()
void removeGuardOutputNode(MoveNode &node)
int cycle_
Cycle in which the node is placed. Each cycle uniquely identifies an instruction slot within the curr...
void unsetGuardOperation()
unsigned int destinationOperationCount() const
int inputMoveCount() const
std::vector< ProgramOperationPtr > dstOps_
std::shared_ptr< TTAProgram::Immediate > immediatePtr()
const std::shared_ptr< TTAProgram::Move > move_
Pointer to Move this node represents, Node itself do not change move.
int outputMoveCount() const
const TTAMachine::InstructionTemplate & instructionTemplate() const
virtual const TTAMachine::FunctionUnit & functionUnit() const
bool isSourceVariable() const
ProgramOperation & destinationOperation(unsigned int index=0) const
void addInputNode(MoveNode &node)
ProgramOperationPtr destinationOperationPtr(unsigned int index=0) const
TTAProgram::Move & move()
void setCycle(const int newcycle)
static std::string disassemble(const TTAProgram::Move &move)
find Finds info of the inner loops in the false
void removeDestinationOperation(const ProgramOperation *po)
bool isRegisterMove() const
bool inSameOperation(const MoveNode &other) const
void setGuardOperationPtr(ProgramOperationPtr po)
bool isOperationMove() const
ProgramOperationPtr sourceOperationPtr() const
Terminal & source() const
unsigned int poId() const
virtual HWOperation * operation(const std::string &name) const
TTAProgram::Immediate & immediate()
MoveNode & outputMove(int index) const
const std::shared_ptr< TTAProgram::Immediate > immediate_
Pointer to Immediate this node represents, Node itself do not change move.
bool isInFrontier_
This is in scheduling frontier(used in Bubblefish scheduler)
int outputIndexOfMove(const MoveNode &mn) const
void removeOutputNode(MoveNode &node, int outputIndex)
MoveNode & inputMove(int index) const
ProgramOperation & guardOperation() const