[clang] [CIR] Wire AMDGPU into the call-convention lowering pass (PR #220197)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 15 10:03:33 PDT 2026


================
@@ -658,20 +682,30 @@ static llvm::abi::RequiredArgs requiredArgs(cir::FuncType fnTy) {
   return llvm::abi::RequiredArgs(fnTy.getNumInputs());
 }
 
-/// Classify an x86_64 SysV signature (return type + argument types) using the
-/// LLVM ABI library.  Shared by the cir.func path, the variadic-call path and
-/// the indirect-call path (the latter classifies from the callee function
+/// Map a CIR calling convention to the llvm::CallingConv the ABI classifier
+/// uses.  Conventions the classifier does not distinguish fall back to C.
+static llvm::CallingConv::ID convertCallingConv(cir::CallingConv cc) {
----------------
andykaylor wrote:

This is generally wrong, but I understand that's a by-product of the existing implementation assuming C calling convention everywhere. There should at least be a FIXME comment here.

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


More information about the cfe-commits mailing list