71#define RESCHEDULE_NEXT_CYCLE_AFTER_DRE
87 softwareBypasser_(bypasser), renamer_(renamer), minCycle_(0),
154 bool movesRemoved =
false;
163 int lastOperandFake = 0;
167 firstMove, lastOperandFake, ddg, rm);
170 firstMove, ddg, rm,
true);
182 std::set<std::pair<TTAProgram::Move*, int> >
185 moves, ddg, rm, removedMoves);
196 std::string message =
" Move(s) did not get scheduled: ";
197 for (
int i = 0; i < moves.
nodeCount(); i++) {
227 "All moves in the DDG didn't get scheduled.");
295 for (
int i = ddg.
nodeCount()-1; i>= 0 ; i--) {
323 std::string(
"_dag.dot"));
338 debugLog(
"All moves in the DDG didn't get scheduled.");
351 <<
"No overlapping instructions."
352 <<
"Should Revert to ordinary scheduler."
363 if (overlap_count >= tripCount) {
383#ifdef DEBUG_REG_COPY_ADDER
384static int graphCount = 0;
408#ifdef DEBUG_REG_COPY_ADDER
411 (boost::format(
"%s_before_ddg.dot") %
ddg_->
name()).str());
418#ifdef DEBUG_REG_COPY_ADDER
419 const int tempsAdded = copies.
count_;
422#ifdef DEBUG_REG_COPY_ADDER
423 if (tempsAdded > 0) {
425 (boost::format(
"%s_after_regcopy_ddg.dot") %
ddg_->
name()).str());
431 for (
int i = 0; i < moves.
nodeCount(); i++) {
437 bool operandsFailed =
true;
438 bool resultsFailed =
true;
439 int operandsStartCycle = 0;
446 const int retryCount = 20;
447 int minOperand = operandsStartCycle;
450 bool bypassTrigger =
true;
452 while ((operandsFailed || resultsFailed) &&
453 operandsStartCycle < maxFromRm + retryCount) {
456 if (minOperand != -1) {
457 operandsFailed =
false;
460 for (
int i = 0; i < moves.
nodeCount(); i++){
468 operandsFailed =
true;
469 operandsStartCycle++;
475 int bypassedMoves = -1;
478 moves, *
ddg_, *
rm_, bypassTrigger);
479 if (bypassedMoves == -1){
483 operandsFailed =
true;
484 if (bypassTrigger ==
false) {
485 tryBypassing =
false;
487 bypassTrigger =
false;
500 resultsFailed =
false;
506 std::set<std::pair<TTAProgram::Move*, int> >
509 moves, *
ddg_, *
rm_, removedMoves);
520 for (
int i = 0; i < moves.
nodeCount(); i++){
534 resultsFailed =
true;
538 tryBypassing =
false;
543 operandsStartCycle++;
545 operandsStartCycle = std::max(minOperand, operandsStartCycle);
551 if (operandsFailed) {
555 std::string(
"_dag.dot"));
560 "Operands scheduling failed for \'" + moves.
toString());
566 std::string(
"_dag.dot"));
571 "Results scheduling failed for \'" + moves.
toString());
576 (resultsFailed || operandsFailed)) {
590 (boost::format(
"Bad BB %s") %
ddg_->
name()).str());
595#ifdef DEBUG_REG_COPY_ADDER
596 if (tempsAdded > 0) {
598 (boost::format(
"%s_after_scheduler_ddg.dot") %
601 <<
"(operation fix #" <<
ddg_->
name() <<
")" << std::endl
630 const int MAX_OPERAND_CYCLE_DIFFERENCE = 15;
632 const int MAX_OPERATION_START_BEFORE_EARLIEST_READ = 50;
634 int lastOperandCycle = 0;
635 int earliestScheduledOperand = INT_MAX;
647 for (
int i = 0; i < moves.
nodeCount(); i++) {
652 MAX_OPERAND_CYCLE_DIFFERENCE;
656 MAX_OPERATION_START_BEFORE_EARLIEST_READ;
674 for (
int i = 0; i < moves.
nodeCount(); i++) {
686 if (earliestDDG == INT_MAX) {
691 (boost::format(
"InputTempMoves failed to schedule "
692 "successfully for '%s' ") % moves.
node(i).
toString()).str());
696 earliestDDG = std::max(earliestDDG, cycle);
698 if (earliest == -1) {
702 if (earliest >= startCycle) {
704 startCycle = earliest;
705 firstToSchedule = &moves.
node(i);
710 cycle = std::min(cycle, earliest);
713 if (firstToSchedule != NULL) {
723 std::string(
"_dag.dot"));
728 (boost::format(
"Move '%s' failed to schedule")
729 % firstToSchedule->
toString()).str());
731 startCycle = firstToSchedule->
cycle();
733 trigger = firstToSchedule;
735 lastOperandCycle = std::max(lastOperandCycle, startCycle);
741 std::string(
"_dag.dot"));
747 "Unable to schedule '%s' is there enough resources?")
752 for (
int moveIndex = 0; moveIndex < moves.
nodeCount(); ++moveIndex) {
760 earliestScheduledOperand =
761 std::min(earliestScheduledOperand, moveNode.
cycle());
774 earliestScheduledOperand =
775 std::min(earliestScheduledOperand, moveNode.
cycle());
778 earliestScheduledOperand =
779 std::min(earliestScheduledOperand, moveNode.
cycle());
782 std::max(lastOperandCycle, moveNode.
cycle());
797 if (earliestScheduledOperand != INT_MAX) {
798 cycle = earliestScheduledOperand;
802 earliestScheduledOperand =
803 std::min(earliestScheduledOperand, moveNode.
cycle());
805 std::max(lastOperandCycle, moveNode.
cycle());
809 if (earliestScheduledOperand != INT_MAX) {
810 cycle = earliestScheduledOperand;
828 earliestScheduledOperand =
829 std::min(earliestScheduledOperand, trigger->
cycle());
832 return earliestScheduledOperand;
844 int tempRegLimitCycle = 0;
846 for (
int moveIndex = 0; moveIndex < moves.
nodeCount(); ++moveIndex) {
853 (boost::format(
"Move to schedule '%s' is not "
854 "result move!") % moveNode.
toString()).str());
862 if (lastRead != NULL) {
863 tempRegLimitCycle = lastRead->
cycle();
880 (boost::format(
"Move '%s' did not get scheduled!")
899#ifdef DEBUG_REG_COPY_ADDER
902 (boost::format(
"%s_before_ddg.dot") %
ddg_->
name()).str());
908#ifdef DEBUG_REG_COPY_ADDER
909 const int tempsAdded =
913#ifdef DEBUG_REG_COPY_ADDER
917#ifdef DEBUG_REG_COPY_ADDER
918 if (tempsAdded > 0) {
920 (boost::format(
"%s_after_regcopy_ddg.dot") %
ddg_->
name()).str());
947 MoveNode& moveNode,
int earliestCycle,
bool allowPredicationAndRenaming) {
951 (boost::format(
"Move '%s' is already scheduled!")
955 int sourceReadyCycle = 0;
976 for (DataDependenceGraph::NodeSet::iterator i = unscheduledMoves.begin();
977 i != unscheduledMoves.end(); ++i) {
978 if (!(*i)->move().isControlFlowMove()) {
980 "Control Flow Move is not last of the unscheduled moves! ";
981 msg +=
"Scheduled count=" +
983 msg +=
" Node count=" +
1007 unsigned int delaySlots =
1013 delaySlots) / ii) + 1)*ii - 1 - delaySlots;
1014 if ((
unsigned)ddgCycle >= ii - delaySlots) {
1016 int jumpOverlapCount = (ddgCycle + delaySlots) / ii;
1017 if (jumpLimit == NULL) {
1026 int loopCounterStep = 1;
1029 loopCounterStep = 2;
1032 loopCounterStep = 4;
1045 (jumpOverlapCount * loopCounterStep),
1059 int minRenamedEC = std::max(
1063 if (
renamer_ != NULL && minRenamedEC < ddgCycle &&
1064 allowPredicationAndRenaming) {
1066 if (minRenamedEC < ddgCycle) {
1069 moveNode, ii != 0,
true,
true, minRenamedEC)) {
1072#ifdef THIS_IS_BUGGY_WITH_REGCOPY_ADDER
1078 if (limitingAdep != NULL) {
1086 *limitingAdep,
false,
true,
true)) {
1107 ddgCycle = std::max(ddgCycle, moveNode.
guardLatency()-1);
1109 if (allowPredicationAndRenaming) {
1113 bool guardNeeded =
false;
1149 int minCycle = std::max(std::max(earliestCycle, ddgCycle),
minCycle_);
1150 minCycle = std::max(minCycle, sourceReadyCycle);
1197 if (minCycle == -1 || minCycle == INT_MAX) {
1205 std::string msg =
"Assignment of MoveNode " + moveNode.
toString();
1206 msg +=
" failed! Most likely missing Long Immediate Unit";
1207 msg +=
" or Instruction Template!";
1211 __FILE__, __LINE__,
__func__, msg);
1214 std::string(
"ii_") +
1216 std::string(
"_dag.dot"));
1220 __FILE__, __LINE__,
__func__, msg);
1228 if (ii != 0 && (minCycle > latestDDG)) {
1232 if (
renamer_ != NULL && allowPredicationAndRenaming) {
1243 if (ii != 0 && (minCycle > latestDDG)) {
1251 scheduleMove(moveNode, earliestCycle, allowPredicationAndRenaming);
1257 std::string(
"_dag.dot"));
1261 __FILE__, __LINE__,
__func__,
"Schedule failed try bigger ii.");
1274 (boost::format(
"Assignment of MoveNode '%s' failed!")
1306 if (tempMove1 == NULL)
1310 if (tempMove2 != NULL) {
1315 if (lastRead != NULL)
1316 lastUse = lastRead->
cycle();
1356 for (DataDependenceGraph::EdgeSet::iterator i = inEdges.begin();
1357 i != inEdges.end(); ++i) {
1371 assert(tempMove == NULL &&
1372 "Multiple unscheduled moves for the operand move, should have "
1373 "max. one (the temporary move)!");
1379 if (lastRead != NULL)
1380 lastUse = lastRead->
cycle();
1383 if (tempMove == NULL)
1410 for (DataDependenceGraph::NodeSet::iterator i = succ.begin();
1411 i != succ.end(); ++i) {
1419 "Multiple candidates for the temp move of result read.");
1452 if (tempMove1 == NULL)
1456 if (tempMove2 != NULL) {
1461 if (lastRead != NULL)
1462 lastUse = lastRead->
cycle();
1498 (boost::format(
"Unscheduling of move '%s' failed!")
1509 for (DataDependenceGraph::NodeSet::iterator i = scheduled.begin();
1510 i != scheduled.end(); ++i) {
1535 for (DataDependenceGraph::NodeSet::iterator i = tempMoves.begin();
1536 i != tempMoves.end(); ++i) {
1556 for (DataDependenceGraph::NodeSet::iterator i = tempMoves.begin();
1557 i != tempMoves.end(); ++i) {
1571 return "Instruction scheduler with a basic block scope.";
1585 "Basic block scheduler that uses the longest path information of "
1586 "data dependency graph to prioritize the ready list. Assumes that "
1587 "the input has registers allocated and no connectivity missing.";
1601 for (
int moveIndex = 0; moveIndex < moves.
nodeCount(); ++moveIndex) {
1604 std::map<const MoveNode*, DataDependenceGraph::NodeSet>::
1608 for (DataDependenceGraph::NodeSet::iterator i =
1609 tempMoves.begin(); i != tempMoves.end(); i++) {
1610 if ((**i).isScheduled()) {
1631 const std::string& name,
1634 bool resetCounter)
const {
1636 static int bbCounter = 0;
1645 (boost::format(
"bb_%s_%s_after_scheduling.dot") %
1649 (boost::format(
"bb_%s_%s_after_scheduling.xml") %
1656 (boost::format(
"bb_%s_%d_%s_before_scheduling.dot")
1657 % ddg.
name() % bbCounter % name).str());
1661 "bb_%s_%d_%s_before_scheduling_critical_path.dot")
1662 % ddg.
name() % bbCounter % name).str());
1663 delete criticalPath;
1666 (boost::format(
"bb_%s_%d_%s_before_scheduling.xml")
1667 % ddg.
name() % bbCounter % name).str());
1689 for (
int i = 0; i < fuNav.
count(); i++) {
1736 if (triggerOperand != 0) {
1738 int latestMinCycle = -1;
1739 int firstMinCycle = INT_MAX;
1749 if (operandIndex != triggerOperand) {
1759 if (minCycle > latestMinCycle) {
1761 latestMinCycle = minCycle;
1763 if (minCycle < firstMinCycle) {
1764 firstMinCycle = minCycle;
1771 if (latestMinCycle == firstMinCycle) {
1774 if (latestMinCycle - firstMinCycle > 1) {
1775 if (lastOperand == triggerOperand) {
1780 if (lastOperand != triggerOperand) {
1804 std::set<std::pair<TTAProgram::Move*, int> > removedMoves) {
1806 if (removedMoves.size() == 0)
1809#ifndef RESCHEDULE_NEXT_CYCLE_AFTER_DRE
1813 const bool DEBUG_PRINT =
false;
1817 << removedMoves.size() <<
" dead results eliminated: "
1821 for (std::set<std::pair<TTAProgram::Move*, int> >::
1822 const_iterator i = removedMoves.begin();
1823 i != removedMoves.end(); ++i) {
1826 int cycle = (*i).second;
1830 << eliminatedMove.
toString() <<
" (cycle " << cycle <<
") ";
1833 int oldCycle = cycle + 1;
1844 bool rescheduleAllSucceedingMoves =
false;
1845 for (DataDependenceGraph::NodeSet::const_iterator m =
1846 nextCycleMoves.begin(); m != nextCycleMoves.end(); ++m) {
1849 if (rescheduleAllSucceedingMoves ||
1856 <<
"Trying to reschedule "
1857 << moveNode.
toString() <<
" " << std::endl;
1866 scheduleMove(moveNode, std::max(oldCycle - 10, 0),
false);
1869 for (
int c = 4; c >= 0; --c) {
1871 <<
"\t\t" << oldCycle - c <<
": "
1873 std::max(oldCycle - c, 0))->
toString()
1879 if (moveNode.
cycle() < oldCycle) {
1882 <<
" OK at cycle " << moveNode.
cycle() <<
". " << std::endl;
1927 for (DataDependenceGraph::EdgeSet::iterator i = inEdges.begin();
1928 i != inEdges.end(); i++) {
1934 if (wawPred == NULL) {
1942 if (wawPred == NULL) {
1947 int wawPredCycle = wawPred->
cycle();
1954 for (DataDependenceGraph::NodeSet::iterator i = gdMoves.begin();
1955 i != gdMoves.end(); i++) {
1966 for (DataDependenceGraph::NodeSet::iterator i = consumers.begin();
1967 i != consumers.end(); i++) {
1969 if (consumers2.find(mn) == consumers2.end() &&
1988 bool revert =
false;
2027 for (
int i = 0; i < moves.
nodeCount(); i++) {
2033 trigger = &moveNode;
2035 int oldCycle = moveNode.
cycle();
2036 if (oldCycle < ec) {
2042 int triggerCycle = trigger->
cycle();
2044 bool failed =
false;
2045 while (ec < triggerCycle && !failed) {
2046 for (
int i = 0; i < moves.
nodeCount(); i++) {
2051 if (&moveNode != trigger) {
2052 int oldCycle = moveNode.
cycle();
2053 if (oldCycle == ec) {
2055 if (latest > oldCycle) {
2056 latest = std::min(latest, triggerCycle);
2060 if (latestrm == ec) {
2073 for (
int i = 0; i < moves.
nodeCount(); i++) {
2078 if (&moveNode != trigger) {
2079 int oldCycle = moveNode.
cycle();
2080 if (oldCycle < ec) {
2094 if (triggerFromPO) {
2095 return triggerFromPO;
2103 for (
int i = 0; i < nav.
count(); i++) {
2106 if (candidate == NULL) {
2133 for (
int i = 0; i < portC; i++) {
2134 auto p = fu->
port(i);
2139 ioIndex = hwop->
io(*port);
#define abortWithError(message)
#define assert(condition)
TTAMachine::Machine * machine
the architecture definition of the estimated processor
static CmdLineOptions * cmdLineOptions()
static int verboseLevel()
static std::ostream & logStream()
void scheduleMove(MoveNode &move, int earliestCycle, bool allowPredicationAndRenaming)
void scheduleRRTempMoves(MoveNode ®ToRegMove, MoveNode &firstMove, int lastUse)
MoveNodeSelector * selector_
bool tryToSwitchInputs(ProgramOperation &op)
void unscheduleInputOperandTempMoves(MoveNode &operandMove)
void unscheduleAllNodes()
static MoveNode * findTriggerFromUnit(const ProgramOperation &po, const TTAMachine::Unit &unit)
bool tryToOptimizeWaw(const MoveNode &moveNode)
void tryToDelayOperands(MoveNodeGroup &moves)
SimpleResourceManager * rm_
Resource Manager of the currently scheduled BB.
static MoveNode * findTrigger(const ProgramOperation &po, const TTAMachine::Machine &mach)
int scheduleOperandWrites(int &cycle, MoveNodeGroup &moves)
bool scheduleResultReads(MoveNodeGroup &moves)
void unscheduleResultReadTempMoves(MoveNode &resultMove)
virtual int handleDDG(DataDependenceGraph &ddg, SimpleResourceManager &rm, const TTAMachine::Machine &targetMachine, int minCycle=0, bool testOnly=false) override
void scheduleRRMove(MoveNode &moveNode)
SoftwareBypasser * softwareBypasser_
The software bypasser to use to bypass registers when possible.
virtual std::string longDescription() const
void scheduleInputOperandTempMoves(MoveNode &operandMove, MoveNode &operandWrite)
const TTAMachine::Machine * targetMachine_
The target machine we are scheduling the program against.
virtual ~BasicBlockScheduler()
DataDependenceGraph * ddg_
DDG of the currently scheduled BB.
virtual int handleLoopDDG(DataDependenceGraph &ddg, SimpleResourceManager &rm, const TTAMachine::Machine &targetMachine, int tripCount, SimpleResourceManager *prologRM, bool testOnly=false) override
virtual std::string shortDescription() const
std::map< const MoveNode *, DataDependenceGraph::NodeSet > scheduledTempMoves_
Stores the MoveNodes that were scheduled as temp moves during scheduling of the operand move.
void scheduleOperation(MoveNodeGroup &moves)
void handleRemovedResultMoves(std::set< std::pair< TTAProgram::Move *, int > > removedMoves)
int getTriggerOperand(const Operation &operation, const TTAMachine::Machine &machine)
LLVMTCECmdLineOptions * options_
void scheduleResultReadTempMoves(MoveNode &resultMove, MoveNode &resultRead, int lastUse)
int minCycle_
The earliest cycle to schedule moves in. Used to leave room for sched_yield() by the sched_yield() em...
void notifyScheduled(MoveNodeGroup &moves, MoveNodeSelector &selector)
void unschedule(MoveNode &moveNode)
MoveNode * succeedingTempMove(MoveNode ¤t)
virtual void printStats() const
RegisterRenamer * renamer_
void ddgSnapshot(DataDependenceGraph &ddg, const std::string &name, DataDependenceGraph::DumpFileFormat format, bool final, bool resetCounter=false) const
BasicBlockScheduler(InterPassData &data, SoftwareBypasser *bypasser=NULL, RegisterRenamer *renamer=NULL)
virtual void removeEdge(Edge &e)
virtual NodeSet successors(const Node &node, bool ignoreBackEdges=false, bool ignoreForwardEdges=false) const
Node & node(const int index) const
virtual const TCEString & name() const
virtual Node & tailNode(const Edge &edge) const
virtual EdgeSet inEdges(const Node &node) const
virtual void connectNodes(const Node &nTail, const Node &nHead, Edge &e)
static std::string toString(const T &source)
DataDependenceGraph * ddg_
virtual MoveNodeGroup candidates()
DependenceType dependenceType() const
EdgeReason edgeReason() const
int latestCycle(const MoveNode &moveNode, unsigned int ii=UINT_MAX, bool ignoreRegAntideps=false, bool ignoreUnscheduledSuccessors=true, bool ignoreGuards=false, bool ignoreFUDeps=false, bool ignoreSameOperationEdges=false) const
NodeSet regRawSuccessors(const MoveNode &node) const
int earliestCycle(const MoveNode &moveNode, unsigned int ii=UINT_MAX, bool ignoreRegWaRs=false, bool ignoreRegWaWs=false, bool ignoreGuards=false, bool ignoreFUDeps=false, bool ignoreSameOperationEdges=false, bool assumeBypassing=false) const
void copyOutgoingGuardWarEdges(const MoveNode &src, MoveNode &dst)
NodeSet unscheduledMoves() const
DataDependenceGraph * criticalPathGraph()
NodeSet scheduledMoves() const
NodeSet movesAtCycle(int cycle) const
int scheduledNodeCount() const
bool exclusingGuards(const MoveNode &mn1, const MoveNode &mn2) const
MoveNode * lastScheduledRegisterRead(const TTAMachine::BaseRegisterFile &rf, int registerIndex, int lastCycleToTest=INT_MAX) const
MoveNode * findLimitingAntidependenceSource(MoveNode &mn)
void copyIncomingGuardEdges(const MoveNode &src, MoveNode &dst)
std::pair< MoveNode *, MoveNode * > findLoopLimitAndIndex(MoveNode &jumpMove)
virtual void setCycleGrouping(bool flag)
void writeToXMLFile(std::string fileName) const
void removeOutgoingGuardWarEdges(MoveNode &node)
NodeSet guardDefMoves(const MoveNode &moveNode)
EdgeSet copyDepsOver(MoveNode &node, bool anti, bool raw)
void removeIncomingGuardEdges(MoveNode &node)
std::string errorMessageStack(bool messagesOnly=false) const
virtual void writeToDotFile(const TCEString &fileName) const
std::set< GraphNode *, typename GraphNode::Comparator > NodeSet
std::set< GraphEdge *, typename GraphEdge::Comparator > EdgeSet
virtual bool dumpDDGsDot() const
virtual bool dumpDDGsXML() const
MoveNode & node(int index) const
void addNode(MoveNode &node)
std::string toString() const
virtual void notifyScheduled(MoveNode &node)=0
void addMoveNode(MoveNode &)
int earliestResultReadCycle() const
bool isOperationMove() const
ProgramOperation & sourceOperation() const
bool isDestinationOperation() const
std::string toString() const
TTAProgram::Move & move()
bool isSourceOperation() const
bool isSourceConstant() const
ProgramOperation & destinationOperation(unsigned int index=0) const
virtual TCEString name() const
virtual bool hasSideEffects() const
virtual int affectsCount() const
virtual bool writesMemory() const
virtual int numberOfInputs() const
virtual bool canSwap(int id1, int id2) const
const Operation & operation() const
int inputMoveCount() const
MoveNode * triggeringMove() const
MoveNodeSet & inputNode(int in) const
MoveNode & inputMove(int index) const
void switchInputs(int idx1=1, int idx2=2)
void operandsScheduled(AddedRegisterCopies &copies, DataDependenceGraph &ddg)
AddedRegisterCopies addRegisterCopiesToRRMove(MoveNode &moveNode, DataDependenceGraph *ddg)
void resultsScheduled(AddedRegisterCopies &copies, DataDependenceGraph &ddg)
AddedRegisterCopies addMinimumRegisterCopies(ProgramOperation &programOperation, const TTAMachine::Machine &targetMachine, DataDependenceGraph *ddg)
bool renameDestinationRegister(MoveNode &node, bool loopScheduling, bool allowSameRf, bool differentRfOnlyDirectlyReachable, int earliestCycle=-1)
void setSelector(MoveNodeSelector *selector)
bool renameSourceRegister(MoveNode &node, bool loopScheduling, bool allowSameRf, bool differentRfOnlyDirectlyReachable, int latestCycle=INT_MAX)
void initialize(DataDependenceGraph &ddg)
InterPassData & interPassData()
unsigned int unsignedValue() const
virtual void assign(int cycle, MoveNode &node, const TTAMachine::Bus *bus=NULL, const TTAMachine::FunctionUnit *srcFU=NULL, const TTAMachine::FunctionUnit *dstFU=NULL, int immWriteCycle=-1, const TTAMachine::ImmediateUnit *immu=nullptr, int immRegIndex=-1) override
virtual int earliestCycle(MoveNode &node, const TTAMachine::Bus *bus=NULL, const TTAMachine::FunctionUnit *srcFU=NULL, const TTAMachine::FunctionUnit *dstFU=NULL, int immWriteCycle=-1, const TTAMachine::ImmediateUnit *immu=nullptr, int immRegIndex=-1) const override
virtual unsigned initiationInterval() const
virtual bool canTransportImmediate(const MoveNode &node, const TTAMachine::Bus *preAssignedBus=NULL) const
virtual void unassign(MoveNode &node) override
virtual TTAProgram::Instruction * instruction(int cycle) const override
virtual int largestCycle() const override
virtual int latestCycle(MoveNode &node, const TTAMachine::Bus *bus=NULL, const TTAMachine::FunctionUnit *srcFU=NULL, const TTAMachine::FunctionUnit *dstFU=NULL, int immWriteCycle=-1, const TTAMachine::ImmediateUnit *immu=nullptr, int immRegIndex=-1) const override
virtual int removeDeadResults(MoveNodeGroup &candidates, DataDependenceGraph &ddg, ResourceManager &rm, std::set< std::pair< TTAProgram::Move *, int > > &removedMoves)=0
virtual void setSelector(MoveNodeSelector *selector)
virtual int bypassNode(MoveNode &moveNode, int &lastOperandCycle, DataDependenceGraph &ddg, ResourceManager &rm)=0
virtual void clearCaches(DataDependenceGraph &ddg, bool removeDeadResults)=0
virtual void removeBypass(MoveNodeGroup &candidates, DataDependenceGraph &ddg, ResourceManager &rm)=0
virtual int bypass(MoveNodeGroup &candidates, DataDependenceGraph &ddg, ResourceManager &rm, bool bypassTrigger)=0
virtual bool isTriggering() const
virtual HWOperation * operation(const std::string &name) const
virtual bool hasOperation(const std::string &name) const
virtual BaseFUPort * port(const std::string &name) const
virtual FUPort * port(int operand) const
int io(const FUPort &port) const
ComponentType * item(int index) const
virtual FunctionUnitNavigator functionUnitNavigator() const
virtual ControlUnit * controlUnit() const
virtual int portCount() const
void removeAnnotations(ProgramAnnotation::Id id=ProgramAnnotation::ANN_UNDEF_ID)
void setAnnotation(const ProgramAnnotation &annotation)
bool hasAnnotations(ProgramAnnotation::Id id=ProgramAnnotation::ANN_UNDEF_ID) const
static TTAProgram::MoveGuard * createInverseGuard(const TTAProgram::MoveGuard &mg, const TTAMachine::Bus *bus=NULL)
std::string toString() const
void setSource(Terminal *src)
MoveGuard & guard() const
bool isControlFlowMove() const
bool isUnconditional() const
std::string toString() const
Terminal & source() const
void setGuard(MoveGuard *guard)
bool isTriggering() const
Terminal & destination() const
@ ANN_STACKFRAME_PROCEDURE_RETURN
precedure return jmp
@ ANN_CONNECTIVITY_MOVE
A reg to reg move that was added because of missing connectivity between the original target and dest...
virtual bool isRA() const
virtual bool isTriggering() const
virtual int index() const
virtual bool equals(const Terminal &other) const =0
virtual bool isGPR() const
virtual int operationIndex() const
virtual const TTAMachine::RegisterFile & registerFile() const