[llvm] d955b22 - [MachineInst] Remove dead code. NFCI.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 29 11:25:25 PST 2020


Author: Simon Pilgrim
Date: 2020-02-29T19:25:02Z
New Revision: d955b221cb252dc6f065f3f3889de6fc2ddc17ce

URL: https://github.com/llvm/llvm-project/commit/d955b221cb252dc6f065f3f3889de6fc2ddc17ce
DIFF: https://github.com/llvm/llvm-project/commit/d955b221cb252dc6f065f3f3889de6fc2ddc17ce.diff

LOG: [MachineInst] Remove dead code. NFCI.

The MachineFunction MF value is not used any more and is always null.

Added: 
    

Modified: 
    llvm/lib/CodeGen/MachineInstr.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp
index bbf0e919f6fc..542dc220ad30 100644
--- a/llvm/lib/CodeGen/MachineInstr.cpp
+++ b/llvm/lib/CodeGen/MachineInstr.cpp
@@ -1525,7 +1525,6 @@ void MachineInstr::print(raw_ostream &OS, ModuleSlotTracker &MST,
                          bool IsStandalone, bool SkipOpers, bool SkipDebugLoc,
                          bool AddNewLine, const TargetInstrInfo *TII) const {
   // We can be a bit tidier if we know the MachineFunction.
-  const MachineFunction *MF = nullptr;
   const TargetRegisterInfo *TRI = nullptr;
   const MachineRegisterInfo *MRI = nullptr;
   const TargetIntrinsicInfo *IntrinsicInfo = nullptr;
@@ -1817,14 +1816,6 @@ void MachineInstr::print(raw_ostream &OS, ModuleSlotTracker &MST,
     }
     auto *DV = cast<DILocalVariable>(getOperand(e - 2).getMetadata());
     OS << " line no:" <<  DV->getLine();
-    if (auto *InlinedAt = debugLoc->getInlinedAt()) {
-      DebugLoc InlinedAtDL(InlinedAt);
-      if (InlinedAtDL && MF) {
-        OS << " inlined @[ ";
-        InlinedAtDL.print(OS);
-        OS << " ]";
-      }
-    }
     if (isIndirectDebugValue())
       OS << " indirect";
   }


        


More information about the llvm-commits mailing list