[PATCH] D122627: [HLSL] Fix MSFT Attribute parsing, add numthreads

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 29 13:27:32 PDT 2022


rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.

lgtm



================
Comment at: clang/include/clang/Basic/AttrDocs.td:6377
+are required. The ``X``, ``Y``, and ``Z`` values provided to the attribute
+dictate the thread id. Total number of threads executed is ``X * Y * Z``.
+  }];
----------------
I think it would be fair to link to the Microsoft docs here:
https://docs.microsoft.com/en-us/windows/win32/direct3dhlsl/sm5-attributes-numthreads

We've done this elsewhere for Microsoft attributes.


================
Comment at: clang/lib/Sema/SemaDecl.cpp:11326
 
+  // functions named main in hlsl are default entries, but have no restrictions
+  if (getLangOpts().HLSL)
----------------
Style nit: comments should use follow normal capitalization and punctuation rules: "When writing comments, write them as English prose, using proper capitalization, punctuation, etc."
https://llvm.org/docs/CodingStandards.html#commenting


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D122627



More information about the cfe-commits mailing list