Go to the documentation of this file.
69 const llvm::MachineInstr* instr) :
70 operation_(&operation), poId_(idCounter++), mInstr_(instr) {
100 if (&
outputMove(i).guardOperation() ==
this) {
148 MapTools::valueForKey<MoveNodeSet*>(
inputMoves_, inputIndex);
170 MapTools::valueForKey<MoveNodeSet*>(
outputMoves_,outputIndex);
217 MapTools::valueForKey<MoveNodeSet*>(
outputMoves_,outputIndex);
228 __FILE__,__LINE__,
__func__,
"MoveNode not part of PO");
280 return hwop->
io(*fup);
293 MapTools::valueForKey<MoveNodeSet*>(
inputMoves_,inputIndex);
304 __FILE__,__LINE__,
__func__,
"MoveNode not part of PO");
322 for (
int i = begin; i <= end; i++) {
353 std::map<int,MoveNodeSet*>::iterator moveIt =
inputMoves_.begin();
355 if ((*moveIt).second->count() > 1) {
362 if ((*moveIt).second->count() > 1) {
488 std::map<int,MoveNodeSet*>::iterator moveIt =
inputMoves_.begin();
490 if ((*moveIt).second->at(0).move().destination().isOpcodeSetting()) {
491 if ((*moveIt).second->count() > 1) {
492 std::string msg =
"ProgramOperation has more then one opcode\
496 return (*moveIt).second->at(0);
500 std::string msg =
"ProgramOperation is missing opcode setting node.";
515 std::string msg =
"InputNode index out of range.";
519 std::map<int, MoveNodeSet*>::const_iterator i =
inputMoves_.find(index);
523 std::string msg =
"InputNode index not found.";
539 std::string msg =
"OutputNode index out of range.";
545 MapTools::valueForKey<MoveNodeSet*>(
outputMoves_, index);
548 std::string msg =
"OutputNode index not found.";
685 for (
int i = 0; i < portC; i++) {
686 auto p = fu->
port(i);
691 ioIndex = hwop->
io(*port);
696 auto mng = *ngi->second;
719 "No MoveNode for the Move found in the ProgramOperation.");
787 return po1.get()->poId() < po2.get()->poId();
815 hwOperation(), idx2));
821 hwOperation(), idx1));
849 outputNode.move().source().port().parentUnit());
853 outputNode.guardOperationPtr().get() ==
this) {
872 inputNode.move().destination().port().parentUnit());
899 return outputNode.move().source().functionUnit().operation(
virtual int numberOfInputs() const
const Operation & operation() const
virtual bool isFUPort() const
int outputIndexFromGuardOfMove(const MoveNode &node) const
@ ANN_REJECTED_UNIT_SRC
Src. unit rejected.
void addGuardOutputNode(MoveNode &node)
void removeInputNode(MoveNode &node)
virtual TCEString name() const
bool hasOutputNode(int out) const
FunctionUnit * parentUnit() const
MoveNodeSet & outputNode(int out) const
bool isUnconditional() const
bool isAnyOutputAssigned()
Terminal & destination() const
const TTAMachine::FunctionUnit * fuFromOutMove(const MoveNode &outputNode) const
virtual Operation & hintOperation() const
void removeMoveNode(MoveNode &)
virtual int numberOfInputs() const
void switchInputs(int idx1=1, int idx2=2)
bool isSourceConstant() const
void addNode(MoveNode &node)
virtual BaseFUPort * port(const std::string &name) const
std::map< int, MoveNodeSet * > outputMoves_
MoveNode & opcodeSettingNode()
int outputIndexFromGuard(const TTAMachine::PortGuard &pg) const
virtual bool isTriggering() const
static NullOperation & instance()
virtual TCEString name() const
bool isLegalFU(const TTAMachine::FunctionUnit &fu) const
static std::string toString(const T &source)
void setHintOperation(const char *name)
MoveNode * triggeringMove() const
virtual TCEString name() const
std::shared_ptr< ProgramOperation > ProgramOperationPtr
void addOutputNode(MoveNode &node, int outputIndex)
ProgramOperation & sourceOperation() const
#define assert(condition)
@ ANN_REJECTED_UNIT_DST
Dst. unit rejected.
void setDestination(Terminal *dst)
virtual int operationIndex() const
int io(const FUPort &port) const
static unsigned int idCounter
bool hasAnnotation(ProgramAnnotation::Id id, const TCEString &data) const
MoveGuard & guard() const
MoveVector allOutputMoves_
std::map< int, MoveNodeSet * > inputMoves_
ProgramOperation()
TODO: this better go, just for testing with empty operation...
const TTAMachine::HWOperation * hwopFromOutMove(const MoveNode &outputNode) const
bool isSourceOperation() const
bool hasConstantOperand() const
MoveVector allInputMoves_
void unsetSourceOperation()
virtual bool hasOperation(const std::string &name) const
void removeGuardOutputNode(MoveNode &node)
virtual Operand & output(int id) const
void unsetGuardOperation()
int inputMoveCount() const
virtual bool isTriggering() const =0
MoveNode * findTriggerFromUnit(const TTAMachine::Unit &unit) const
virtual int portCount() const
const TTAMachine::FunctionUnit * scheduledFU() const
int outputMoveCount() const
void addInputNode(MoveNode &node)
TTAProgram::Move & move()
std::string toString() const
MoveNode & moveNode(const TTAProgram::Move &move) const
void setOperation(const Operation &op)
void addMoveNode(MoveNode &)
void removeDestinationOperation(const ProgramOperation *po)
MoveNodeSet & inputNode(int in) const
bool hasInputNode(int in) const
bool areOutputsAssigned()
Terminal & source() const
bool hasMoveNodeForMove(const TTAProgram::Move &move) const
unsigned int poId() const
virtual const TTAMachine::Port & port() const
virtual HWOperation * operation(const std::string &name) const
bool operator()(const ProgramOperation *po1, const ProgramOperation *po2) const
const TTAMachine::Guard & guard() const
const Operation * operation_
MoveNode & outputMove(int index) const
virtual int numberOfOutputs() const
int outputIndexOfMove(const MoveNode &mn) const
bool isAnyInputAssigned()
void removeOutputNode(MoveNode &node, int outputIndex)
MoveNode & inputMove(int index) const
Unit * parentUnit() const