[RFC] Removing the OpenMP experimental warning for LLVM 21

This has been discussed before, including recently on the OpenMP calls. This RFC is to invite comments from a wider audience.

Flang currently outputs a warning when the -fopenmp flag is used:

flang-21: warning: OpenMP support in flang is still experimental [-Wexperimental-option]

I hope to remove the openmp experimental warning before LLVM 21 branches. The current remaining work items are documented at [Flang][OpenMP] Important issues to be fixed prior to removing experimental status of OpenMP · Issue #110008 · llvm/llvm-project · GitHub

This covers

  • Parsing all of OpenMP 5.2; clear TODO messages will be emitted when a feature is not supported.
  • Fixing known serious bugs (see list in the issue).

As we draw closer to the LLVM 21 release I would like to propose the following criteria to avoid scope creep: new bugs should be added to that list only if they result in compiler crashes. The inclusion of other bugs should be discussed with the community (e.g. on the OpenMP call).

I checked yesterday and found no OpenMP compiler crashes in the Fujitsu test suite.

With these criteria met, would it be acceptable to remove the experimental warning from OpenMP support in flang?

6 Likes

I support this. I think at this point a better term for the status of OpenMP would be “incomplete”. The parts that are implemented do work as expected, and we emit diagnostics for the rest.

1 Like

+1

I support the removal of the term “experimental support”. I suggest we replace it with “incomplete” for OpenMP standards >= 4.0. Perhaps, additionally, point users to Flang OpenMP Support — The Flang Compiler unless you think that would make the message too verbose.

Thank you for taking a look. I think generating a warning every time OpenMP is used is too verbose. The current plan is to print easy to read “not yet implemented” messages for the user if and when they use a construct or clause which is not yet supported. I believe this is more similar to the approach taken by other compilers. Would that be good enough? Perhaps a warning could be generated for -fopenmp-version=N where N is a partially supported version?

Thank you.

I see your point. Yes, it would be too verbose to emit the “incomplete support” message every single time openmp is used.

I think this is a good idea because it is far more specific. And very useful considering that in addition, we also emit a “not yet implemented” message for unsupported construct/clause.

First of all: this is awesome! As a Fortran user/developer, a good OpenMP capable compiler that will work across a variety of platforms and architectures has been one of my biggest wishes for years!

On topic: I think TODO/unsupported messages when using features not yet implemented is enough. No need to print additional warnings when you only use features supported by the compiler and the compilation is successful.

1 Like

Thanks @tblah for initiating this. I agree that we are in a position to remove the experimental status warning.

Perhaps a warning could be generated for -fopenmp-version=N where N is a partially supported version?

That is an excellent idea. Should the oldest version beyond which the warning would be emitted be v4.0?

This is a decent criteria going forward.

Yes currently.

1 Like

Draft PR: DRAFT: [flang][OpenMP] Remove experimental warning by tblah · Pull Request #144915 · llvm/llvm-project · GitHub

1 Like

The pull request has been merged. Thanks everyone for the reviews.

1 Like