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/MachineInstr.cpp | |
parent | 283dca56f8dddbf2f144730a01675c94b04f57cb (diff) | |
download | llvm-19032bfe87fa0f4a3a7b3e68daafc93331b71e0d.zip llvm-19032bfe87fa0f4a3a7b3e68daafc93331b71e0d.tar.gz llvm-19032bfe87fa0f4a3a7b3e68daafc93331b71e0d.tar.bz2 |
[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/MachineInstr.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineInstr.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp index 958efa7..ef36dfc4 100644 --- a/llvm/lib/CodeGen/MachineInstr.cpp +++ b/llvm/lib/CodeGen/MachineInstr.cpp @@ -773,7 +773,7 @@ void MachineInstr::eraseFromBundle() { getParent()->erase_instr(this); } -bool MachineInstr::isCandidateForCallSiteEntry(QueryType Type) const { +bool MachineInstr::isCandidateForAdditionalCallInfo(QueryType Type) const { if (!isCall(Type)) return false; switch (getOpcode()) { @@ -786,10 +786,10 @@ bool MachineInstr::isCandidateForCallSiteEntry(QueryType Type) const { return true; } -bool MachineInstr::shouldUpdateCallSiteInfo() const { +bool MachineInstr::shouldUpdateAdditionalCallInfo() const { if (isBundle()) - return isCandidateForCallSiteEntry(MachineInstr::AnyInBundle); - return isCandidateForCallSiteEntry(); + return isCandidateForAdditionalCallInfo(MachineInstr::AnyInBundle); + return isCandidateForAdditionalCallInfo(); } unsigned MachineInstr::getNumExplicitOperands() const { |