From 7e7b6700743285c0af506ac6299ddf82ebd434b9 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Fri, 6 Jan 2017 20:13:21 +0000 Subject: Vendor import of llvm trunk r291274: https://llvm.org/svn/llvm-project/llvm/trunk@291274 --- lib/CodeGen/MIRPrinter.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/CodeGen/MIRPrinter.cpp') diff --git a/lib/CodeGen/MIRPrinter.cpp b/lib/CodeGen/MIRPrinter.cpp index eb13d2d3ec0c..db87092177ca 100644 --- a/lib/CodeGen/MIRPrinter.cpp +++ b/lib/CodeGen/MIRPrinter.cpp @@ -488,16 +488,16 @@ void MIPrinter::print(const MachineBasicBlock &MBB) { } // Print the live in registers. - const auto *TRI = MBB.getParent()->getSubtarget().getRegisterInfo(); - assert(TRI && "Expected target register info"); - if (!MBB.livein_empty()) { + const MachineRegisterInfo &MRI = MBB.getParent()->getRegInfo(); + if (MRI.tracksLiveness() && !MBB.livein_empty()) { + const TargetRegisterInfo &TRI = *MRI.getTargetRegisterInfo(); OS.indent(2) << "liveins: "; bool First = true; for (const auto &LI : MBB.liveins()) { if (!First) OS << ", "; First = false; - printReg(LI.PhysReg, OS, TRI); + printReg(LI.PhysReg, OS, &TRI); if (!LI.LaneMask.all()) OS << ":0x" << PrintLaneMask(LI.LaneMask); } -- cgit v1.2.3