[PATCH] D118084: [CUDA, NVPTX] Pass byval aggregates directly

Johannes Doerfert via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 25 15:41:12 PST 2022


jdoerfert added a comment.

The RFC discussion concluded this should be fine wrt. the interoperability use cases we want to support.
Code change looks good but I have one question.



================
Comment at: clang/lib/CodeGen/TargetInfo.cpp:7183
     }
-    return getNaturalAlignIndirect(Ty, /* byval */ true);
+    // We want to pass whole aggregate value as one argument.
+    auto AI = ABIArgInfo::getDirect();
----------------
Nit: Maybe a note that this effectively disables passing values via `byval`.


================
Comment at: clang/lib/CodeGen/TargetInfo.cpp:7193
          EIT->getNumBits() > 64))
       return getNaturalAlignIndirect(Ty, /* byval */ true);
   }
----------------
When is this ever hit and should we not disable byval here too while we are at it?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118084/new/

https://reviews.llvm.org/D118084



More information about the cfe-commits mailing list