diff options
| author | David Goodwin <david_goodwin@apple.com> | 2009-11-12 19:08:21 +0000 |
|---|---|---|
| committer | David Goodwin <david_goodwin@apple.com> | 2009-11-12 19:08:21 +0000 |
| commit | da83f7d58b1bfcadb92a5955ae1b7a2c6b6933fe (patch) | |
| tree | 57ee0801ec6bd97795ea41ca2642921c05a879b8 /llvm/lib/CodeGen/LatencyPriorityQueue.cpp | |
| parent | 2904aa9f6e7d04bb135c62be16ffafebe85d4205 (diff) | |
| download | bcm5719-llvm-da83f7d58b1bfcadb92a5955ae1b7a2c6b6933fe.tar.gz bcm5719-llvm-da83f7d58b1bfcadb92a5955ae1b7a2c6b6933fe.zip | |
Rename registers to break output dependencies in addition to anti-dependencies.
llvm-svn: 87015
Diffstat (limited to 'llvm/lib/CodeGen/LatencyPriorityQueue.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/LatencyPriorityQueue.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/LatencyPriorityQueue.cpp b/llvm/lib/CodeGen/LatencyPriorityQueue.cpp index 794ecf7bd19..23dce4a91a1 100644 --- a/llvm/lib/CodeGen/LatencyPriorityQueue.cpp +++ b/llvm/lib/CodeGen/LatencyPriorityQueue.cpp @@ -55,7 +55,10 @@ SUnit *LatencyPriorityQueue::getSingleUnscheduledPred(SUnit *SU) { SUnit *OnlyAvailablePred = 0; for (SUnit::const_pred_iterator I = SU->Preds.begin(), E = SU->Preds.end(); I != E; ++I) { - if (IgnoreAntiDep && (I->getKind() == SDep::Anti)) continue; + if (IgnoreAntiDep && + ((I->getKind() == SDep::Anti) || (I->getKind() == SDep::Output))) + continue; + SUnit &Pred = *I->getSUnit(); if (!Pred.isScheduled) { // We found an available, but not scheduled, predecessor. If it's the @@ -75,7 +78,10 @@ void LatencyPriorityQueue::push_impl(SUnit *SU) { unsigned NumNodesBlocking = 0; for (SUnit::const_succ_iterator I = SU->Succs.begin(), E = SU->Succs.end(); I != E; ++I) { - if (IgnoreAntiDep && (I->getKind() == SDep::Anti)) continue; + if (IgnoreAntiDep && + ((I->getKind() == SDep::Anti) || (I->getKind() == SDep::Output))) + continue; + if (getSingleUnscheduledPred(I->getSUnit()) == SU) ++NumNodesBlocking; } @@ -92,7 +98,10 @@ void LatencyPriorityQueue::push_impl(SUnit *SU) { void LatencyPriorityQueue::ScheduledNode(SUnit *SU) { for (SUnit::const_succ_iterator I = SU->Succs.begin(), E = SU->Succs.end(); I != E; ++I) { - if (IgnoreAntiDep && (I->getKind() == SDep::Anti)) continue; + if (IgnoreAntiDep && + ((I->getKind() == SDep::Anti) || (I->getKind() == SDep::Output))) + continue; + AdjustPriorityOfUnscheduledPreds(I->getSUnit()); } } |

