[all-commits] [llvm/llvm-project] 2d00c7: [Clang][CodeGen] Emit fake uses before musttail ca...
Stephen Tozer via All-commits
all-commits at lists.llvm.org
Fri Apr 25 03:47:59 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2d00c73003a6c5e9fd468afcf271b505d4f80f27
https://github.com/llvm/llvm-project/commit/2d00c73003a6c5e9fd468afcf271b505d4f80f27
Author: Stephen Tozer <stephen.tozer at sony.com>
Date: 2025-04-25 (Fri, 25 Apr 2025)
Changed paths:
M clang/lib/CodeGen/CGCall.cpp
A clang/test/CodeGenCXX/fake-use-musttail.cpp
Log Message:
-----------
[Clang][CodeGen] Emit fake uses before musttail calls (#136867)
Fixes the issue reported following the merge of #118026.
When a valid `musttail` call is made, the function it is made from must
return immediately after the call; if there are any cleanups left in the
function, then an error is triggered. This is not necessary for fake
uses however - it is perfectly valid to simply emit the fake use
"cleanup" code before the tail call, and indeed LLVM will automatically
move any fake uses following a tail call to come before the tail call.
Therefore, this patch specifically choose to handle fake use cleanups
when a musttail call is present by simply emitting them immediately
before the call.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list