From a078c77d72082bf6a06486849735cdeaab1374bc Mon Sep 17 00:00:00 2001 From: Amy Huang Date: Tue, 5 Nov 2019 10:54:50 -0800 Subject: [MIR] Add MIR parsing for heap alloc site instruction markers Summary: This patch adds MIR parsing and printing for heap alloc markers, which were added in D69136. They are printed as an operand similar to pre-/post-instr symbols, with a heap-alloc-marker token and a metadata node. Reviewers: rnk Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D69864 --- llvm/lib/CodeGen/MachineInstr.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'llvm/lib/CodeGen/MachineInstr.cpp') diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp index 397c1239d85..276a0a4aef6 100644 --- a/llvm/lib/CodeGen/MachineInstr.cpp +++ b/llvm/lib/CodeGen/MachineInstr.cpp @@ -1701,12 +1701,13 @@ void MachineInstr::print(raw_ostream &OS, ModuleSlotTracker &MST, OS << " post-instr-symbol "; MachineOperand::printSymbol(OS, *PostInstrSymbol); } - if (/*MDNode *HeapAllocMarker =*/getHeapAllocMarker()) { + if (MDNode *HeapAllocMarker = getHeapAllocMarker()) { if (!FirstOp) { FirstOp = false; OS << ','; } - OS << " heap-alloc-marker"; + OS << " heap-alloc-marker "; + HeapAllocMarker->printAsOperand(OS, MST); } if (!SkipDebugLoc) { -- cgit v1.2.3