]> granicus.if.org Git - llvm/commitdiff
Retire the llvm.dbg.mir hack after r311594.
authorAdrian Prantl <aprantl@apple.com>
Wed, 23 Aug 2017 22:02:36 +0000 (22:02 +0000)
committerAdrian Prantl <aprantl@apple.com>
Wed, 23 Aug 2017 22:02:36 +0000 (22:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311610 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/LiveDebugValues.cpp
lib/CodeGen/MachineModuleInfo.cpp
lib/CodeGen/PrologEpilogInserter.cpp
lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
lib/IR/Verifier.cpp

index 89a66496ddd24d81b703c098a480fae7d13f8dd6..12451174643c16890bde2ca985fbde31f7fb89b9 100644 (file)
@@ -447,12 +447,9 @@ void LiveDebugValues::transferSpillInst(MachineInstr &MI,
       // 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);
index 3999cd5eb7e552e014ba4bb1e1c3d3db98dc3ba6..f0dd77ef0daeaefa05b7e85c84bbbddadb365941 100644 (file)
@@ -210,8 +210,6 @@ bool MachineModuleInfo::doInitialization(Module &M) {
   DbgInfoAvailable = UsesVAFloatArgument = UsesMorestackAddr = false;
   AddrLabelSymbols = nullptr;
   TheModule = &M;
-  if (getDebugMetadataVersionFromModule(M))
-    M.getOrInsertNamedMetadata("llvm.dbg.mir");
   return false;
 }
 
index 1b82cd2158ae8bc7a6ccc1cdfe2127bc516f135b..6e442065ef71c3e29ae3a60b13d4b8887499b8bc 100644 (file)
@@ -1086,9 +1086,6 @@ void PEI::replaceFrameIndices(MachineBasicBlock *BB, MachineFunction &Fn,
         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;
       }
 
index 9321a956fbdd6f0c1c405d198bd927e660e4a2a1..4e6e90fc4bba404620099fc1da0f4404d9c65521 100644 (file)
@@ -848,10 +848,6 @@ static void transferDbgValues(SelectionDAG &DAG, DIBuilder &DIB, SDValue From,
                         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)
index 7697b3d59b5d9c659b7a5ca056d8c04f4fd32461..c5cee49c0c29788f49ed65b70b4a544661f934fc 100644 (file)
@@ -736,7 +736,7 @@ void Verifier::visitNamedMDNode(const NamedMDNode &NMD) {
   // 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()) {