OpenASIP 2.2
Loading...
Searching...
No Matches
MoveNode.cc
Go to the documentation of this file.
1/*
2 Copyright (c) 2002-2009 Tampere University.
3
4 This file is part of TTA-Based Codesign Environment (TCE).
5
6 Permission is hereby granted, free of charge, to any person obtaining a
7 copy of this software and associated documentation files (the "Software"),
8 to deal in the Software without restriction, including without limitation
9 the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 and/or sell copies of the Software, and to permit persons to whom the
11 Software is furnished to do so, subject to the following conditions:
12
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 DEALINGS IN THE SOFTWARE.
23 */
24/**
25 * @file MoveNode.cc
26 *
27 * Implementation of MoveNode class.
28 *
29 * Nodes are the minimum independent unit of information in a
30 * minimally-ordered program representation. Typically, but not necessarily,
31 * the nodes in a program representation are linked together by dependences
32 * and thus form a graph.
33 *
34 * @author Ari Mets�halme 2006 (ari.metsahalme-no.spam-tut.fi)
35 * @author Vladimir Guzma 2006 (vladimir.guzma-no.spam-tut.fi)
36 * @note rating: red
37 */
38
39#include <iostream>
40#include <climits>
41#include <boost/format.hpp>
42
43#include "MoveNode.hh"
44#include "Port.hh"
46#include "Bus.hh"
47#include "UniversalMachine.hh"
48#include "ProgramOperation.hh"
49#include "POMDisassembler.hh"
50#include "SetTools.hh"
51#include "FUPort.hh"
52#include "HWOperation.hh"
53#include "TCEString.hh"
54#include "Guard.hh"
55#include "ControlUnit.hh"
56#include "Terminal.hh"
57#include "MoveGuard.hh"
58#include "Operation.hh"
59#include "Move.hh"
60#include "Conversion.hh"
61#include "Immediate.hh"
62#include "Instruction.hh"
63
64using namespace TTAMachine;
65
66//#define PRINT_ID
67
68/**
69 * Constructor.
70 *
71 * Creates a new node with a smart pointer to the given Move.
72 *
73 * @param newmove the Move this node refers to.
74 */
75MoveNode::MoveNode(std::shared_ptr<TTAProgram::Move> newMove) :
76 move_(newMove), immediate_(nullptr), srcOp_(nullptr), guardOp_(nullptr),
77 cycle_(0), placed_(false), finalized_(false), isInFrontier_(false) {
78}
79
80/**
81 * Constructor.
82 *
83 * Creates a new node with a smart pointer to the given immediate.
84 *
85 * @param imm the long immediate this node refers to.
86 */
87MoveNode::MoveNode(std::shared_ptr<TTAProgram::Immediate> imm) :
88 move_(nullptr), immediate_(imm), srcOp_(nullptr), guardOp_(nullptr),
89 cycle_(0), placed_(false), finalized_(false), isInFrontier_(false) {
90}
91
92/**
93 * Constructor.
94 *
95 * Creates a new node to be entry node.
96 *
97 */
98
100 move_(nullptr), immediate_(nullptr), srcOp_(nullptr), guardOp_(nullptr),
101 cycle_(0), placed_(false), finalized_(false), isInFrontier_(false) {
102}
103
104/**
105 * Destructor.
106 *
107 * Deletes the owned Move instance.
108 * Does not unregister this movenode from ProgramOperations.
109 */
111
112 if (isSourceOperation()) {
114 }
115 if (isGuardOperation()) {
117 }
118
120 for (unsigned int i = 0; i < destinationOperationCount(); i++) {
122 }
123 }
124}
125
126/**
127 * Creates a deep copy of MoveNode.
128 *
129 * Sets the source and destination operation of the copy to the same as
130 * original. Does not copy the cycle.
131 *
132 * @return return copy of MoveNode.
133 */
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}
161
162/**
163 * Tells whether the source of the MoveNode (move) belongs to an operation.
164 *
165 * @return True if the source of the MoveNode is an operation output.
166 */
167bool
169 if (move_ == NULL) {
170 return false;
171 }
172 return srcOp_.get() != NULL;
173}
174
175/**
176 * Tells whether the guard of the MoveNode (move) is a port guard from op.
177 *
178 * @return True if the source of the MoveNode is an operation output.
179 */
180bool
182 if (move_ == NULL) {
183 return false;
184 }
185 return guardOp_.get() != NULL;
186}
187
188
189/**
190 * Tells whether the node (move) reads a program variable or, if assigned, a
191 * GPR.
192 *
193 * @return True if the source of the node is a variable or GPR.
194 */
195bool
197 if (move_ == NULL) {
198 return false;
199 }
200 return move_->source().isGPR();
201}
202
203/**
204 * Tells whether the node (move) reads the return address port.
205 * GPR.
206 *
207 * @return True if the source of the node is the return address port.
208 */
209bool
211 if (move_ == NULL) {
212 return false;
213 }
214 return move_->source().isRA();
215}
216
217/**
218 * Tells whether the node (move) reads a Immediate Register
219 *
220 * @return True if the source of the node is Immediate register.
221 */
222bool
224 if (move_ == NULL) {
225 return false;
226 }
227 return move_->source().isImmediateRegister();
228}
229
230
231/**
232 * Tells whether the source of the node (move) is a program constant. If
233 * assigned, the constant is an in-line immediate.
234 *
235 * @return True if the source of the node is a constant.
236 */
237bool
239 if (move_ == NULL) {
240 return false;
241 }
242 return move_->source().isImmediate();
243}
244
245
246
247/**
248 * Tells whether the move belongs to an operation execution.
249 *
250 * @return True if the the node belongs to an operation.
251 */
252bool
256
257/**
258 * Tells whether the node (move) writes a program variable or, if assigned,
259 * a GPR.
260 *
261 * @return True if the destination of the node is a variable or GPR.
262 */
263bool
265 if (move_ == NULL) {
266 return false;
267 }
268 return move_->destination().isGPR();
269}
270
271
272/**
273 * Tells whether the node is a ``software bypass'' - both its source and its
274 * destination belong to operations.
275 *
276 * @return True if both source and destination of the node are operation
277 * terminals.
278 */
279bool
283
284/**
285 * Tells whether the node is a register move, thus not belong to
286 * any particular ProgramOperation.
287 *
288 * It's either an immediate move to an register or a register to register
289 * copy.
290 *
291 * @return True if the move is a register to register copy.
292 */
293bool
297
298
299/**
300 * Returns true if this MoveNode is in the same ProgramOperation as the
301 * given MoveNode.
302 *
303 * @return True if both MoveNodes belong to the same ProgramOperation.
304 */
305bool
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}
343
344
345/**
346 * Tells whether is placed in the program representation, that is, has a
347 * cycle assigned to it.
348 *
349 * @return True if a cycle is assigned to the node.
350 */
351bool
353 return placed_;
354}
355
356
357/**
358 * Tells whether the node is fully assigned.
359 *
360 * A node is fully assigned when all the resources of the target processor
361 * necessary to carry out the transport it specifies are assigned to it.
362 *
363 * @return True if all required scheduling resources of target machine are
364 * assigned to the node.
365 */
366bool
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}
399
400/**
401 * Tells whether the node is completely scheduled.
402 *
403 * A node is completely scheduled only if it is assigned to a program cycle
404 * and the necessary resources of the target processor are assigned to it.
405 *
406 * @return True if the node is placed and assigned.
407 */
408bool
410 return isPlaced() && isAssigned();
411}
412
413
414/**
415 * Returns the cycle (index) assigned to the node.
416 *
417 * @return The cycle in which the node is placed.
418 * @exception InvalidData if the node is not placed.
419 */
420int
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}
429
430/**
431 * Returns the enclosing scheduling scope of the node.
432 *
433 * @return A scheduling scope.
434 */
435Scope&
437 ///TODO: Intentionally falsified code
438 /// Class Scope does not exists so far in real
439 Scope* ns = new Scope;
440 return *ns;
441}
442
443
444/**
445 * Returns the instance of operation in the program whose output is the
446 * source of this node.
447 *
448 * @return A program operation.
449 * @exception InvalidData if the given node does not read an operation
450 * output.
451 */
454 return *sourceOperationPtr().get();
455}
456
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}
469
470/**
471 * Returns the instance of operation in the program whose output is the
472 * guard of this node.
473 *
474 * @return A program operation.
475 * @exception InvalidData if the given node does not read an operation
476 * output.
477 */
480 return *guardOperationPtr().get();
481}
482
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}
495
496/**
497 * Set cycle for a node, also sets placed_
498 * @param newcycle Cycle to which node is placed_
499 * @throw InvalidData If node is already placed in cycle different from
500 * newcycle
501 */
502void
503MoveNode::setCycle(const int newcycle) {
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}
513
514/**
515 * Unset cycle from nodes
516 * @throw InvalidData If node is not placed
517 */
518void
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}
527
528/**
529 * Set a destination of MoveNode to ProgramOperation
530 *
531 * @param po Program operation that is destination of MoveNode
532 */
536/**
537 * Set a source of MoveNode to ProgramOperation
538 *
539 * @param po Program operation that is source of MoveNode
540 */
544
545/**
546 * Set a guard src of MoveNode to ProgramOperation
547 *
548 * @param po Program operation that is source of MoveNode
549 */
553
554/**
555 * Returns type of the MoveNode.
556 *
557 * Not yet used anywhere and types not decided so
558 * current dummy implementation returns -1
559 *
560 * @return type of the node
561 */
562int
564 return -1;
565}
566
567/**
568 * Returns string with ID of the MoveNode.
569 *
570 * Not yet used anywhere except printing graph in .dot file. Returns the
571 * disassembly of the move along with its id.
572 *
573 * @return The string with node ID.
574 */
575std::string
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}
592
593/**
594 * Returns Dot representation of the node.
595 *
596 * Prints the disassembly of the move and sets the color of the node to red
597 * in case it's scheduled.
598 *
599 * @return The string with node ID.
600 */
601std::string
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}
642
643/**
644 * Returns the cycle the given result move can be scheduled earliest,
645 * taking in the account the latency of the operation.
646 *
647 * In case the trigger move has not been scheduled yet, returns INT_MAX.
648 *
649 * @exception IllegalObject if this MoveNode is not a result read.
650 */
651int
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}
689/**
690 * Returns the lates cycle the given trigger move can be scheduled at,
691 * taking in the account the latency of the operation results.
692 *
693 * In case the none of the result moves has been scheduled yet, returns INT_MAX.
694 *
695 * @exception IllegalObject if this MoveNode is not a result read.
696 */
697int
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}
722
723/**
724 * Unsets destination operation.
725 *
726 * Does not ask the ProgramOperation to remove this MoveNode from
727 * it's input moves.
728 */
729void
733
734/**
735 * Unsets destination operation.
736 *
737 * Does not ask the ProgramOperation to remove this MoveNode from
738 * it's input moves.
739 */
740void
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}
752
753/**
754 * Unsets source operation.
755 *
756 * Does not ask the ProgramOperation to remove this MoveNode from
757 * it's output moves.
758 */
759void
763
764/**
765 * Unsets guard operation.
766 *
767 * Does not ask the ProgramOperation to remove this MoveNode from
768 * it's output moves.
769 */
770void
774
775/**
776 * Returns the total guard latency of the guard of given move,
777 * or 0 if the move is unconditional.
778 */
780 if (!isMove()) {
781 return 0;
782 }
783 return move_->guardLatency();
784}
785
786/**
787 * Checks if the source of the movenode is the given reg.
788 *
789 * This method assumes incoming reg name is in correct
790 * rf.number format, and does not check it, due performance reasons.
791 *
792 * @param reg register to check against source of the movenode
793 *
794 * @return true if the source of the movenode is the given reg.
795 * false if some other reg or not reg.
796 */
797bool
798MoveNode::isSourceReg(const std::string& reg) const {
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}
816
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}
837
841
843 return *immediate_;
844}
845
846std::shared_ptr<TTAProgram::Immediate> MoveNode::immediatePtr() {
847 return immediate_;
848}
#define __func__
#define abortWithError(message)
find Finds info of the inner loops in the false
std::shared_ptr< ProgramOperation > ProgramOperationPtr
Definition MoveNode.hh:53
static std::string toString(const T &source)
std::string errorMessageStack(bool messagesOnly=false) const
Definition Exception.cc:138
virtual std::string dotString() const
Definition GraphNode.cc:76
int nodeID() const
std::string dotString() const
Definition MoveNode.cc:602
int type()
Definition MoveNode.cc:563
int earliestResultReadCycle() const
Definition MoveNode.cc:652
bool isOperationMove() const
Definition MoveNode.cc:253
void setGuardOperationPtr(ProgramOperationPtr po)
Definition MoveNode.cc:550
void setSourceOperationPtr(ProgramOperationPtr po)
Definition MoveNode.cc:541
ProgramOperationPtr sourceOperationPtr() const
Definition MoveNode.cc:458
bool isInFrontier_
This is in scheduling frontier(used in Bubblefish scheduler)
Definition MoveNode.hh:177
bool isSourceReg(const std::string &reg) const
Definition MoveNode.cc:798
unsigned int destinationOperationCount() const
bool isRegisterMove() const
Definition MoveNode.cc:294
bool isGuardOperation() const
Definition MoveNode.cc:181
int latestTriggerWriteCycle() const
Definition MoveNode.cc:698
void unsetSourceOperation()
Definition MoveNode.cc:760
bool isImmediate() const
Definition MoveNode.hh:143
Scope & scope()
Definition MoveNode.cc:436
int cycle() const
Definition MoveNode.cc:421
ProgramOperationPtr guardOperationPtr() const
Definition MoveNode.cc:484
void removeDestinationOperation(const ProgramOperation *po)
Definition MoveNode.cc:741
bool placed_
True when the node placed (is given a cycle in program).
Definition MoveNode.hh:171
bool isSourceVariable() const
Definition MoveNode.cc:196
ProgramOperationPtr srcOp_
Definition MoveNode.hh:162
std::shared_ptr< TTAProgram::Immediate > immediatePtr()
Definition MoveNode.cc:846
bool isMove() const
int cycle_
Cycle in which the node is placed. Each cycle uniquely identifies an instruction slot within the curr...
Definition MoveNode.hh:168
int guardLatency() const
Definition MoveNode.cc:779
bool isBypass() const
Definition MoveNode.cc:280
ProgramOperation & sourceOperation() const
Definition MoveNode.cc:453
bool isDestinationOperation() const
std::string toString() const
Definition MoveNode.cc:576
ProgramOperation & guardOperation() const
Definition MoveNode.cc:479
void unsetGuardOperation()
Definition MoveNode.cc:771
const std::shared_ptr< TTAProgram::Immediate > immediate_
Pointer to Immediate this node represents, Node itself do not change move.
Definition MoveNode.hh:158
bool isPlaced() const
Definition MoveNode.cc:352
TTAProgram::Move & move()
ProgramOperationPtr guardOp_
Definition MoveNode.hh:164
bool isSourceOperation() const
Definition MoveNode.cc:168
void setCycle(const int newcycle)
Definition MoveNode.cc:503
bool isAssigned() const
Definition MoveNode.cc:367
bool isScheduled() const
Definition MoveNode.cc:409
virtual ~MoveNode()
Definition MoveNode.cc:110
bool isSourceRA() const
Definition MoveNode.cc:210
bool isSourceImmediateRegister() const
Definition MoveNode.cc:223
bool isSourceConstant() const
Definition MoveNode.cc:238
bool isLastUnscheduledMoveOfDstOp() const
Definition MoveNode.cc:817
bool isFinalized() const
void clearDestinationOperation()
Definition MoveNode.cc:730
std::vector< ProgramOperationPtr > dstOps_
Definition MoveNode.hh:160
bool isDestinationVariable() const
Definition MoveNode.cc:264
void unsetCycle()
Definition MoveNode.cc:519
MoveNode * copy()
Definition MoveNode.cc:135
ProgramOperationPtr destinationOperationPtr(unsigned int index=0) const
bool inSameOperation(const MoveNode &other) const
Definition MoveNode.cc:306
const std::shared_ptr< TTAProgram::Move > move_
Pointer to Move this node represents, Node itself do not change move.
Definition MoveNode.hh:155
void addDestinationOperationPtr(ProgramOperationPtr po)
Definition MoveNode.cc:533
MoveNode()
Node can be entry node.
Definition MoveNode.cc:99
TTAProgram::Immediate & immediate()
Definition MoveNode.cc:838
ProgramOperation & destinationOperation(unsigned int index=0) const
virtual TCEString name() const
Definition Operation.cc:93
static std::string disassemble(const TTAProgram::Move &move)
int outputMoveCount() const
const Operation & operation() const
void addOutputNode(MoveNode &node, int outputIndex)
unsigned int poId() const
int inputMoveCount() const
MoveNode * triggeringMove() const
MoveNode & inputMove(int index) const
void removeInputNode(MoveNode &node)
void removeGuardOutputNode(MoveNode &node)
void removeOutputNode(MoveNode &node, int outputIndex)
void addInputNode(MoveNode &node)
MoveNode & outputMove(int index) const
int outputIndexOfMove(const MoveNode &mn) const
virtual TCEString name() const
virtual HWOperation * operation(const std::string &name) const
static NullInstructionTemplate & instance()
CodeSnippet & parent() const
const TTAMachine::InstructionTemplate & instructionTemplate() const
Terminal & source() const
Definition Move.cc:302
Terminal & destination() const
Definition Move.cc:323
virtual const TTAMachine::FunctionUnit & functionUnit() const
Definition Terminal.cc:251
virtual int index() const
Definition Terminal.cc:274
virtual int operationIndex() const
Definition Terminal.cc:364
virtual const TTAMachine::RegisterFile & registerFile() const
Definition Terminal.cc:225