Page MenuHomePhabricator

[OpenMP] Update the default version of OpenMP to 5.1
AcceptedPublic

Authored by animeshk-amd on Jul 13 2022, 5:23 AM.

Details

Summary

The default version of OpenMP is updated from 5.0 to 5.1 which means if -fopenmp is specified but -fopenmp-version is not specified with clang, the default version of OpenMP is taken to be 5.1. After modifying the Frontend for that, various LIT tests were updated. This patch contains all such changes. At a high level, these are the patterns of changes observed in LIT tests -

  1. RUN lines which mentioned -fopenmp-version=50 need to kept only if the IR for version 5.0 and 5.1 are different. Otherwise only one RUN line with no version info(i.e. default version) needs to be there.
  2. Test cases of this sort already had the RUN lines with respect to the older default version 5.0 and the version 5.1. Only swapping the version specification flag -fopenmp-version from newer version RUN line to older version RUN line is required.
  3. Diagnostics: Remove the 5.0 version specific RUN lines if there was no difference in the Diagnostics messages with respect to the default 5.1.
  4. Diagnostics: In case there was any difference in diagnostics messages between 5.0 and 5.1, mention version specific messages in tests.
  5. If the test contained version specific ifdef's e.g. "#ifdef OMP5" but there were no RUN lines for any other version than 5.X, then bring the code guarded by ifdef's outside and remove the ifdef's.
  6. Some tests had RUN lines for both 5.0 and 5.1 versions, but it is found that the IR for 5.0 is not different from the 5.1, therefore such RUN lines are redundant. So, such duplicated lines are removed.
  7. To generate CHECK lines automatically, use the script llvm/utils/update_cc_test_checks.py

Diff Detail

Event Timeline

animeshk-amd created this revision.Jul 13 2022, 5:23 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 13 2022, 5:23 AM
animeshk-amd requested review of this revision.Jul 13 2022, 5:23 AM
Herald added a project: Restricted Project. · View Herald Transcript

[OpenMP] lit tests are fixed to suppport the new default version of OpenMP

If -fopenmp is specified but -fopenmp-version is not specified with clang, the default version of OpenMP is taken to be 5.1. In this revision, the lit tests which were not suitable to support the version update or were failing have been fixed.

This revision is now accepted and ready to land.Jul 20 2022, 5:32 AM

[OpenMP] Update remaining tests for OpenMP version update to 5.1

animeshk-amd edited the summary of this revision. (Show Details)Jul 26 2022, 9:04 PM
animeshk-amd edited the summary of this revision. (Show Details)

[OpenMP] Update more LIT tests to support OpenMP version upgrade

Some more LIT tests which were specifying version information in RUN
lines have been modified.

saiislam accepted this revision.Jul 27 2022, 6:53 AM

Thanks, LGTM!

In the multi-company OpenMP meeting, it was decided to defer this update.
So, please don't land this patch yet.