[libc-commits] [clang] [libc] [llvm] [NVPTX] Implement variadic functions using IR lowering (PR #96015)

Jon Chesterfield via libc-commits libc-commits at lists.llvm.org
Wed Jun 19 07:27:56 PDT 2024


================
@@ -203,8 +203,15 @@ ABIArgInfo NVPTXABIInfo::classifyArgumentType(QualType Ty) const {
 void NVPTXABIInfo::computeInfo(CGFunctionInfo &FI) const {
   if (!getCXXABI().classifyReturnType(FI))
     FI.getReturnInfo() = classifyReturnType(FI.getReturnType());
-  for (auto &I : FI.arguments())
-    I.info = classifyArgumentType(I.type);
+
+  unsigned ArgumentsCount = 0;
+  for (auto &I : FI.arguments()) {
+    if (FI.isVariadic() && ArgumentsCount > 0)
----------------
JonChesterfield wrote:

Look at amdgpu, it does exactly that normal lowering for fixed and something different for variadic.

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


More information about the libc-commits mailing list