aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineOutliner.cpp
diff options
context:
space:
mode:
authorDaniel Paoliello <danpao@microsoft.com>2025-01-13 14:00:31 -0800
committerGitHub <noreply@github.com>2025-01-13 14:00:31 -0800
commit19032bfe87fa0f4a3a7b3e68daafc93331b71e0d (patch)
tree408eadd3cf366bba9bbb8e335c517fd639ba88b4 /llvm/lib/CodeGen/MachineOutliner.cpp
parent283dca56f8dddbf2f144730a01675c94b04f57cb (diff)
downloadllvm-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/MachineOutliner.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineOutliner.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineOutliner.cpp b/llvm/lib/CodeGen/MachineOutliner.cpp
index 4c54894..e3fe949 100644
--- a/llvm/lib/CodeGen/MachineOutliner.cpp
+++ b/llvm/lib/CodeGen/MachineOutliner.cpp
@@ -1149,8 +1149,8 @@ bool MachineOutliner::outline(
InstrUseRegs.insert(MOP.getReg());
}
}
- if (MI->isCandidateForCallSiteEntry())
- MI->getMF()->eraseCallSiteInfo(MI);
+ if (MI->isCandidateForAdditionalCallInfo())
+ MI->getMF()->eraseAdditionalCallInfo(MI);
}
for (const Register &I : DefRegs)