[clang] [NVPTX] Add support for maxclusterrank in launch_bounds (PR #66496)

Artem Belevich via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 21 09:29:13 PDT 2023


================
@@ -5607,6 +5607,21 @@ bool Sema::CheckRegparmAttr(const ParsedAttr &AL, unsigned &numParams) {
   return false;
 }
 
+// Helper to get CudaArch.
+static CudaArch getCudaArch(const TargetInfo &TI) {
----------------
Artem-B wrote:

Considering that we do have TargetInfo pointer here, instead of trying to figure out the target GPU via features, can we just extract CudaArch directly from [NVPTXTargetInfo::GPU](https://github.com/llvm/llvm-project/blob/7fcbb64fca5e664b11f9167a215b47de2ae9082c/clang/lib/Basic/Targets/NVPTX.h#L65C3-L65C12) ?

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


More information about the cfe-commits mailing list