From 23f101f37937a1bd4a29726cab2f76e0fb038b35 Mon Sep 17 00:00:00 2001 From: patrick Date: Sun, 23 Jun 2019 21:36:31 +0000 Subject: Import LLVM 8.0.0 release including clang, lld and lldb. --- gnu/llvm/lib/CodeGen/MachineOperand.cpp | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'gnu/llvm/lib/CodeGen/MachineOperand.cpp') diff --git a/gnu/llvm/lib/CodeGen/MachineOperand.cpp b/gnu/llvm/lib/CodeGen/MachineOperand.cpp index 8098333832b..05e51e1873c 100644 --- a/gnu/llvm/lib/CodeGen/MachineOperand.cpp +++ b/gnu/llvm/lib/CodeGen/MachineOperand.cpp @@ -14,6 +14,7 @@ #include "llvm/CodeGen/MachineOperand.h" #include "llvm/ADT/StringExtras.h" #include "llvm/Analysis/Loads.h" +#include "llvm/Analysis/MemoryLocation.h" #include "llvm/CodeGen/MIRPrinter.h" #include "llvm/CodeGen/MachineFrameInfo.h" #include "llvm/CodeGen/MachineJumpTableInfo.h" @@ -460,7 +461,8 @@ static void printIRValueReference(raw_ostream &OS, const Value &V, printLLVMNameWithoutPrefix(OS, V.getName()); return; } - MachineOperand::printIRSlotNumber(OS, MST.getLocalSlot(&V)); + int Slot = MST.getCurrentFunction() ? MST.getLocalSlot(&V) : -1; + MachineOperand::printIRSlotNumber(OS, Slot); } static void printSyncScope(raw_ostream &OS, const LLVMContext &Context, @@ -695,6 +697,11 @@ static void printCFI(raw_ostream &OS, const MCCFIInstruction &CFI, if (MCSymbol *Label = CFI.getLabel()) MachineOperand::printSymbol(OS, *Label); break; + case MCCFIInstruction::OpNegateRAState: + OS << "negate_ra_sign_state "; + if (MCSymbol *Label = CFI.getLabel()) + MachineOperand::printSymbol(OS, *Label); + break; default: // TODO: Print the other CFI Operations. OS << ""; @@ -742,10 +749,10 @@ void MachineOperand::print(raw_ostream &OS, ModuleSlotTracker &MST, OS << "undef "; if (isEarlyClobber()) OS << "early-clobber "; - if (isDebug()) - OS << "debug-use "; if (TargetRegisterInfo::isPhysicalRegister(getReg()) && isRenamable()) OS << "renamable "; + // isDebug() is exactly true for register operands of a DBG_VALUE. So we + // simply infer it when parsing and do not need to print it. const MachineRegisterInfo *MRI = nullptr; if (TargetRegisterInfo::isVirtualRegister(Reg)) { @@ -1078,7 +1085,11 @@ void MachineMemOperand::print(raw_ostream &OS, ModuleSlotTracker &MST, if (getFailureOrdering() != AtomicOrdering::NotAtomic) OS << toIRString(getFailureOrdering()) << ' '; - OS << getSize(); + if (getSize() == MemoryLocation::UnknownSize) + OS << "unknown-size"; + else + OS << getSize(); + if (const Value *Val = getValue()) { OS << ((isLoad() && isStore()) ? " on " : isLoad() ? " from " : " into "); printIRValueReference(OS, *Val, MST); -- cgit v1.2.3-59-g8ed1b