[llvm] [BuildLibCalls] Apply ABI attributes to call-sites as well (PR #222675)

Antonio Frighetto via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 14 01:43:24 PDT 2026


================
@@ -1503,6 +1503,21 @@ void llvm::markRegisterParameterAttributes(Function *F) {
   }
 }
 
+static void inheritABIAttributesFromCallee(CallBase *CB) {
+  Function *F = CB->getCalledFunction();
+  assert(F && "Cannot be indirect call");
----------------
antoniofrighetto wrote:

>  I expect there are more places like this.

Not entirely clear to me whether this is intended to generalize to other users or whether it's more of a targeted fix here until ABI properties get a different representation (having a static helper here suggests the latter, but the helper itself seems indeed generic).

Should the assert be an early return instead? (Doesn't sound like an error to me having an indirect call, there would be just nothing to copy). If this is meant to generalize, would it make sense to expose it as a CallBase method?

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


More information about the llvm-commits mailing list