[flang][OpenMP] Support for "declare variant"
Open
flang:openmp
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
Support for "declare variant" missing in flang:
e.g.
```fortran
subroutine foo_parallel_variant()
print *, "parallel variant"
end subroutine
subroutine foo_parallel()
!$omp declare variant(foo_parallel_variant) match(construct={parallel})
print *, "parallel"
end subroutine
!$omp parallel num_threads(2)
call foo_parallel()
!$omp end parallel
```
`error: loc("flang/declare_variant/declare_variant.f90":25:11): flang/lib/Lower/OpenMP/OpenMP.cpp:4106: not yet implemented: OmpDeclareVariantDirective`
I noticed this when working with "!$omp dispatch".
Contributor guide
Assessment
This issue has not been assessed yet.