[llvm] r311610 - Retire the llvm.dbg.mir hack after r311594.
Adrian Prantl via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 23 15:02:36 PDT 2017
Author: adrian
Date: Wed Aug 23 15:02:36 2017
New Revision: 311610
URL: http://llvm.org/viewvc/llvm-project?rev=311610&view=rev
Log:
Retire the llvm.dbg.mir hack after r311594.
Modified:
llvm/trunk/lib/CodeGen/LiveDebugValues.cpp
llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp
llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp
llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
llvm/trunk/lib/IR/Verifier.cpp
Modified: llvm/trunk/lib/CodeGen/LiveDebugValues.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveDebugValues.cpp?rev=311610&r1=311609&r2=311610&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LiveDebugValues.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveDebugValues.cpp Wed Aug 23 15:02:36 2017
@@ -447,12 +447,9 @@ void LiveDebugValues::transferSpillInst(
// iterator in our caller.
unsigned SpillBase;
int SpillOffset = extractSpillBaseRegAndOffset(MI, SpillBase);
- const Module *M = MF->getMMI().getModule();
const MachineInstr *DMI = &VarLocIDs[ID].MI;
auto *SpillExpr = DIExpression::prepend(
DMI->getDebugExpression(), DIExpression::NoDeref, SpillOffset);
- // Add the expression to the metadata graph so isn't lost in MIR dumps.
- M->getNamedMetadata("llvm.dbg.mir")->addOperand(SpillExpr);
MachineInstr *SpDMI =
BuildMI(*MF, DMI->getDebugLoc(), DMI->getDesc(), true, SpillBase,
DMI->getDebugVariable(), SpillExpr);
Modified: llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp?rev=311610&r1=311609&r2=311610&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp Wed Aug 23 15:02:36 2017
@@ -210,8 +210,6 @@ bool MachineModuleInfo::doInitialization
DbgInfoAvailable = UsesVAFloatArgument = UsesMorestackAddr = false;
AddrLabelSymbols = nullptr;
TheModule = &M;
- if (getDebugMetadataVersionFromModule(M))
- M.getOrInsertNamedMetadata("llvm.dbg.mir");
return false;
}
Modified: llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp?rev=311610&r1=311609&r2=311610&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp (original)
+++ llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp Wed Aug 23 15:02:36 2017
@@ -1086,9 +1086,6 @@ void PEI::replaceFrameIndices(MachineBas
auto *DIExpr = DIExpression::prepend(MI.getDebugExpression(),
DIExpression::NoDeref, Offset);
MI.getOperand(3).setMetadata(DIExpr);
- const Module *M = Fn.getMMI().getModule();
- // Add the expression to the metadata graph so isn't lost in MIR dumps.
- M->getNamedMetadata("llvm.dbg.mir")->addOperand(DIExpr);
continue;
}
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp?rev=311610&r1=311609&r2=311610&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp Wed Aug 23 15:02:36 2017
@@ -848,10 +848,6 @@ static void transferDbgValues(SelectionD
Dbg->getDebugLoc(), Dbg->getOrder());
Dbg->setIsInvalidated();
ClonedDVs.push_back(Clone);
-
- // Add the expression to the metadata graph so isn't lost in MIR dumps.
- const Module *M = DAG.getMachineFunction().getMMI().getModule();
- M->getNamedMetadata("llvm.dbg.mir")->addOperand(Fragment);
}
for (SDDbgValue *Dbg : ClonedDVs)
Modified: llvm/trunk/lib/IR/Verifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Verifier.cpp?rev=311610&r1=311609&r2=311610&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Verifier.cpp (original)
+++ llvm/trunk/lib/IR/Verifier.cpp Wed Aug 23 15:02:36 2017
@@ -736,7 +736,7 @@ void Verifier::visitNamedMDNode(const Na
// There used to be various other llvm.dbg.* nodes, but we don't support
// upgrading them and we want to reserve the namespace for future uses.
if (NMD.getName().startswith("llvm.dbg."))
- AssertDI(NMD.getName() == "llvm.dbg.cu" || NMD.getName() == "llvm.dbg.mir",
+ AssertDI(NMD.getName() == "llvm.dbg.cu",
"unrecognized named metadata node in the llvm.dbg namespace",
&NMD);
for (const MDNode *MD : NMD.operands()) {
More information about the llvm-commits
mailing list