[PATCH] D74904: WIP: [CallSiteInfo] Erase call site info for a MI from bundle
Djordje Todorovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 20 08:03:17 PST 2020
djtodoro created this revision.
djtodoro added reviewers: vsk, aprantl, dstenb.
djtodoro added a project: debug-info.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
This will address the issue: P8198 <https://reviews.llvm.org/P8198> and P8199 <https://reviews.llvm.org/P8199> (from D73534 <https://reviews.llvm.org/D73534>).
TODO: Add the test case.
https://reviews.llvm.org/D74904
Files:
llvm/lib/CodeGen/MachineBasicBlock.cpp
llvm/lib/CodeGen/MachineFunction.cpp
Index: llvm/lib/CodeGen/MachineFunction.cpp
===================================================================
--- llvm/lib/CodeGen/MachineFunction.cpp
+++ llvm/lib/CodeGen/MachineFunction.cpp
@@ -393,7 +393,7 @@
// be triggered during the implementation of support for the
// call site info of a new architecture. If the assertion is triggered,
// back trace will tell where to insert a call to updateCallSiteInfo().
- assert((!MI->isCall(MachineInstr::IgnoreBundle) ||
+ assert((!MI->isCandidateForCallSiteEntry() ||
CallSitesInfo.find(MI) == CallSitesInfo.end()) &&
"Call site info was not updated!");
// Strip it for parts. The operand array and the MI object itself are
Index: llvm/lib/CodeGen/MachineBasicBlock.cpp
===================================================================
--- llvm/lib/CodeGen/MachineBasicBlock.cpp
+++ llvm/lib/CodeGen/MachineBasicBlock.cpp
@@ -154,6 +154,8 @@
void ilist_traits<MachineInstr>::deleteNode(MachineInstr *MI) {
assert(!MI->getParent() && "MI is still in a block!");
+ if (MI->isCandidateForCallSiteEntry())
+ Parent->getParent()->eraseCallSiteInfo(MI);
Parent->getParent()->DeleteMachineInstr(MI);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74904.245658.patch
Type: text/x-patch
Size: 1200 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200220/914b4fc4/attachment.bin>
More information about the llvm-commits
mailing list