summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
diff options
context:
space:
mode:
authorAmy Huang <akhuang@google.com>2019-04-19 21:09:11 +0000
committerAmy Huang <akhuang@google.com>2019-04-19 21:09:11 +0000
commitc774f687b6880484a126ed3e3d737e74c926f0ae (patch)
tree97e168eaf814536c4396b90c2abc6bcc0c5dbf0f /llvm/lib/CodeGen/SelectionDAG
parentc8eb2d0354a14a9b69cf1816dcc4e3e291023da2 (diff)
downloadbcm5719-llvm-c774f687b6880484a126ed3e3d737e74c926f0ae.tar.gz
bcm5719-llvm-c774f687b6880484a126ed3e3d737e74c926f0ae.zip
[MS] Emit S_HEAPALLOCSITE debug info
Summary: This emits labels around heapallocsite calls and S_HEAPALLOCSITE debug info in codeview. Currently only changes FastISel, so emitting labels still needs to be implemented in SelectionDAG. Reviewers: hans, rnk Subscribers: aprantl, hiraditya, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D60800 llvm-svn: 358783
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/FastISel.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
index 30294ae1595..fb607bbf739 100644
--- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
@@ -1234,6 +1234,12 @@ bool FastISel::lowerCallTo(CallLoweringInfo &CLI) {
if (CLI.NumResultRegs && CLI.CS)
updateValueMap(CLI.CS->getInstruction(), CLI.ResultReg, CLI.NumResultRegs);
+ // Set labels for heapallocsite call.
+ if (CLI.CS && CLI.CS->getInstruction()->getMetadata("heapallocsite")) {
+ MDNode *MD = CLI.CS->getInstruction()->getMetadata("heapallocsite");
+ MF->addCodeViewHeapAllocSite(CLI.Call, MD);
+ }
+
return true;
}
OpenPOWER on IntegriCloud