[PATCH] D91944: OpenMP 5.0 metadirective

Joachim Protze via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 9 13:03:56 PST 2021


protze.joachim added a comment.

In D91944#2458154 <https://reviews.llvm.org/D91944#2458154>, @jdoerfert wrote:

> The problem is this patch can only resolve to a single directive during parsing. Take
>
>   template<bool b>
>   void foo() {
>     #pragma omp metadirective when(user={condition(b)}) ...
>   }
>
> which is not resolvable at parsing time but it is a valid OpenMP 5.0 use of the metadirective
> that needs to resolve at compile time.

It's unfortunate that this pattern is not supported by this patch. How difficult would it be to provide this support, or would the implementation be not different to dynamic conditions?
For this templated pattern, the optimizer would throw away the branch.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91944/new/

https://reviews.llvm.org/D91944



More information about the cfe-commits mailing list