diff options
author | David Goodwin <david_goodwin@apple.com> | 2009-11-03 20:57:50 +0000 |
---|---|---|
committer | David Goodwin <david_goodwin@apple.com> | 2009-11-03 20:57:50 +0000 |
commit | 4de099d8ca651e00fa5fac22bace4f4dba2d0292 (patch) | |
tree | 0a1c30be2310b064e895f5c841350c72773580a9 /lib/CodeGen/LatencyPriorityQueue.cpp | |
parent | abf67ef548c257526d2f5f71521ddc8420784ac1 (diff) | |
download | external_llvm-4de099d8ca651e00fa5fac22bace4f4dba2d0292.zip external_llvm-4de099d8ca651e00fa5fac22bace4f4dba2d0292.tar.gz external_llvm-4de099d8ca651e00fa5fac22bace4f4dba2d0292.tar.bz2 |
Do a scheduling pass ignoring anti-dependencies to identify candidate registers that should be renamed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85939 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LatencyPriorityQueue.cpp')
-rw-r--r-- | lib/CodeGen/LatencyPriorityQueue.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/CodeGen/LatencyPriorityQueue.cpp b/lib/CodeGen/LatencyPriorityQueue.cpp index 2e7b89c..794ecf7 100644 --- a/lib/CodeGen/LatencyPriorityQueue.cpp +++ b/lib/CodeGen/LatencyPriorityQueue.cpp @@ -55,6 +55,7 @@ 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; SUnit &Pred = *I->getSUnit(); if (!Pred.isScheduled) { // We found an available, but not scheduled, predecessor. If it's the @@ -73,9 +74,11 @@ void LatencyPriorityQueue::push_impl(SUnit *SU) { // this node is the sole unscheduled node for. unsigned NumNodesBlocking = 0; for (SUnit::const_succ_iterator I = SU->Succs.begin(), E = SU->Succs.end(); - I != E; ++I) + I != E; ++I) { + if (IgnoreAntiDep && (I->getKind() == SDep::Anti)) continue; if (getSingleUnscheduledPred(I->getSUnit()) == SU) ++NumNodesBlocking; + } NumNodesSolelyBlocking[SU->NodeNum] = NumNodesBlocking; Queue.push(SU); @@ -88,8 +91,10 @@ void LatencyPriorityQueue::push_impl(SUnit *SU) { // the node available. void LatencyPriorityQueue::ScheduledNode(SUnit *SU) { for (SUnit::const_succ_iterator I = SU->Succs.begin(), E = SU->Succs.end(); - I != E; ++I) + I != E; ++I) { + if (IgnoreAntiDep && (I->getKind() == SDep::Anti)) continue; AdjustPriorityOfUnscheduledPreds(I->getSUnit()); + } } /// AdjustPriorityOfUnscheduledPreds - One of the predecessors of SU was just |