diff options
| author | Daniel Paoliello <danpao@microsoft.com> | 2025-01-13 14:00:31 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-13 14:00:31 -0800 |
| commit | 19032bfe87fa0f4a3a7b3e68daafc93331b71e0d (patch) | |
| tree | 408eadd3cf366bba9bbb8e335c517fd639ba88b4 /llvm/lib/CodeGen/TargetInstrInfo.cpp | |
| parent | 283dca56f8dddbf2f144730a01675c94b04f57cb (diff) | |
[aarch64][win] Update Called Globals info when updating Call Site info (#122762)
Fixes the "use after poison" issue introduced by #121516 (see
<https://github.com/llvm/llvm-project/pull/121516#issuecomment-2585912395>).
The root cause of this issue is that #121516 introduced "Called Global"
information for call instructions modeling how "Call Site" info is
stored in the machine function, HOWEVER it didn't copy the
copy/move/erase operations for call site information.
The fix is to rename and update the existing copy/move/erase functions
so they also take care of Called Global info.
Diffstat (limited to 'llvm/lib/CodeGen/TargetInstrInfo.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/TargetInstrInfo.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/TargetInstrInfo.cpp b/llvm/lib/CodeGen/TargetInstrInfo.cpp index 770b851f3607..7a905b65f26e 100644 --- a/llvm/lib/CodeGen/TargetInstrInfo.cpp +++ b/llvm/lib/CodeGen/TargetInstrInfo.cpp @@ -150,12 +150,12 @@ TargetInstrInfo::ReplaceTailWithBranchTo(MachineBasicBlock::iterator Tail, // Save off the debug loc before erasing the instruction. DebugLoc DL = Tail->getDebugLoc(); - // Update call site info and remove all the dead instructions + // Update call info and remove all the dead instructions // from the end of MBB. while (Tail != MBB->end()) { auto MI = Tail++; - if (MI->shouldUpdateCallSiteInfo()) - MBB->getParent()->eraseCallSiteInfo(&*MI); + if (MI->shouldUpdateAdditionalCallInfo()) + MBB->getParent()->eraseAdditionalCallInfo(&*MI); MBB->erase(MI); } |
