summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineCombiner.cpp
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2015-08-05 07:45:28 +0000
committerHal Finkel <hfinkel@anl.gov>2015-08-05 07:45:28 +0000
commit17caf326e5dbf5f4aa320948f8a195d7465eeab0 (patch)
treecd71dc4b7f1575feb11566228a94ab376d6cdfb6 /llvm/lib/CodeGen/MachineCombiner.cpp
parentccd53feee28e1da37a40a25f1638fd0af595f0dc (diff)
downloadbcm5719-llvm-17caf326e5dbf5f4aa320948f8a195d7465eeab0.tar.gz
bcm5719-llvm-17caf326e5dbf5f4aa320948f8a195d7465eeab0.zip
[MachineCombiner] Don't use the opcode-only form of computeInstrLatency
In r242277, I updated the MachineCombiner to work with itineraries, but I missed a call that is scheduling-model-only (the opcode-only form of computeInstrLatency). Using the form that takes an MI* allows this to work with itineraries (and should be NFC for subtargets with scheduling models). llvm-svn: 244020
Diffstat (limited to 'llvm/lib/CodeGen/MachineCombiner.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineCombiner.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineCombiner.cpp b/llvm/lib/CodeGen/MachineCombiner.cpp
index b5b5ac027eb..aab436f4a5a 100644
--- a/llvm/lib/CodeGen/MachineCombiner.cpp
+++ b/llvm/lib/CodeGen/MachineCombiner.cpp
@@ -204,7 +204,7 @@ unsigned MachineCombiner::getLatency(MachineInstr *Root, MachineInstr *NewRoot,
NewRoot, NewRoot->findRegisterDefOperandIdx(MO.getReg()), UseMO,
UseMO->findRegisterUseOperandIdx(MO.getReg()));
} else {
- LatencyOp = TSchedModel.computeInstrLatency(NewRoot->getOpcode());
+ LatencyOp = TSchedModel.computeInstrLatency(NewRoot);
}
NewRootLatency = std::max(NewRootLatency, LatencyOp);
}
OpenPOWER on IntegriCloud