[llvm] r191864 - [llvm-c][Disassembler] When printing latency information, skip scheduling
Quentin Colombet
qcolombet at apple.com
Wed Oct 2 16:11:47 PDT 2013
Author: qcolombet
Date: Wed Oct 2 18:11:47 2013
New Revision: 191864
URL: http://llvm.org/viewvc/llvm-project?rev=191864&view=rev
Log:
[llvm-c][Disassembler] When printing latency information, skip scheduling
classes that are marked as Variant as those require an MI to pass to
SubTargetInfo::resolveSchedClass.
This is part of <rdar://problem/14687488>.
Modified:
llvm/trunk/lib/MC/MCDisassembler/Disassembler.cpp
Modified: llvm/trunk/lib/MC/MCDisassembler/Disassembler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDisassembler/Disassembler.cpp?rev=191864&r1=191863&r2=191864&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCDisassembler/Disassembler.cpp (original)
+++ llvm/trunk/lib/MC/MCDisassembler/Disassembler.cpp Wed Oct 2 18:11:47 2013
@@ -191,7 +191,9 @@ static int getLatency(LLVMDisasmContext
const MCInstrDesc& Desc = DC->getInstrInfo()->get(Inst.getOpcode());
unsigned SCClass = Desc.getSchedClass();
const MCSchedClassDesc *SCDesc = SCModel->getSchedClassDesc(SCClass);
- if (!SCDesc || !SCDesc->isValid())
+ // Resolving the variant SchedClass requires an MI to pass to
+ // SubTargetInfo::resolveSchedClass.
+ if (!SCDesc || !SCDesc->isValid() || SCDesc->isVariant())
return NoInformationAvailable;
// Compute output latency.
More information about the llvm-commits
mailing list