[llvm] [Clang] Prevent `mlink-builtin-bitcode` from internalizing the RPC client (PR #118661)

Yaxun Liu via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 27 10:55:26 PST 2025


================
@@ -233,6 +233,10 @@ bool InternalizePass::internalizeModule(Module &M) {
   else
     AlwaysPreserved.insert("__stack_chk_guard");
 
+  // Preserve the RPC interface for GPU host callbacks when internalizing.
----------------
yxsamliu wrote:

Like the FIXME suggested, this might be done by introducing a lambda argument when creating this pass, like MustPreserveGV, or extend MustPreserveGV to be able to preserve functions. Then when AMDGPU backend creates this pass, it may put the name of the functions that needs preserving in that lamba.

However, since there is precedence to preserve specific functions by name, I won't put a hard requirement on this PR. It is up to you.

https://github.com/llvm/llvm-project/pull/118661


More information about the llvm-commits mailing list