Go to the documentation of this file.
38 #include <boost/timer.hpp>
73 #define RESCHEDULE_NEXT_CYCLE_AFTER_DRE
89 softwareBypasser_(bypasser), renamer_(renamer), minCycle_(0),
157 bool movesRemoved =
false;
166 int lastOperandFake = 0;
170 firstMove, lastOperandFake, ddg, rm);
173 firstMove, ddg, rm,
true);
185 std::set<std::pair<TTAProgram::Move*, int> >
188 moves, ddg, rm, removedMoves);
199 std::string message =
" Move(s) did not get scheduled: ";
200 for (
int i = 0; i < moves.
nodeCount(); i++) {
230 "All moves in the DDG didn't get scheduled.");
299 for (
int i = ddg.
nodeCount()-1; i>= 0 ; i--) {
327 std::string(
"_dag.dot"));
342 debugLog(
"All moves in the DDG didn't get scheduled.");
355 <<
"No overlapping instructions."
356 <<
"Should Revert to ordinary scheduler."
367 if (overlap_count >= tripCount) {
387 #ifdef DEBUG_REG_COPY_ADDER
388 static int graphCount = 0;
412 #ifdef DEBUG_REG_COPY_ADDER
415 (boost::format(
"%s_before_ddg.dot") %
ddg_->
name()).str());
422 #ifdef DEBUG_REG_COPY_ADDER
423 const int tempsAdded = copies.
count_;
426 #ifdef DEBUG_REG_COPY_ADDER
427 if (tempsAdded > 0) {
429 (boost::format(
"%s_after_regcopy_ddg.dot") %
ddg_->
name()).str());
435 for (
int i = 0; i < moves.
nodeCount(); i++) {
441 bool operandsFailed =
true;
442 bool resultsFailed =
true;
443 int operandsStartCycle = 0;
450 const int retryCount = 20;
451 int minOperand = operandsStartCycle;
454 bool bypassTrigger =
true;
456 while ((operandsFailed || resultsFailed) &&
457 operandsStartCycle < maxFromRm + retryCount) {
460 if (minOperand != -1) {
461 operandsFailed =
false;
464 for (
int i = 0; i < moves.
nodeCount(); i++){
472 operandsFailed =
true;
473 operandsStartCycle++;
479 int bypassedMoves = -1;
482 moves, *
ddg_, *
rm_, bypassTrigger);
483 if (bypassedMoves == -1){
487 operandsFailed =
true;
488 if (bypassTrigger ==
false) {
489 tryBypassing =
false;
491 bypassTrigger =
false;
504 resultsFailed =
false;
510 std::set<std::pair<TTAProgram::Move*, int> >
513 moves, *
ddg_, *
rm_, removedMoves);
524 for (
int i = 0; i < moves.
nodeCount(); i++){
538 resultsFailed =
true;
542 tryBypassing =
false;
547 operandsStartCycle++;
549 operandsStartCycle = std::max(minOperand, operandsStartCycle);
555 if (operandsFailed) {
559 std::string(
"_dag.dot"));
564 "Operands scheduling failed for \'" + moves.
toString());
570 std::string(
"_dag.dot"));
575 "Results scheduling failed for \'" + moves.
toString());
580 (resultsFailed || operandsFailed)) {
594 (boost::format(
"Bad BB %s") %
ddg_->
name()).str());
599 #ifdef DEBUG_REG_COPY_ADDER
600 if (tempsAdded > 0) {
602 (boost::format(
"%s_after_scheduler_ddg.dot") %
605 <<
"(operation fix #" <<
ddg_->
name() <<
")" << std::endl
634 const int MAX_OPERAND_CYCLE_DIFFERENCE = 15;
636 const int MAX_OPERATION_START_BEFORE_EARLIEST_READ = 50;
638 int lastOperandCycle = 0;
639 int earliestScheduledOperand = INT_MAX;
651 for (
int i = 0; i < moves.
nodeCount(); i++) {
656 MAX_OPERAND_CYCLE_DIFFERENCE;
660 MAX_OPERATION_START_BEFORE_EARLIEST_READ;
678 for (
int i = 0; i < moves.
nodeCount(); i++) {
690 if (earliestDDG == INT_MAX) {
695 (boost::format(
"InputTempMoves failed to schedule "
696 "successfully for '%s' ") % moves.
node(i).
toString()).str());
700 earliestDDG = std::max(earliestDDG, cycle);
702 if (earliest == -1) {
706 if (earliest >= startCycle) {
708 startCycle = earliest;
709 firstToSchedule = &moves.
node(i);
714 cycle = std::min(cycle, earliest);
717 if (firstToSchedule != NULL) {
727 std::string(
"_dag.dot"));
732 (boost::format(
"Move '%s' failed to schedule")
733 % firstToSchedule->
toString()).str());
735 startCycle = firstToSchedule->
cycle();
737 trigger = firstToSchedule;
739 lastOperandCycle = std::max(lastOperandCycle, startCycle);
745 std::string(
"_dag.dot"));
751 "Unable to schedule '%s' is there enough resources?")
756 for (
int moveIndex = 0; moveIndex < moves.
nodeCount(); ++moveIndex) {
764 earliestScheduledOperand =
765 std::min(earliestScheduledOperand, moveNode.
cycle());
778 earliestScheduledOperand =
779 std::min(earliestScheduledOperand, moveNode.
cycle());
782 earliestScheduledOperand =
783 std::min(earliestScheduledOperand, moveNode.
cycle());
786 std::max(lastOperandCycle, moveNode.
cycle());
801 if (earliestScheduledOperand != INT_MAX) {
802 cycle = earliestScheduledOperand;
806 earliestScheduledOperand =
807 std::min(earliestScheduledOperand, moveNode.
cycle());
809 std::max(lastOperandCycle, moveNode.
cycle());
813 if (earliestScheduledOperand != INT_MAX) {
814 cycle = earliestScheduledOperand;
832 earliestScheduledOperand =
833 std::min(earliestScheduledOperand, trigger->
cycle());
836 return earliestScheduledOperand;
848 int tempRegLimitCycle = 0;
850 for (
int moveIndex = 0; moveIndex < moves.
nodeCount(); ++moveIndex) {
857 (boost::format(
"Move to schedule '%s' is not "
858 "result move!") % moveNode.
toString()).str());
866 if (lastRead != NULL) {
867 tempRegLimitCycle = lastRead->
cycle();
884 (boost::format(
"Move '%s' did not get scheduled!")
903 #ifdef DEBUG_REG_COPY_ADDER
906 (boost::format(
"%s_before_ddg.dot") %
ddg_->
name()).str());
912 #ifdef DEBUG_REG_COPY_ADDER
913 const int tempsAdded =
917 #ifdef DEBUG_REG_COPY_ADDER
921 #ifdef DEBUG_REG_COPY_ADDER
922 if (tempsAdded > 0) {
924 (boost::format(
"%s_after_regcopy_ddg.dot") %
ddg_->
name()).str());
951 MoveNode& moveNode,
int earliestCycle,
bool allowPredicationAndRenaming) {
955 (boost::format(
"Move '%s' is already scheduled!")
959 int sourceReadyCycle = 0;
980 for (DataDependenceGraph::NodeSet::iterator i = unscheduledMoves.begin();
981 i != unscheduledMoves.end(); ++i) {
982 if (!(*i)->move().isControlFlowMove()) {
984 "Control Flow Move is not last of the unscheduled moves! ";
985 msg +=
"Scheduled count=" +
987 msg +=
" Node count=" +
1011 unsigned int delaySlots =
1017 delaySlots) / ii) + 1)*ii - 1 - delaySlots;
1018 if ((
unsigned)ddgCycle >= ii - delaySlots) {
1020 int jumpOverlapCount = (ddgCycle + delaySlots) / ii;
1021 if (jumpLimit == NULL) {
1030 int loopCounterStep = 1;
1033 loopCounterStep = 2;
1036 loopCounterStep = 4;
1049 (jumpOverlapCount * loopCounterStep),
1063 int minRenamedEC = std::max(
1067 if (
renamer_ != NULL && minRenamedEC < ddgCycle &&
1068 allowPredicationAndRenaming) {
1070 if (minRenamedEC < ddgCycle) {
1073 moveNode, ii != 0,
true,
true, minRenamedEC)) {
1076 #ifdef THIS_IS_BUGGY_WITH_REGCOPY_ADDER
1082 if (limitingAdep != NULL) {
1090 *limitingAdep,
false,
true,
true)) {
1111 ddgCycle = std::max(ddgCycle, moveNode.
guardLatency()-1);
1113 if (allowPredicationAndRenaming) {
1117 bool guardNeeded =
false;
1153 int minCycle = std::max(std::max(earliestCycle, ddgCycle),
minCycle_);
1154 minCycle = std::max(minCycle, sourceReadyCycle);
1201 if (minCycle == -1 || minCycle == INT_MAX) {
1209 std::string msg =
"Assignment of MoveNode " + moveNode.
toString();
1210 msg +=
" failed! Most likely missing Long Immediate Unit";
1211 msg +=
" or Instruction Template!";
1215 __FILE__, __LINE__,
__func__, msg);
1218 std::string(
"ii_") +
1220 std::string(
"_dag.dot"));
1224 __FILE__, __LINE__,
__func__, msg);
1232 if (ii != 0 && (minCycle > latestDDG)) {
1236 if (
renamer_ != NULL && allowPredicationAndRenaming) {
1247 if (ii != 0 && (minCycle > latestDDG)) {
1255 scheduleMove(moveNode, earliestCycle, allowPredicationAndRenaming);
1261 std::string(
"_dag.dot"));
1265 __FILE__, __LINE__,
__func__,
"Schedule failed try bigger ii.");
1278 (boost::format(
"Assignment of MoveNode '%s' failed!")
1310 if (tempMove1 == NULL)
1314 if (tempMove2 != NULL) {
1319 if (lastRead != NULL)
1320 lastUse = lastRead->
cycle();
1360 for (DataDependenceGraph::EdgeSet::iterator i = inEdges.begin();
1361 i != inEdges.end(); ++i) {
1375 assert(tempMove == NULL &&
1376 "Multiple unscheduled moves for the operand move, should have "
1377 "max. one (the temporary move)!");
1383 if (lastRead != NULL)
1384 lastUse = lastRead->
cycle();
1387 if (tempMove == NULL)
1414 for (DataDependenceGraph::NodeSet::iterator i = succ.begin();
1415 i != succ.end(); ++i) {
1423 "Multiple candidates for the temp move of result read.");
1456 if (tempMove1 == NULL)
1460 if (tempMove2 != NULL) {
1465 if (lastRead != NULL)
1466 lastUse = lastRead->
cycle();
1502 (boost::format(
"Unscheduling of move '%s' failed!")
1513 for (DataDependenceGraph::NodeSet::iterator i = scheduled.begin();
1514 i != scheduled.end(); ++i) {
1539 for (DataDependenceGraph::NodeSet::iterator i = tempMoves.begin();
1540 i != tempMoves.end(); ++i) {
1560 for (DataDependenceGraph::NodeSet::iterator i = tempMoves.begin();
1561 i != tempMoves.end(); ++i) {
1575 return "Instruction scheduler with a basic block scope.";
1589 "Basic block scheduler that uses the longest path information of "
1590 "data dependency graph to prioritize the ready list. Assumes that "
1591 "the input has registers allocated and no connectivity missing.";
1605 for (
int moveIndex = 0; moveIndex < moves.
nodeCount(); ++moveIndex) {
1608 std::map<const MoveNode*, DataDependenceGraph::NodeSet>::
1612 for (DataDependenceGraph::NodeSet::iterator i =
1613 tempMoves.begin(); i != tempMoves.end(); i++) {
1614 if ((**i).isScheduled()) {
1635 const std::string& name,
1638 bool resetCounter)
const {
1640 static int bbCounter = 0;
1649 (boost::format(
"bb_%s_%s_after_scheduling.dot") %
1653 (boost::format(
"bb_%s_%s_after_scheduling.xml") %
1660 (boost::format(
"bb_%s_%d_%s_before_scheduling.dot")
1661 % ddg.
name() % bbCounter % name).str());
1665 "bb_%s_%d_%s_before_scheduling_critical_path.dot")
1666 % ddg.
name() % bbCounter % name).str());
1667 delete criticalPath;
1670 (boost::format(
"bb_%s_%d_%s_before_scheduling.xml")
1671 % ddg.
name() % bbCounter % name).str());
1693 for (
int i = 0; i < fuNav.
count(); i++) {
1740 if (triggerOperand != 0) {
1742 int latestMinCycle = -1;
1743 int firstMinCycle = INT_MAX;
1753 if (operandIndex != triggerOperand) {
1763 if (minCycle > latestMinCycle) {
1765 latestMinCycle = minCycle;
1767 if (minCycle < firstMinCycle) {
1768 firstMinCycle = minCycle;
1775 if (latestMinCycle == firstMinCycle) {
1778 if (latestMinCycle - firstMinCycle > 1) {
1779 if (lastOperand == triggerOperand) {
1784 if (lastOperand != triggerOperand) {
1808 std::set<std::pair<TTAProgram::Move*, int> > removedMoves) {
1810 if (removedMoves.size() == 0)
1813 #ifndef RESCHEDULE_NEXT_CYCLE_AFTER_DRE
1817 const bool DEBUG_PRINT =
false;
1821 << removedMoves.size() <<
" dead results eliminated: "
1825 for (std::set<std::pair<TTAProgram::Move*, int> >::
1826 const_iterator i = removedMoves.begin();
1827 i != removedMoves.end(); ++i) {
1830 int cycle = (*i).second;
1834 << eliminatedMove.
toString() <<
" (cycle " << cycle <<
") ";
1837 int oldCycle = cycle + 1;
1848 bool rescheduleAllSucceedingMoves =
false;
1849 for (DataDependenceGraph::NodeSet::const_iterator m =
1850 nextCycleMoves.begin(); m != nextCycleMoves.end(); ++m) {
1853 if (rescheduleAllSucceedingMoves ||
1860 <<
"Trying to reschedule "
1861 << moveNode.
toString() <<
" " << std::endl;
1870 scheduleMove(moveNode, std::max(oldCycle - 10, 0),
false);
1873 for (
int c = 4; c >= 0; --c) {
1875 <<
"\t\t" << oldCycle - c <<
": "
1877 std::max(oldCycle - c, 0))->
toString()
1883 if (moveNode.
cycle() < oldCycle) {
1886 <<
" OK at cycle " << moveNode.
cycle() <<
". " << std::endl;
1931 for (DataDependenceGraph::EdgeSet::iterator i = inEdges.begin();
1932 i != inEdges.end(); i++) {
1938 if (wawPred == NULL) {
1946 if (wawPred == NULL) {
1951 int wawPredCycle = wawPred->
cycle();
1958 for (DataDependenceGraph::NodeSet::iterator i = gdMoves.begin();
1959 i != gdMoves.end(); i++) {
1970 for (DataDependenceGraph::NodeSet::iterator i = consumers.begin();
1971 i != consumers.end(); i++) {
1973 if (consumers2.find(mn) == consumers2.end() &&
1992 bool revert =
false;
2031 for (
int i = 0; i < moves.
nodeCount(); i++) {
2037 trigger = &moveNode;
2039 int oldCycle = moveNode.
cycle();
2040 if (oldCycle < ec) {
2046 int triggerCycle = trigger->
cycle();
2048 bool failed =
false;
2049 while (ec < triggerCycle && !failed) {
2050 for (
int i = 0; i < moves.
nodeCount(); i++) {
2055 if (&moveNode != trigger) {
2056 int oldCycle = moveNode.
cycle();
2057 if (oldCycle == ec) {
2059 if (latest > oldCycle) {
2060 latest = std::min(latest, triggerCycle);
2064 if (latestrm == ec) {
2077 for (
int i = 0; i < moves.
nodeCount(); i++) {
2082 if (&moveNode != trigger) {
2083 int oldCycle = moveNode.
cycle();
2084 if (oldCycle < ec) {
2098 if (triggerFromPO) {
2099 return triggerFromPO;
2107 for (
int i = 0; i < nav.
count(); i++) {
2110 if (candidate == NULL) {
2137 for (
int i = 0; i < portC; i++) {
2138 auto p = fu->
port(i);
2143 ioIndex = hwop->
io(*port);
const Operation & operation() const
MoveNode * lastScheduledRegisterRead(const TTAMachine::BaseRegisterFile &rf, int registerIndex, int lastCycleToTest=INT_MAX) const
virtual bool isTriggering() const
DataDependenceGraph * ddg_
DDG of the currently scheduled BB.
virtual void setSelector(MoveNodeSelector *selector)
virtual void connectNodes(const Node &nTail, const Node &nHead, Edge &e)
virtual bool writesMemory() const
bool isTriggering() const
void removeIncomingGuardEdges(MoveNode &node)
void unschedule(MoveNode &moveNode)
virtual void removeEdge(Edge &e)
NodeSet regRawSuccessors(const MoveNode &node) const
virtual ~BasicBlockScheduler()
virtual Node & tailNode(const Edge &edge) const
virtual int largestCycle() const override
int scheduledNodeCount() const
std::string toString() const
virtual bool hasSideEffects() const
MoveNode & node(int index) const
virtual int index() const
MoveNode * succeedingTempMove(MoveNode ¤t)
TTAMachine::Machine * machine
the architecture definition of the estimated processor
Node & node(const int index) const
virtual const TTAMachine::RegisterFile & registerFile() const
bool isDestinationOperation() const
MoveNode * findLimitingAntidependenceSource(MoveNode &mn)
std::pair< MoveNode *, MoveNode * > findLoopLimitAndIndex(MoveNode &jumpMove)
std::set< MoveNode *, typename MoveNode ::Comparator > NodeSet
MoveNodeSelector * selector_
bool isUnconditional() const
void setAnnotation(const ProgramAnnotation &annotation)
void scheduleResultReadTempMoves(MoveNode &resultMove, MoveNode &resultRead, int lastUse)
Terminal & destination() const
NodeSet scheduledMoves() const
virtual int numberOfInputs() const
std::string toString() const
void switchInputs(int idx1=1, int idx2=2)
void setGuard(MoveGuard *guard)
std::string toString() const
bool isSourceConstant() const
void unscheduleResultReadTempMoves(MoveNode &resultMove)
BasicBlockScheduler(InterPassData &data, SoftwareBypasser *bypasser=NULL, RegisterRenamer *renamer=NULL)
virtual std::string longDescription() const
virtual void notifyScheduled(MoveNode &node)=0
virtual BaseFUPort * port(const std::string &name) const
static int verboseLevel()
LLVMTCECmdLineOptions * options_
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
static std::ostream & logStream()
virtual unsigned initiationInterval() const
virtual bool isTriggering() const
virtual TCEString name() const
DependenceType dependenceType() const
virtual void unassign(MoveNode &node) override
virtual bool dumpDDGsDot() const
static MoveNode * findTriggerFromUnit(const ProgramOperation &po, const TTAMachine::Unit &unit)
static std::string toString(const T &source)
virtual int handleLoopDDG(DataDependenceGraph &ddg, SimpleResourceManager &rm, const TTAMachine::Machine &targetMachine, int tripCount, SimpleResourceManager *prologRM, bool testOnly=false) override
MoveNode * triggeringMove() const
void scheduleMove(MoveNode &move, int earliestCycle, bool allowPredicationAndRenaming)
int minCycle_
The earliest cycle to schedule moves in. Used to leave room for sched_yield() by the sched_yield() em...
int scheduleOperandWrites(int &cycle, MoveNodeGroup &moves)
NodeSet guardDefMoves(const MoveNode &moveNode)
virtual int bypassNode(MoveNode &moveNode, int &lastOperandCycle, DataDependenceGraph &ddg, ResourceManager &rm)=0
virtual void removeBypass(MoveNodeGroup &candidates, DataDependenceGraph &ddg, ResourceManager &rm)=0
virtual void setCycleGrouping(bool flag)
virtual bool canSwap(int id1, int id2) const
static MoveNode * findTrigger(const ProgramOperation &po, const TTAMachine::Machine &mach)
void scheduleRRMove(MoveNode &moveNode)
const TTAMachine::Machine * targetMachine_
The target machine we are scheduling the program against.
ProgramOperation & sourceOperation() const
#define assert(condition)
virtual FUPort * port(int operand) const
virtual std::string shortDescription() const
void writeToXMLFile(std::string fileName) const
void ddgSnapshot(DataDependenceGraph &ddg, const std::string &name, DataDependenceGraph::DumpFileFormat format, bool final, bool resetCounter=false) const
int earliestResultReadCycle() const
virtual ControlUnit * controlUnit() const
virtual int operationIndex() const
int io(const FUPort &port) const
#define abortWithError(message)
bool isControlFlowMove() const
virtual void printStats() const
std::set< DataDependenceEdge *, typename DataDependenceEdge ::Comparator > EdgeSet
AddedRegisterCopies addRegisterCopiesToRRMove(MoveNode &moveNode, DataDependenceGraph *ddg)
void initialize(DataDependenceGraph &ddg)
void handleRemovedResultMoves(std::set< std::pair< TTAProgram::Move *, int > > removedMoves)
MoveGuard & guard() const
static CmdLineOptions * cmdLineOptions()
virtual FunctionUnitNavigator functionUnitNavigator() const
void operandsScheduled(AddedRegisterCopies &copies, DataDependenceGraph &ddg)
bool renameSourceRegister(MoveNode &node, bool loopScheduling, bool allowSameRf, bool differentRfOnlyDirectlyReachable, int latestCycle=INT_MAX)
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 bool isGPR() const
std::string errorMessageStack(bool messagesOnly=false) const
virtual MoveNodeGroup candidates()
bool isSourceOperation() const
void copyIncomingGuardEdges(const MoveNode &src, MoveNode &dst)
void unscheduleInputOperandTempMoves(MoveNode &operandMove)
void scheduleRRTempMoves(MoveNode ®ToRegMove, MoveNode &firstMove, int lastUse)
void unscheduleAllNodes()
virtual int bypass(MoveNodeGroup &candidates, DataDependenceGraph &ddg, ResourceManager &rm, bool bypassTrigger)=0
virtual bool hasOperation(const std::string &name) const
virtual int handleDDG(DataDependenceGraph &ddg, SimpleResourceManager &rm, const TTAMachine::Machine &targetMachine, int minCycle=0, bool testOnly=false) override
virtual int removeDeadResults(MoveNodeGroup &candidates, DataDependenceGraph &ddg, ResourceManager &rm, std::set< std::pair< TTAProgram::Move *, int > > &removedMoves)=0
void scheduleInputOperandTempMoves(MoveNode &operandMove, MoveNode &operandWrite)
int inputMoveCount() const
virtual bool dumpDDGsXML() const
virtual int portCount() const
bool hasAnnotations(ProgramAnnotation::Id id=ProgramAnnotation::ANN_UNDEF_ID) const
std::string toString() const
virtual EdgeSet inEdges(const Node &node) const
virtual void writeToDotFile(const TCEString &fileName) const
RegisterRenamer * renamer_
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
NodeSet movesAtCycle(int cycle) const
void addNode(MoveNode &node)
unsigned int unsignedValue() const
SimpleResourceManager * rm_
Resource Manager of the currently scheduled BB.
ProgramOperation & destinationOperation(unsigned int index=0) const
TTAProgram::Move & move()
InterPassData & interPassData()
@ ANN_STACKFRAME_PROCEDURE_RETURN
precedure return jmp
void resultsScheduled(AddedRegisterCopies &copies, DataDependenceGraph &ddg)
int getTriggerOperand(const Operation &operation, const TTAMachine::Machine &machine)
void addMoveNode(MoveNode &)
virtual bool canTransportImmediate(const MoveNode &node, const TTAMachine::Bus *preAssignedBus=NULL) const
bool exclusingGuards(const MoveNode &mn1, const MoveNode &mn2) const
bool renameDestinationRegister(MoveNode &node, bool loopScheduling, bool allowSameRf, bool differentRfOnlyDirectlyReachable, int earliestCycle=-1)
SoftwareBypasser * softwareBypasser_
The software bypasser to use to bypass registers when possible.
void setSelector(MoveNodeSelector *selector)
void copyOutgoingGuardWarEdges(const MoveNode &src, MoveNode &dst)
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
DataDependenceGraph * criticalPathGraph()
std::map< const MoveNode *, DataDependenceGraph::NodeSet > scheduledTempMoves_
Stores the MoveNodes that were scheduled as temp moves during scheduling of the operand move.
bool isOperationMove() const
MoveNodeSet & inputNode(int in) const
bool scheduleResultReads(MoveNodeGroup &moves)
virtual bool equals(const Terminal &other) const =0
Terminal & source() const
bool tryToSwitchInputs(ProgramOperation &op)
@ ANN_CONNECTIVITY_MOVE
A reg to reg move that was added because of missing connectivity between the original target and dest...
ComponentType * item(int index) const
virtual HWOperation * operation(const std::string &name) const
bool tryToOptimizeWaw(const MoveNode &moveNode)
void removeOutgoingGuardWarEdges(MoveNode &node)
void removeAnnotations(ProgramAnnotation::Id id=ProgramAnnotation::ANN_UNDEF_ID)
static TTAProgram::MoveGuard * createInverseGuard(const TTAProgram::MoveGuard &mg, const TTAMachine::Bus *bus=NULL)
virtual void clearCaches(DataDependenceGraph &ddg, bool removeDeadResults)=0
void tryToDelayOperands(MoveNodeGroup &moves)
virtual bool isRA() const
virtual const TCEString & name() const
EdgeSet copyDepsOver(MoveNode &node, bool anti, bool raw)
NodeSet unscheduledMoves() const
virtual NodeSet successors(const Node &node, bool ignoreBackEdges=false, bool ignoreForwardEdges=false) const
virtual int affectsCount() const
EdgeReason edgeReason() const
void notifyScheduled(MoveNodeGroup &moves, MoveNodeSelector &selector)
void setSource(Terminal *src)
MoveNode & inputMove(int index) const
void scheduleOperation(MoveNodeGroup &moves)
DataDependenceGraph * ddg_
boost::timer schedulingTime_
Time for getting the scheduling time for current basic block.
virtual TTAProgram::Instruction * instruction(int cycle) const override
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
AddedRegisterCopies addMinimumRegisterCopies(ProgramOperation &programOperation, const TTAMachine::Machine &targetMachine, DataDependenceGraph *ddg)