[llvm] r316927 - [MC] Split out register def/use idx calls to make debugging simpler. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 30 10:24:40 PDT 2017
Author: rksimon
Date: Mon Oct 30 10:24:40 2017
New Revision: 316927
URL: http://llvm.org/viewvc/llvm-project?rev=316927&view=rev
Log:
[MC] Split out register def/use idx calls to make debugging simpler. NFCI.
Modified:
llvm/trunk/lib/CodeGen/MachineCombiner.cpp
Modified: llvm/trunk/lib/CodeGen/MachineCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineCombiner.cpp?rev=316927&r1=316926&r2=316927&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineCombiner.cpp Mon Oct 30 10:24:40 2017
@@ -161,9 +161,10 @@ MachineCombiner::getDepth(SmallVectorImp
assert(DefInstr &&
"There must be a definition for a new virtual register");
DepthOp = InstrDepth[II->second];
- LatencyOp = TSchedModel.computeOperandLatency(
- DefInstr, DefInstr->findRegisterDefOperandIdx(MO.getReg()),
- InstrPtr, InstrPtr->findRegisterUseOperandIdx(MO.getReg()));
+ int DefIdx = DefInstr->findRegisterDefOperandIdx(MO.getReg());
+ int UseIdx = InstrPtr->findRegisterUseOperandIdx(MO.getReg());
+ LatencyOp = TSchedModel.computeOperandLatency(DefInstr, DefIdx,
+ InstrPtr, UseIdx);
} else {
MachineInstr *DefInstr = getOperandDef(MO);
if (DefInstr) {
More information about the llvm-commits
mailing list