aboutsummaryrefslogtreecommitdiffstats
path: root/lib/MC
diff options
context:
space:
mode:
authorQuentin Colombet <qcolombet@apple.com>2013-10-02 23:11:47 +0000
committerQuentin Colombet <qcolombet@apple.com>2013-10-02 23:11:47 +0000
commit4897e263906aa3c88e0a135f18ea9bd2af2676e5 (patch)
treed6456a20e571f823096b9c4bf5664419f8c811c1 /lib/MC
parent407847f130885dd9e26e908f033f697c0975aeae (diff)
downloadexternal_llvm-4897e263906aa3c88e0a135f18ea9bd2af2676e5.zip
external_llvm-4897e263906aa3c88e0a135f18ea9bd2af2676e5.tar.gz
external_llvm-4897e263906aa3c88e0a135f18ea9bd2af2676e5.tar.bz2
[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>. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191864 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC')
-rw-r--r--lib/MC/MCDisassembler/Disassembler.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/MC/MCDisassembler/Disassembler.cpp b/lib/MC/MCDisassembler/Disassembler.cpp
index 406ee5b..115af8d 100644
--- a/lib/MC/MCDisassembler/Disassembler.cpp
+++ b/lib/MC/MCDisassembler/Disassembler.cpp
@@ -191,7 +191,9 @@ static int getLatency(LLVMDisasmContext *DC, const MCInst &Inst) {
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.