This patch adds flag -fopenmp-version to the Flang frontend and bbc tool. This flag is lowered to MLIR OpenMP flag attribute.
Details
Diff Detail
Event Timeline
All in all LGTM, but I'm not sure whether Flang should be defaulting to OpenMP 5.0. AFAIK, that's not supported yet.
clang/lib/Driver/ToolChains/Flang.cpp | ||
---|---|---|
46 | Is this clang-format? Looks like a big block of unrelated changes (not against it). |
If you wish I can set to OpenMP 4.5. But then we need to have two separate flags in clang/include/clang/Driver/Options.td (one for clang and the second one for flang).
clang/lib/Driver/ToolChains/Flang.cpp | ||
---|---|---|
46 | Yes, this is output of clang format. |
We will not be able to match the OpenMP support in clang (stand support level) soon. Although we have made lot of progress, we are effectively around 1.1. To stay true to the meaning of this metadata, we will have to have separate flags. But, I guess, fclang-openmp-version might not be acceptable to Clang folks who are used to using -fopenmp-version. Can't this be achieved by the same flag? On a cursory look, i don't see anything that prevents using the same flag but with different defaults in the code that is handling the flag.
Change the default version of OpenMP version flag to 1.1 for flang. Modify the flag description text. No changes for Clang code.
Hi Kiran, you were right. It is possible to set different value in code for the same flag. I updated the patch and I set the default value of OpenMP version to 1.1.
I updated only this patch and I did not change the previous patch: https://reviews.llvm.org/D150351 . Is it ok for you?
LGTM.
Target-related constructs came in as part of OpenMP 4.0. Would you want to have a different default for the device version?
Is this clang-format? Looks like a big block of unrelated changes (not against it).