diff options
author | Dan Gohman <gohman@apple.com> | 2008-11-21 01:44:51 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-11-21 01:44:51 +0000 |
commit | d1f33e23971a7973dc33105d42d7a9a69c950e19 (patch) | |
tree | 34cbb35d412c2c6cd6cad9a5376b9a32f1aeff88 /llvm/lib/CodeGen | |
parent | 63be531e099ea4e3ab1e0db60dcdfe55fb83c3fb (diff) | |
download | bcm5719-llvm-d1f33e23971a7973dc33105d42d7a9a69c950e19.tar.gz bcm5719-llvm-d1f33e23971a7973dc33105d42d7a9a69c950e19.zip |
Use ComputeLatency in the MachineInstr scheduler.
llvm-svn: 59777
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/ScheduleDAGInstrs.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp b/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp index 06d8ed9b25d..ec8fc66a3ee 100644 --- a/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp +++ b/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp @@ -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); } } diff --git a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp index 91a8294e1d4..aef23c5d49b 100644 --- a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp @@ -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); } |