mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-10-20 09:24:58 +00:00
Chain operands aren't real uses: they don't require the full latency of the
predecessor to finish before they can start. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26717 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
53fbf2a8e8
commit
b2215030d6
@ -387,8 +387,6 @@ void ScheduleDAGList::dumpSchedule() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Schedule - Schedule the DAG using list scheduling.
|
/// Schedule - Schedule the DAG using list scheduling.
|
||||||
/// FIXME: Right now it only supports the burr (bottom up register reducing)
|
|
||||||
/// heuristic.
|
|
||||||
void ScheduleDAGList::Schedule() {
|
void ScheduleDAGList::Schedule() {
|
||||||
DEBUG(std::cerr << "********** List Scheduling **********\n");
|
DEBUG(std::cerr << "********** List Scheduling **********\n");
|
||||||
|
|
||||||
@ -552,8 +550,16 @@ void ScheduleDAGList::ReleaseSucc(SUnit *SuccSU, bool isChain) {
|
|||||||
unsigned AvailableCycle = 0;
|
unsigned AvailableCycle = 0;
|
||||||
for (std::set<std::pair<SUnit*, bool> >::iterator I = SuccSU->Preds.begin(),
|
for (std::set<std::pair<SUnit*, bool> >::iterator I = SuccSU->Preds.begin(),
|
||||||
E = SuccSU->Preds.end(); I != E; ++I) {
|
E = SuccSU->Preds.end(); I != E; ++I) {
|
||||||
AvailableCycle = std::max(AvailableCycle,
|
// If this is a token edge, we don't need to wait for the full latency of
|
||||||
I->first->Cycle + I->first->Latency);
|
// the preceeding instruction (e.g. a long-latency load) unless there is
|
||||||
|
// also some other data dependence.
|
||||||
|
unsigned PredDoneCycle = I->first->Cycle;
|
||||||
|
if (!I->second)
|
||||||
|
PredDoneCycle += I->first->Latency;
|
||||||
|
else
|
||||||
|
PredDoneCycle += 1;
|
||||||
|
|
||||||
|
AvailableCycle = std::max(AvailableCycle, PredDoneCycle);
|
||||||
}
|
}
|
||||||
|
|
||||||
PendingQueue.push_back(std::make_pair(AvailableCycle, SuccSU));
|
PendingQueue.push_back(std::make_pair(AvailableCycle, SuccSU));
|
||||||
|
Loading…
Reference in New Issue
Block a user