summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorAmy Huang <akhuang@google.com>2019-11-05 10:54:50 -0800
committerAmy Huang <akhuang@google.com>2019-11-05 12:57:45 -0800
commita078c77d72082bf6a06486849735cdeaab1374bc (patch)
tree3aaae290d3de2da3c0a64cbea79a665f139a79a2 /llvm/lib/CodeGen/MachineInstr.cpp
parent743461090a2027058cd438ed643ed5ed939cf1ca (diff)
downloadbcm5719-llvm-a078c77d72082bf6a06486849735cdeaab1374bc.tar.gz
bcm5719-llvm-a078c77d72082bf6a06486849735cdeaab1374bc.zip
[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
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineInstr.cpp5
1 files changed, 3 insertions, 2 deletions
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) {
OpenPOWER on IntegriCloud