Use ComputeLatency in the MachineInstr scheduler.
authorDan Gohman <gohman@apple.com>
Fri, 21 Nov 2008 01:44:51 +0000 (01:44 +0000)
committerDan Gohman <gohman@apple.com>
Fri, 21 Nov 2008 01:44:51 +0000 (01:44 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59777 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/ScheduleDAGInstrs.cpp
lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp

index 06d8ed9b25d0a89330dffd1c3b7f9cc7e0ce055b..ec8fc66a3ee4a776ae1a2705cbaccdf4ee47decf 100644 (file)
@@ -99,6 +99,9 @@ void ScheduleDAGInstrs::BuildSchedUnits() {
       Terminator->addPred(SU, /*isCtrl=*/false, /*isSpecial=*/false);
     if (MI->getDesc().isTerminator() || MI->isLabel())
       Terminator = SU;
+
+    // Assign the Latency field of SU using target-provided information.
+    ComputeLatency(SU);
   }
 }
 
index 91a8294e1d45a383f035123df372e42b05c20c29..aef23c5d49bb2e84c78411490d4d11c2522f7696 100644 (file)
@@ -132,6 +132,7 @@ void ScheduleDAGSDNodes::BuildSchedUnits() {
     assert(N->getNodeId() == -1 && "Node already inserted!");
     N->setNodeId(NodeSUnit->NodeNum);
 
+    // Assign the Latency field of NodeSUnit using target-provided information.
     ComputeLatency(NodeSUnit);
   }