forked from OSchip/llvm-project
[CSInfo][TailDuplicator] Delete the call site info when removing dead MBBs
This is needed for the debug entry values feature. Differential Revision: https://reviews.llvm.org/D74702
This commit is contained in:
parent
7fb06796ab
commit
a5ac8ca3e0
|
@ -1015,6 +1015,13 @@ void TailDuplicator::removeDeadBlock(
|
|||
assert(MBB->pred_empty() && "MBB must be dead!");
|
||||
LLVM_DEBUG(dbgs() << "\nRemoving MBB: " << *MBB);
|
||||
|
||||
MachineFunction *MF = MBB->getParent();
|
||||
// Update the call site info.
|
||||
std::for_each(MBB->begin(), MBB->end(), [MF](const MachineInstr &MI) {
|
||||
if (MI.isCandidateForCallSiteEntry())
|
||||
MF->eraseCallSiteInfo(&MI);
|
||||
});
|
||||
|
||||
if (RemovalCallback)
|
||||
(*RemovalCallback)(MBB);
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
||||
; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu | FileCheck %s
|
||||
; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -debug-entry-values | FileCheck %s
|
||||
|
||||
; Function Attrs: uwtable
|
||||
; When tail-duplicating during placement, we work backward from blocks with
|
||||
|
|
Loading…
Reference in New Issue