[llvm] [Frontend] Introduce `getDirectiveCategory` for ACC/OMP directives (PR #94689)

Krzysztof Parzyszek via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 7 10:12:31 PDT 2024


================
@@ -1033,39 +1087,46 @@ def OMP_Teams : Directive<"teams"> {
     VersionedClause<OMPC_ThreadLimit>,
   ];
   let association = AS_Block;
+  let category = CA_Executable;
 }
 def OMP_ThreadPrivate : Directive<"threadprivate"> {
   let association = AS_None;
+  let category = CA_Declarative;
 }
 def OMP_Tile : Directive<"tile"> {
   let allowedOnceClauses = [
     VersionedClause<OMPC_Sizes, 51>,
   ];
   let association = AS_Loop;
+  let category = CA_Executable;
 }
 def OMP_Unknown : Directive<"unknown"> {
   let isDefault = true;
   let association = AS_None;
+  let category = CA_Utility;
----------------
kparzysz wrote:

There are only two directives that are categorized as `utility` in the spec: `error` and `nothing`.  `unknown` is not in the spec (it's our local invention), but since it serves a somewhat similar purpose, I categorized it as `utility` as well.

Another category that it could fit under is `informational`.  Let me know what you think.

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


More information about the llvm-commits mailing list