[PATCH] D65023: [MS] Pass S_HEAPALLOCSITE metadata through SelectionDAG
Amy Huang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 5 13:42:03 PDT 2019
akhuang updated this revision to Diff 213453.
akhuang added a comment.
- Revert "[MS] Emit S_HEAPALLOCSITE debug info in Selection DAG" and
- Recommit "[MS] Emit S_HEAPALLOCSITE debug info in Selection DAG"
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65023/new/
https://reviews.llvm.org/D65023
Files:
llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
llvm/lib/Target/X86/X86ISelLowering.cpp
Index: llvm/lib/Target/X86/X86ISelLowering.cpp
===================================================================
--- llvm/lib/Target/X86/X86ISelLowering.cpp
+++ llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -4058,10 +4058,9 @@
MF.getFrameInfo().setHasTailCall();
SDValue Ret = DAG.getNode(X86ISD::TC_RETURN, dl, NodeTys, Ops);
DAG.addCallSiteInfo(Ret.getNode(), std::move(CSInfo));
- if (CLI.CS && CLI.CS->getMetadata("heapallocsite")) {
- DAG.addHeapAllocSite(Chain.getNode(),
+ if (CLI.CS && CLI.CS->getMetadata("heapallocsite"))
+ DAG.addHeapAllocSite(Ret.getNode(),
CLI.CS->getMetadata("heapallocsite"));
- }
return Ret;
}
@@ -4075,10 +4074,9 @@
DAG.addCallSiteInfo(Chain.getNode(), std::move(CSInfo));
// Save heapallocsite metadata.
- if (CLI.CS && CLI.CS->getMetadata("heapallocsite")) {
+ if (CLI.CS && CLI.CS->getMetadata("heapallocsite"))
DAG.addHeapAllocSite(Chain.getNode(),
CLI.CS->getMetadata("heapallocsite"));
- }
// Create the CALLSEQ_END node.
unsigned NumBytesForCalleeToPop;
Index: llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
===================================================================
--- llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
+++ llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
@@ -910,9 +910,13 @@
if (HasDbg)
ProcessSourceNode(N, DAG, Emitter, VRBaseMap, Orders, Seen, NewInsn);
+ // if (NewInsn && NewInsn->isCall())
+ // NewInsn->dump();
+
if (MDNode *MD = DAG->getHeapAllocSite(N)) {
- if (NewInsn && NewInsn->isCall())
+ if (NewInsn && NewInsn->isCall()) {
MF.addCodeViewHeapAllocSite(NewInsn, MD);
+ }
}
GluedNodes.pop_back();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65023.213453.patch
Type: text/x-patch
Size: 1799 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190805/15af83d0/attachment.bin>
More information about the llvm-commits
mailing list