[clang] [llvm] [Clang][OpenMP] Support for dispatch construct (Sema & Codegen) support (PR #131838)

via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 10 09:56:10 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<
----------------
SunilKuravinakop wrote:

I do not need to stop execution if novariants and nocontext occur together.  In a dispatch directive like  `#pragma omp dispatch nocontext(c1) novariants(c2)` then I do not find a way to generate 
```
if(condition)
    foo();
else
   foo_variant

```
For the "condition" in `if `statement I do not know a way to use c1 & c2 together. Hence I preferred to indicate this to user and use `novariants(c2)`. I do not want to stop the compilation with an error message because the spec does not indicate what to do in this case.

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


More information about the llvm-commits mailing list