llvm / llvm/llvm-project

[flang][OpenMP] Support for "declare variant"

Open
#203,833 3 comments 0 reactions 2 assignees Claimed by @abidh View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.