diff options
Diffstat (limited to 'llvm/lib/CodeGen/MIRPrinter.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/MIRPrinter.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MIRPrinter.cpp b/llvm/lib/CodeGen/MIRPrinter.cpp index b91d9c4727fc..fee237104022 100644 --- a/llvm/lib/CodeGen/MIRPrinter.cpp +++ b/llvm/lib/CodeGen/MIRPrinter.cpp @@ -803,6 +803,8 @@ void MIPrinter::print(const MachineInstr &MI) { OS << "nomerge "; if (MI.getFlag(MachineInstr::Unpredictable)) OS << "unpredictable "; + if (MI.getFlag(MachineInstr::NoConvergent)) + OS << "noconvergent "; OS << TII->getName(MI.getOpcode()); if (I < E) @@ -979,11 +981,29 @@ void MIRFormatter::printIRValue(raw_ostream &OS, const Value &V, } void llvm::printMIR(raw_ostream &OS, const Module &M) { + // RemoveDIs: as there's no textual form for DPValues yet, print debug-info + // in dbg.value format. + bool IsNewDbgInfoFormat = M.IsNewDbgInfoFormat; + if (IsNewDbgInfoFormat) + const_cast<Module &>(M).convertFromNewDbgValues(); + yaml::Output Out(OS); Out << const_cast<Module &>(M); + + if (IsNewDbgInfoFormat) + const_cast<Module &>(M).convertToNewDbgValues(); } void llvm::printMIR(raw_ostream &OS, const MachineFunction &MF) { + // RemoveDIs: as there's no textual form for DPValues yet, print debug-info + // in dbg.value format. + bool IsNewDbgInfoFormat = MF.getFunction().IsNewDbgInfoFormat; + if (IsNewDbgInfoFormat) + const_cast<Function &>(MF.getFunction()).convertFromNewDbgValues(); + MIRPrinter Printer(OS); Printer.print(MF); + + if (IsNewDbgInfoFormat) + const_cast<Function &>(MF.getFunction()).convertToNewDbgValues(); } |
