[llvm-commits] [llvm] r59777 - in /llvm/trunk/lib/CodeGen: ScheduleDAGInstrs.cpp SelectionDAG/ScheduleDAGSDNodes.cpp

Dan Gohman gohman at apple.com
Thu Nov 20 17:44:52 PST 2008


Author: djg
Date: Thu Nov 20 19:44:51 2008
New Revision: 59777

URL: http://llvm.org/viewvc/llvm-project?rev=59777&view=rev
Log:
Use ComputeLatency in the MachineInstr scheduler.

Modified:
    llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.cpp
    llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp

Modified: llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.cpp?rev=59777&r1=59776&r2=59777&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.cpp (original)
+++ llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.cpp Thu Nov 20 19:44:51 2008
@@ -99,6 +99,9 @@
       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);
   }
 }
 

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp?rev=59777&r1=59776&r2=59777&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp Thu Nov 20 19:44:51 2008
@@ -132,6 +132,7 @@
     assert(N->getNodeId() == -1 && "Node already inserted!");
     N->setNodeId(NodeSUnit->NodeNum);
 
+    // Assign the Latency field of NodeSUnit using target-provided information.
     ComputeLatency(NodeSUnit);
   }
   





More information about the llvm-commits mailing list