mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-20 16:17:38 +00:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user