aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineInstr.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp
index 5860a76..4716665 100644
--- a/llvm/lib/CodeGen/MachineInstr.cpp
+++ b/llvm/lib/CodeGen/MachineInstr.cpp
@@ -63,6 +63,10 @@
using namespace llvm;
+static cl::opt<bool>
+ PrintMIAddrs("print-mi-addrs", cl::Hidden,
+ cl::desc("Print addresses of MachineInstrs when dumping"));
+
static const MachineFunction *getMFIfAvailable(const MachineInstr &MI) {
if (const MachineBasicBlock *MBB = MI.getParent())
if (const MachineFunction *MF = MBB->getParent())
@@ -2076,6 +2080,9 @@ void MachineInstr::print(raw_ostream &OS, ModuleSlotTracker &MST,
}
// TODO: DBG_LABEL
+ if (PrintMIAddrs)
+ OS << " ; " << this;
+
if (AddNewLine)
OS << '\n';
}