Go to the documentation of this file.
80 #ifdef DEBUG_BUBBLEFISH_SCHEDULER
81 #define DEBUG_PRE_SHARE
89 #define REMOVE_LOOP_CHECKS_WITH_LOOPBUFFER
90 #define ENABLE_PRE_LOOP_SHARING
94 DDGPass(ipd), ddg_(NULL), prologDDG_(nullptr), rm_(NULL),
95 prologRM_(nullptr), latestCycle_(INT_MAX/1024),
97 killDeadResults_(true),
111 DDGPass(ipd), ddg_(NULL), rm_(NULL),
112 latestCycle_(INT_MAX/1024),
114 killDeadResults_(killDeadResults),
129 #ifdef DEBUG_BUBBLEFISH_SCHEDULER
130 std::cerr <<
"\t\tFound scheduled input: "
131 << inputNode.
toString() << std::endl;
160 #ifdef DEBUG_BUBBLEFISH_SCHEDULER
161 std::cerr << std::endl <<
"Handling new ddg: " <<
ddg.
name() << std::endl;
180 (boost::format(
"bb_%s_before_scheduling.dot") %
187 for (
int i = 0; i < moves.
nodeCount(); i++) {
204 #ifdef DEBUG_BUBBLEFISH_SCHEDULER
205 std::cerr <<
"Scheduling of front failed! Inducing move: "
209 (boost::format(
"%s_failed_ddg.dot") %
212 "Bubblefish scheduler failed"
213 "retry count exceeded. Propably broken ADF");
215 #ifdef DEBUG_BUBBLEFISH_SCHEDULER
216 std::cerr <<
"Whole op scheduled ok? original MN: "
224 (boost::format(
"%s_unscheduled_nodes_in_ddg.dot") %
227 assert(
false &&
"unscheduled nodes in ddg after scheduler");
232 (boost::format(
"bb_%s_after_scheduler_ddg.dot") %
238 (boost::format(
"bb_%s_after_scheduler_ddg.dot") %
253 #ifdef DEBUG_BUBBLEFISH_SCHEDULER
254 std::cerr <<
"Handled ddg: " <<
ddg_->
name() << std::endl;
258 #ifdef DEBUG_BUBBLEFISH_SCHEDULER
276 if (allowPreLoopOpshare) {
295 for (
int i = 0; i < moves.
nodeCount(); i++) {
312 #ifndef DEBUG_BUBBLEFISH_SCHEDULER
317 std::string(
"ii_fail_") +
321 std::string(
"ops_") +
323 std::string(
"_dag.dot"));
326 std::string(
"ii_fail_") +
330 std::string(
"ops_") +
332 std::string(
"_dag.dot"));
334 #ifndef DEBUG_BUBBLEFISH_SCHEDULER
337 #ifdef DEBUG_BUBBLEFISH_SCHEDULER
338 std::cerr << std::endl << std::endl
339 <<
"Unscheduling all due scheduling failed at around: "
340 << mn->
toString() << std::endl << std::endl;
353 #ifdef DEBUG_BUBBLEFISH_SCHEDULER
354 std::cerr <<
"Whole op scheduled ok? original MN: "
363 #ifdef DEBUG_BUBBLEFISH_SCHEDULER
364 std::cerr <<
"Scheduling pre-loop opshares fail, undoing all"
374 std::cerr <<
"Scheduling pre-loop operand shares failed."
386 if ((*postBypass)()) {
394 #ifdef DEBUG_BUBBLEFISH_SCHEDULER
395 std::cerr <<
"inner handleLoopDDG exiting, overlapcount: "
396 << overlapCount << std::endl;
406 #ifndef DEBUG_BUBBLEFISH_SCHEDULER
410 std::string(
"ii_begin_") +
412 std::string(
"_dag.dot"));
413 #ifndef DEBUG_BUBBLEFISH_SCHEDULER
419 #ifdef ENABLE_DOT_SPAM
421 std::string(
"before_loop_ddg.dot"));
435 std::cerr << std::endl <<
"Handling new loop ddg: " <<
ddg.
name()
442 #ifdef DEBUG_BUBBLEFISH_SCHEDULER
443 std::cerr <<
"Duplicator not null in handleloopddg,"
444 " deleting duplicator" << std::endl;
458 #ifdef DEBUG_BUBBLEFISH_SCHEDULER
459 std::cerr <<
"jumpguard write node is: "
469 #ifdef DEBUG_BUBBLEFISH_SCHEDULER
470 std::cerr <<
"prolog RM not null, pre-allocating FUs:"
475 #ifndef DEBUG_BUBBLEFISH_SCHEDULER
479 (boost::format(
"bb_%s_ii_%d_before_scheduling.dot") %
481 #ifndef DEBUG_BUBBLEFISH_SCHEDULER
491 if (overlapCount == -1) {
493 std::cerr <<
"Loop Sched. fail with pre-loop opshare on with II: "
498 if (overlapCount == -1) {
500 std::cerr <<
"Loop Sched. fail without pre-loop opshare, II: "
509 std::cerr <<
"Loop Sched. ok without pre-loop opshare, II: "
517 (boost::format(
"%s_unscheduled_nodes_in_ddg.dot") %
520 assert(
false &&
"unscheduled nodes in ddg after scheduler");
527 <<
"No overlapping instructions, "
528 <<
"Should decrease II"
532 #ifdef DEBUG_BUBBLEFISH_SCHEDULER
533 std::cerr <<
"Unscheduling all due loop sched too slow or testonly"
537 #ifndef DEBUG_BUBBLEFISH_SCHEDULER
541 std::string(
"ii_test_or_slow_") +
543 std::string(
"_dag.dot"));
544 #ifndef DEBUG_BUBBLEFISH_SCHEDULER
550 #ifndef DEBUG_BUBBLEFISH_SCHEDULER
554 std::string(
"ii_unscheduled_slow") +
556 std::string(
"_dag.dot"));
557 #ifndef DEBUG_BUBBLEFISH_SCHEDULER
573 #ifndef DEBUG_BUBBLEFISH_SCHEDULER
577 std::string(
"ii_no_overlap") +
579 std::string(
"_dag.dot"));
580 #ifndef DEBUG_BUBBLEFISH_SCHEDULER
585 #ifndef DEBUG_BUBBLEFISH_SCHEDULER
589 std::string(
"ii_unscheduled_no_overlap") +
591 std::string(
"_dag.dot"));
592 #ifndef DEBUG_BUBBLEFISH_SCHEDULER
610 (boost::format(
"bb_%s_after_scheduling.dot") %
616 (boost::format(
"bb_%s_after_scheduling.dot") %
623 std::cerr <<
"Handled loop ddg: " <<
ddg_->
name() << std::endl;
626 #ifndef DEBUG_BUBBLEFISH_SCHEDULER
630 std::string(
"ii_ok_") +
632 std::string(
"iters_") +
634 std::string(
"_dag.dot"));
635 #ifndef DEBUG_BUBBLEFISH_SCHEDULER
643 if (m->isScheduled()) {
644 std::cerr <<
"cannot kill scheduled move: "
645 << m->toString() << std::endl;
652 std::cerr <<
"prolog MN: " << prologMN->
toString()
653 <<
"of MN: " << m->toString()
654 <<
" is scheduled!" << std::endl;
664 assert(!m->isScheduled());
677 #ifdef ENABLE_DOT_SPAM
685 dotName = namePrefix;
686 dotName <<
"_" << mn.
nodeID();
687 dotName <<
"_" << counter <<
".dot";
689 }
while (exists(dotName.c_str()));
690 std::cerr <<
"\t\t\t\t\tDumping ddg: " << dotName <<
" mn: "
708 std::cerr <<
"Cannot revert bb live range bookkeeping as "
709 <<
" dest not gpr: " << mn->
toString() << std::endl;
710 std::cerr <<
"This might be caused by broken connectivity in the ADF."
715 int index = dest.
index();
731 std::cerr <<
"Cannot revert bb live range bookkeeping as "
732 <<
" src not gpr: " << mn->
toString() << std::endl;
733 std::cerr <<
"This might be caused by broken connectivity in the ADF."
737 int index = src.
index();
752 LiveRangeData::MoveNodeUseMapSet::iterator s = mnuMap.find(reg);
753 if (s != mnuMap.end()) {
755 LiveRangeData::MoveNodeUseSet::iterator i =
757 if (i!= mnuSet.end()) {
785 #ifdef DEBUG_BUBBLEFISH_SCHEDULER
786 std::cerr <<
"unscheduling front @ " << bfo
787 <<
" in unschedule" << std::endl;
841 DataDependenceGraph::EdgeSet::iterator edgeIter = edges.begin();
845 while (edgeIter != edges.end()) {
856 if (bypassEdge == NULL) {
866 if (bypassEdge == NULL) {
871 if (!
rm().initiationInterval()) {
872 #ifdef DEBUG_BUBBLEFISH_SCHEDULER
873 std::cerr <<
"\tbackedge without without loop sched!!"
874 <<
" not allowed." << std::endl;
877 #ifdef DEBUG_BUBBLEFISH_SCHEDULER
879 std::cerr <<
"\t\tback edge bypass ok in loop" << std::endl;
888 return "BubbleFish instruction Scheduler";
898 std::set<const TTAMachine::RegisterFile*, TTAMachine::MachinePart::Comparator>
900 const MoveNode& mn,
bool tempRegAfter,
907 std::map<int, int> rfDistanceFromSource;
908 std::map<int, int> rfDistanceFromDestination;
911 std::vector<std::pair<const TTAMachine::RegisterFile*, int> > >
914 std::string srDatumName =
"SCRATCH_REGISTERS";
916 (
dynamic_cast<TempRegData&
>(
918 TCEString msg(
"No scratch registers available for "
919 "temporary moves for move: ");
923 const TempRegData& tempRegs =
924 dynamic_cast<TempRegData&
>(
928 for (
unsigned int i = 0; i < tempRegs.size(); i++) {
929 rfDistanceFromSource[i] = INT_MAX;
930 rfDistanceFromDestination[i] = INT_MAX;
934 for (
unsigned int i = 0; i < tempRegs.size(); i++) {
942 if (rf == forbiddenRF) {
948 rfDistanceFromSource[i] = 1;
954 rfDistanceFromDestination[i] = 1;
963 bool modified =
true;
965 while (result.empty() && modified) {
966 int shortest = INT_MAX;
968 for (
unsigned int i = 0; i < tempRegs.size(); i++) {
969 int srcDist = rfDistanceFromSource[i];
970 if (srcDist != INT_MAX) {
972 for (
unsigned int j = 0; j < tempRegs.size(); j++) {
973 if (rfDistanceFromSource[j] > srcDist + 1) {
981 rfDistanceFromSource[j] = srcDist + 1;
983 if (rfDistanceFromDestination[j] == 1) {
984 int dist = srcDist + 2;
985 if (dist < shortest) {
989 if (dist == shortest) {
990 result.insert(rfDest);
1001 while (result.empty() && modified) {
1002 int shortest = INT_MAX;
1004 for (
unsigned int i = 0; i < tempRegs.size(); i++) {
1005 int dstDist = rfDistanceFromDestination[i];
1006 if (dstDist != INT_MAX) {
1008 for (
unsigned int j = 0; j < tempRegs.size(); j++) {
1009 if (rfDistanceFromDestination[j] > dstDist + 1) {
1016 rfDistanceFromDestination[j] = dstDist + 1;
1018 if (rfDistanceFromSource[j] == 1) {
1019 int dst = dstDist + 2;
1020 if (dst < shortest) {
1024 if (dst == shortest) {
1025 result.insert(rfSrc);
1057 for (
auto m: succ) {
1058 if (!m->isScheduled()) {
1060 #ifdef DEBUG_BUBBLEFISH_SCHEDULER
1061 std::cerr <<
"\t\t\tunsched succ: " << m->toString()
1101 int operandIndex,
MoveNode& trig) {
1103 if (i == operandIndex)
continue;
1104 if (op.
canSwap(i, operandIndex)) {
1106 if (inputNodeSet.
count() == 1) {
1109 inputNodeSet.
at(0));
1127 if (inputCount < 2) {
1136 for (
int i = 1; i <= inputCount; i++) {
1137 if (i != myIdx && op.
canSwap(myIdx, i)) {
1156 std::map<TCEString, int> invariantCounts;
1157 std::map<TCEString, int> variableCounts;
1162 static int iaCounter= 0;
1184 inputVal <<
"IADDR" << iaCounter++;
1195 if (
ddg().isLoopInvariant(inputNode)) {
1196 invariantCounts[inputVal]++;
1197 invariants_.insert(std::make_pair(inputVal, &inputNode));
1199 if (inputVal ==
"0") {
1200 std::cerr <<
"zero not loop invariant: "
1201 << inputNode.
toString() << std::endl;
1203 variableCounts[inputVal]++;
1209 for (
auto p: invariantCounts) {
1210 #ifdef DEBUG_PRE_SHARE
1211 std::cerr <<
"usage count of invariant value: " << p.first
1212 <<
" is " << p.second << std::endl;
1217 #ifdef DEBUG_PRE_SHARE
1219 std::cerr <<
"Invariant value: " << p.first <<
" used by mn: "
1220 << p.second->toString() <<
" of po: "
1221 << p.second->destinationOperation().toString() << std::endl;
1225 std::cerr <<
"Count: " << i->first <<
" for invariant value: "
1226 << i->second << std::endl;
1243 #ifdef DEBUG_PRE_SHARE
1244 std::cerr <<
"got invariant: " << i->second <<
" with usage count: "
1245 << i->first << std::endl;
1247 for (
auto it =
invariants_.lower_bound(i->second),
1248 end =
invariants_.upper_bound(i->second); it != end; ++it) {
1249 #ifdef DEBUG_PRE_SHARE
1250 std::cerr <<
"\tgot MN: " << it->second->toString() <<
" of PO: "
1251 << it->second->destinationOperation().toString()
1258 #ifdef DEBUG_PRE_SHARE
1259 std::cerr <<
"Operand bindings to ports: " << std::endl;
1263 if (p.second != NULL) {
1266 #ifdef DEBUG_PRE_SHARE
1269 std::cerr <<
"\tPort: " << fu->
name() <<
"." << fup->name() <<
1270 " move: " << p.second->toString() <<
" of PO: " <<
1274 #ifdef DEBUG_PRE_SHARE
1276 std::cerr <<
"\tPort: " << fu->
name() <<
"." << fup->name() <<
1277 " shared with multiple ops" << std::endl;
1285 #ifdef DEBUG_PRE_SHARE
1286 std::cerr <<
"Trying to preallocate for: " << po->toString()
1294 #ifdef DEBUG_PRE_SHARE
1295 std::cerr <<
"\t\tDid not find pre-shared, trying again.."
1311 #ifdef DEBUG_PRE_SHARE
1312 std::cerr <<
"\tNo free fu for op: " << op.
name() <<
1313 " have to revert earlier share" << std::endl;
1320 int shareOpCount = INT_MAX;
1321 for (
int j = 0; j < fuNav.
count(); j++) {
1332 std::map<TTAMachine::FUPort*, MoveNode*>::iterator i =
1336 #ifdef DEBUG_BUBBLEFISH_SCHEDULER
1337 std::cerr <<
"\t\t\tReserved port: " <<
1339 port->
name() <<
" has " << destOpCount <<
1340 " shared operations using it" << std::endl;
1342 if (destOpCount < shareOpCount) {
1344 shareOpCount = destOpCount;
1351 assert(bestPort != NULL);
1352 #ifdef DEBUG_PRE_SHARE
1353 std::cerr <<
"\t\tPass 3: UnReserved port: " <<
1355 bestPort->
name() <<
" because of " <<
1356 op.
name() << std::endl;
1366 bool onlySharedWithAnother) {
1372 bool fuFound =
false;
1375 for (
int j = 0; j < fuNav.
count(); j++) {
1382 po, op, hwop, onlySharedWithAnother);
1388 #ifdef DEBUG_PRE_SHARE
1389 std::cerr <<
"\t\tfu found but cannot share: " << fu.
name()
1409 bool hasLoopInvariant =
false;
1414 if (!
ddg().isLoopInvariant(inputNode)) {
1418 std::multimap<TTAMachine::FUPort*, MoveNode*>::iterator pi=
1427 hasLoopInvariant =
true;
1429 po, op, k, hwop, onlySharedWithAnother);
1432 #ifdef DEBUG_PRE_SHARE
1433 std::cerr <<
"Allocating port for pre-loop opshare: "
1449 return hasLoopInvariant ?
1458 bool onlySharedWithAnother) {
1460 MoveNodeSet& inputNodeSet = po->inputNode(operandIndex);
1466 int swappedOperandIndex = 0;
1468 swappedOperandIndex =
swapToUntrigger(po, op, operandIndex,inputNode);
1470 if (swappedOperandIndex) {
1471 port = hwop.
port(swappedOperandIndex);
1473 #ifdef DEBUG_BUBBLEFISH_SCHEDULER
1474 std::cerr <<
"\t\tswap failed" << std::endl;
1480 std::map<TTAMachine::FUPort*, MoveNode*>::iterator pi=
1485 if (onlySharedWithAnother) {
1486 if (swappedOperandIndex) {
1499 if (swappedOperandIndex) {
1512 if (swappedOperandIndex) {
1515 #ifdef DEBUG_PRE_SHARE
1516 std::cerr <<
"\t\t\tport used by another sharing, cannot use"
1526 const std::string& payload) {
1537 const std::string& payload) {
1547 #ifdef DEBUG_BUBBLEFISH_SCHEDULER
1548 std::cerr <<
"Reserving preallocated fus" << std::endl;
1558 if (inputNodes.
count() != 1) {
1568 if (preAllocatedFU) {
1569 std::string fuName = preAllocatedFU->
name();
1581 if (p.second == NULL) {
1589 std::string fuName= fu->
name();
const Operation & operation() const
virtual bool isFUPort() const
MoveNode * loopLimitNode()
void deletingNode(MoveNode *deletedNode)
TTAMachine::Unit * getDstUnit(MoveNode &mn)
@ ANN_REJECTED_UNIT_SRC
Src. unit rejected.
bool isDestinationVariable() const
void setBBN(BasicBlockNode &bbn)
virtual TCEString name() const
virtual int largestCycle() const override
int scheduledNodeCount() const
ProgramOperation & programOperation(int index)
std::string toString() const
MoveNode & node(int index) const
virtual int index() const
virtual bool isInstructionAddress() const
Node & node(const int index) const
FunctionUnit * parentUnit() const
std::set< const TTAMachine::RegisterFile *, TTAMachine::MachinePart::Comparator > possibleTempRegRFs(const MoveNode &mn, bool tempRegAfter, const TTAMachine::RegisterFile *forbiddenRF=nullptr)
bool hasUnscheduledSuccessors(MoveNode &mn) const
std::set< MoveNodeUse > MoveNodeUseSet
virtual const TTAMachine::RegisterFile & registerFile() const
BF2Scheduler(InterPassData &ipd, RegisterRenamer *renamer)
bool isDestinationOperation() const
static bool isDestinationUniversalReg(const MoveNode &mn)
std::set< MoveNode *, typename MoveNode ::Comparator > NodeSet
virtual int smallestCycle() const override
bool isUnconditional() const
virtual bool killDeadResults() const
const TTAMachine::Machine & targetMachine() const
void preAllocateFunctionUnits(ProgramOperationPtr po)
Terminal & destination() const
DataDependenceGraph & ddg()
MoveNodeUseMapSet regDefines_
virtual MoveNodeGroup candidates()
bool isDeadResult(MoveNode &mn) const
virtual int numberOfInputs() const
void setMachine(const TTAMachine::Machine &machine)
bool isSourceConstant() const
SimpleResourceManager * prologRM_
std::map< MoveNode *, MoveNode *, MoveNode::Comparator > MoveNodeMap
static int verboseLevel()
MoveNodeDuplicator * duplicator_
static std::ostream & logStream()
std::map< TCEString, MoveNodeUseSet > MoveNodeUseMapSet
void annotateAllInputs(ProgramOperation &po, TTAProgram::ProgramAnnotation::Id id, const std::string &payload)
virtual unsigned initiationInterval() const
virtual std::string shortDescription() const override
virtual bool isTriggering() const
virtual TCEString name() const
DependenceType dependenceType() const
virtual void dropNode(Node &node)
virtual bool dumpDDGsDot() const
static std::string toString(const T &source)
static PortSet findWritePorts(const TTAMachine::Unit &rf)
MoveNodeDuplicator & duplicator()
bool isTrigger(const TTAMachine::Unit &unit, MoveNode &mn)
void appendBypassSources(MoveNodeMap &map)
std::shared_ptr< ProgramOperation > ProgramOperationPtr
static void writeDotWithNameAndNodeID(DataDependenceGraph &ddg, const TCEString &namePrefix, const MoveNode &mn)
void allocateFunctionUnits()
virtual bool canSwap(int id1, int id2) const
static MoveNode * findTrigger(const ProgramOperation &po, const TTAMachine::Machine &mach)
Id
the ID in TPEF is 24 bits, here enum
TTAProgram::BasicBlock & basicBlock()
virtual bool isUniversalMachineRegister() const
DataDependenceEdge * findBypassEdge(const MoveNode &mn)
#define assert(condition)
void releasePortForOp(const Operation &op)
std::multimap< TTAMachine::FUPort *, MoveNode * > preSharedOperandPorts_
void countLoopInvariantValueUsages()
PreLoopOperandEnum state_
virtual FUPort * port(int operand) const
TTAMachine::FUPort * isPreLoopSharedOperand(MoveNode &mn) const
void writeToXMLFile(std::string fileName) const
@ ANN_REJECTED_UNIT_DST
Dst. unit rejected.
std::multimap< int, TCEString > invariantsOfCount_
@ ANN_CONN_CANDIDATE_UNIT_SRC
Src. unit candidate.
virtual int operationIndex() const
DataDependenceGraph::NodeSet removedMoves_
std::set< DataDependenceEdge *, typename DataDependenceEdge ::Comparator > EdgeSet
virtual void removeNode(Node &node)
const TTAMachine::Machine * targetMachine_
LiveRangeData * liveRangeData_
static bool isSourceUniversalReg(const MoveNode &mn)
void initialize(DataDependenceGraph &ddg)
void nodeAndCopyKilled(MoveNode &mn)
std::map< MoveNode *, TTAMachine::FUPort *, MoveNode::Comparator > preLoopSharedOperands_
MoveNode * jumpGuardWrite_
void unreservePreallocatedFUs()
MoveGuard & guard() const
static bool isConnected(const TTAMachine::Port &sourcePort, const TTAMachine::Port &destinationPort, const TTAMachine::Guard *guard=NULL)
LLVMTCECmdLineOptions * options_
static CmdLineOptions * cmdLineOptions()
TTAProgram::MoveGuard * jumpGuard()
MoveNodeUseMapSet regFirstDefines_
static int canSourceWriteToAnyDestinationPort(const MoveNode &src, PortSet &ports, bool ignoreGuard=false)
virtual FunctionUnitNavigator functionUnitNavigator() const
virtual int handleDDG(DataDependenceGraph &ddg, SimpleResourceManager &rm, const TTAMachine::Machine &targetMachine, int minCycle=0, bool testOnly=false)
DataDependenceGraph * prologDDG_
MoveNodeUseMapSet regLastUses_
BUMoveNodeSelector & selector()
bool mustBeTrigger(const MoveNode &mn, const ProgramOperation &po)
virtual bool isGPR() const
MoveNode * onlyGuardDefOfMove(MoveNode &moveNode)
virtual SimValue value() const
static PortSet findReadPorts(const TTAMachine::Unit &rf)
void reservePreallocatedFUs()
int programOperationCount() const
void deletingNode(MoveNode *deletedNode)
virtual bool hasOperation(const std::string &name) const
DataDependenceGraph::NodeSet dreRemovedMoves_
BUMoveNodeSelector * selector_
int inputMoveCount() const
bool hasNode(const Node &) const
virtual bool dumpDDGsXML() const
bool hasAnnotations(ProgramAnnotation::Id id=ProgramAnnotation::ANN_UNDEF_ID) const
SimpleResourceManager * rm_
virtual EdgeSet inEdges(const Node &node) const
virtual void writeToDotFile(const TCEString &fileName) const
int outputMoveCount() const
SimpleResourceManager * prologRM()
MoveNode * getMoveNode(MoveNode &mn)
bool isSourceVariable() const
ProgramOperation & destinationOperation(unsigned int index=0) const
static void clearPrologMoves()
void addAnnotation(const ProgramAnnotation &annotation)
TTAProgram::Move & move()
BoostGraph * parentGraph()
InterPassData & interPassData()
std::string toString() const
SimpleResourceManager & rm()
BF2ScheduleFront * currentFront_
void setMaxCycle(unsigned int maxCycle)
void nodeResurrected(MoveNode &mn)
RegisterRenamer * renamer_
void setDDG(const DataDependenceGraph *ddg)
virtual std::string name() const
int scheduleFrontFromMove(MoveNode &mn)
std::list< ProgramOperation * > loopBufOps_
void setSelector(MoveNodeSelector *selector)
void revertBBLiveRangeBookkeepingForSource(MoveNode *mn)
MoveNodeSet & inputNode(int in) const
std::multimap< TCEString, MoveNode * > invariants_
std::vector< BFOptimization * > scheduledStack_
virtual bool equals(const Terminal &other) const =0
int swapToUntrigger(ProgramOperationPtr po, const Operation &op, int operandIndex, MoveNode &trig)
Terminal & source() const
void annotateAllOutputs(ProgramOperation &po, TTAProgram::ProgramAnnotation::Id id, const std::string &payload)
void nodeKilled(MoveNode &mn)
virtual const TTAMachine::Port & port() const
ComponentType * item(int index) const
static TCEString registerName(const TTAMachine::RegisterFile &rf, int index, char delim='.')
virtual HWOperation * operation(const std::string &name) const
const TTAMachine::Guard & guard() const
void removeAnnotations(ProgramAnnotation::Id id=ProgramAnnotation::ANN_UNDEF_ID)
static bool canAnyPortWriteToDestination(PortSet &ports, const MoveNode &dest)
InterPassDatum & datum(const std::string &key)
MoveNodeMap bypassNodes()
void eraseFromMoveNodeUseSet(LiveRangeData::MoveNodeUseMapSet &mnuMap, const TCEString ®, MoveNode *mn)
virtual const TCEString & name() const
virtual int handleLoopDDG(DataDependenceGraph &, SimpleResourceManager &, const TTAMachine::Machine &, int tripCount, SimpleResourceManager *, bool testOnly) override
MoveNode & outputMove(int index) const
virtual void initializeReadylist()
Initializes ready list from nodes that are ready.
void revertBBLiveRangeBookkeepingForDestination(MoveNode *mn)
virtual NodeSet successors(const Node &node, bool ignoreBackEdges=false, bool ignoreForwardEdges=false) const
PreLoopShareInfo preAllocateFunctionUnitsInner(ProgramOperationPtr po, const Operation &op, bool onlySharedWithAnother)
const BasicBlockNode & getBasicBlockNode(const MoveNode &mn) const
std::set< const TTAMachine::Port *, const TTAMachine::MachinePart::Comparator > PortSet
EdgeReason edgeReason() const
MoveNodeUseMapSet regFirstUses_
DataDependenceGraph * ddg_
void scheduleDDG(DataDependenceGraph &ddg, SimpleResourceManager &rm, const TTAMachine::Machine &targetMachine)
MoveNode & inputMove(int index) const
@ ANN_CONN_CANDIDATE_UNIT_DST
Dst. unit candidate.
TTAMachine::FUPort * sharedPort_
Unit * parentUnit() const