diff options
author | Quentin Colombet <qcolombet@apple.com> | 2013-10-02 23:11:47 +0000 |
---|---|---|
committer | Quentin Colombet <qcolombet@apple.com> | 2013-10-02 23:11:47 +0000 |
commit | c366504546a95d34255e45fa340cd8563158e720 (patch) | |
tree | 2330dbc3e87e69ef850a07507c2952afb5f573ce /llvm/lib/MC/MCDisassembler/Disassembler.cpp | |
parent | 8c45e283f2e92fdf6a45b5fe75ebcb351675c5ef (diff) | |
download | bcm5719-llvm-c366504546a95d34255e45fa340cd8563158e720.tar.gz bcm5719-llvm-c366504546a95d34255e45fa340cd8563158e720.zip |
[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>.
llvm-svn: 191864
Diffstat (limited to 'llvm/lib/MC/MCDisassembler/Disassembler.cpp')
-rw-r--r-- | llvm/lib/MC/MCDisassembler/Disassembler.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCDisassembler/Disassembler.cpp b/llvm/lib/MC/MCDisassembler/Disassembler.cpp index 406ee5b7db9..115af8d45b7 100644 --- a/llvm/lib/MC/MCDisassembler/Disassembler.cpp +++ b/llvm/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. |