[clang] [llvm] [Clang][OpenMP] Support for dispatch construct (Sema & Codegen) support (PR #131838)
Deepak Eachempati via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 10 12:13:49 PDT 2025
================
@@ -11899,6 +11899,9 @@ def err_omp_clause_requires_dispatch_construct : Error<
"'%0' clause requires 'dispatch' context selector">;
def err_omp_append_args_with_varargs : Error<
"'append_args' is not allowed with varargs functions">;
+def warn_omp_dispatch_clause_novariants_nocontext : Warning<
----------------
dreachem wrote:
The effect of the **nocontext** clause is to not add the **dispatch** construct to the construct trait set. It will only matter once we support **dispatch** in a construct trait selector (support for this is not required in 5.2, but is required in 6.0).
Assuming we support **dispatch** in a construct trait selector, then this is what the various combinations would mean:
```
novariants(0), nocontext(0): Allow selective variant substitution according to context match
novariants(0), nocontext(1): Allow selective variant substitution according to context match (NO MATCH
for selectors that require **dispatch** trait)
novariants(1), nocontext(0): Always call the base function (shuts off any variant substitution for the call)
novariants(1), nocontext(1): Always call the base function (shuts off any variant substitution for the call)
```
In summary, **novariants** takes precedence and **nocontext** can be ignored ONLY if the _do-not-use-variant_ argument evaluates to true.
https://github.com/llvm/llvm-project/pull/131838
More information about the cfe-commits
mailing list