diff options
author | Amy Huang <akhuang@google.com> | 2019-04-24 23:02:48 +0000 |
---|---|---|
committer | Amy Huang <akhuang@google.com> | 2019-04-24 23:02:48 +0000 |
commit | 68c91994931c29dfc7a09e7d5a5e4515d13b12bd (patch) | |
tree | 103440faf57f4dca0def448c3533af2066b2e644 /llvm/lib/CodeGen/MachineFunction.cpp | |
parent | 105c565e9120c4ae11ec93912c883ec100034746 (diff) | |
download | llvm-68c91994931c29dfc7a09e7d5a5e4515d13b12bd.zip llvm-68c91994931c29dfc7a09e7d5a5e4515d13b12bd.tar.gz llvm-68c91994931c29dfc7a09e7d5a5e4515d13b12bd.tar.bz2 |
Recommitting r358783 and r358786 "[MS] Emit S_HEAPALLOCSITE debug info" with fixes for buildbot error (undefined assembler label).
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: rnk
Subscribers: aprantl, hiraditya, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D61083
llvm-svn: 359149
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineFunction.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp index 88a7d15..bcc523f 100644 --- a/llvm/lib/CodeGen/MachineFunction.cpp +++ b/llvm/lib/CodeGen/MachineFunction.cpp @@ -43,6 +43,7 @@ #include "llvm/IR/BasicBlock.h" #include "llvm/IR/Constant.h" #include "llvm/IR/DataLayout.h" +#include "llvm/IR/DebugInfoMetadata.h" #include "llvm/IR/DerivedTypes.h" #include "llvm/IR/Function.h" #include "llvm/IR/GlobalValue.h" @@ -806,6 +807,16 @@ try_next:; return FilterID; } +void MachineFunction::addCodeViewHeapAllocSite(MachineInstr *I, MDNode *MD) { + MCSymbol *BeginLabel = Ctx.createTempSymbol("heapallocsite", true); + MCSymbol *EndLabel = Ctx.createTempSymbol("heapallocsite", true); + I->setPreInstrSymbol(*this, BeginLabel); + I->setPostInstrSymbol(*this, EndLabel); + + DIType *DI = dyn_cast<DIType>(MD); + CodeViewHeapAllocSites.push_back(std::make_tuple(BeginLabel, EndLabel, DI)); +} + /// \} //===----------------------------------------------------------------------===// |