misched: Release only unscheduled nodes into ReadyQ.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156573 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Andrew Trick 2012-05-10 21:06:14 +00:00
parent d38f87eeec
commit 16716c7302

View File

@ -643,6 +643,10 @@ struct ReadyQ {
bool empty() const { return Queue.empty(); }
iterator begin() { return Queue.begin(); }
iterator end() { return Queue.end(); }
iterator find(SUnit *SU) {
return std::find(Queue.begin(), Queue.end(), SU);
}
@ -705,10 +709,12 @@ public:
}
virtual void releaseTopNode(SUnit *SU) {
TopQueue.push(SU);
if (!SU->isScheduled)
TopQueue.push(SU);
}
virtual void releaseBottomNode(SUnit *SU) {
BotQueue.push(SU);
if (!SU->isScheduled)
BotQueue.push(SU);
}
};
} // namespace