summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MIRPrinter.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/MIRPrinter.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/MIRPrinter.cpp')
-rw-r--r--llvm/lib/CodeGen/MIRPrinter.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MIRPrinter.cpp b/llvm/lib/CodeGen/MIRPrinter.cpp
index 1a4e21ac06a..b06e34a809f 100644
--- a/llvm/lib/CodeGen/MIRPrinter.cpp
+++ b/llvm/lib/CodeGen/MIRPrinter.cpp
@@ -784,6 +784,13 @@ void MIPrinter::print(const MachineInstr &MI) {
MachineOperand::printSymbol(OS, *PostInstrSymbol);
NeedComma = true;
}
+ if (MDNode *HeapAllocMarker = MI.getHeapAllocMarker()) {
+ if (NeedComma)
+ OS << ',';
+ OS << " heap-alloc-marker ";
+ HeapAllocMarker->printAsOperand(OS, MST);
+ NeedComma = true;
+ }
if (const DebugLoc &DL = MI.getDebugLoc()) {
if (NeedComma)
OpenPOWER on IntegriCloud