Page MenuHomePhabricator

[OpenMP] Extend the lit test for uses_allocators in target region
ClosedPublic

Authored by animeshk-amd on Aug 29 2022, 8:14 AM.

Details

Summary

This patch improves the LIT tests on the following :

  1. The test on uses_allocators clause in the target region by adding the respective CHECK lines. Allocator omp_thread_mem_alloc is also added in the test.
  2. The defaultmap clause wasn't being tested for the variable-category scalar and the implicit-behavior tofrom with respect to the OpenMP default version.

These improvements are inspired from SOLLVE tests.
SOLLVE repo: https://github.com/SOLLVE/sollve_vv

Diff Detail

Event Timeline

animeshk-amd created this revision.Aug 29 2022, 8:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 29 2022, 8:14 AM
animeshk-amd requested review of this revision.Aug 29 2022, 8:14 AM
Herald added a project: Restricted Project. · View Herald Transcript

Extended the LIT test for defaultmap clause in the target region
with respect to the default OpenMP version.

Updated the LIT test for omp_thread_mem_alloc allocator

Rebased the patch.

animeshk-amd edited the summary of this revision. (Show Details)Oct 4 2022, 3:16 AM
jdoerfert added inline comments.Oct 4 2022, 5:31 AM
clang/test/OpenMP/target_map_codegen_10.cpp
13

What does this test?

clang/test/OpenMP/target_uses_allocators.c
42

This should go into the _messages test case

animeshk-amd added inline comments.Oct 5 2022, 9:31 PM
clang/test/OpenMP/target_map_codegen_10.cpp
13

This test was originally testing the respective directives only for the OpenMP version 4.5. I have updated new RUN lines for the default version(5.0 as of now) because there were differences in the generated IR in case of the default version.

clang/test/OpenMP/target_uses_allocators.c
42

The code needs to be tested for the generated IR(but as a side effect it also generates a warning), that's why I had to put the expected-warning clause. Since I had to write CHECK lines, I didn't put this in the _messages test. That said, should I still put this into the _messages test along with the required CHECK lines?

jdoerfert accepted this revision.Oct 6 2022, 6:44 AM

LG

clang/test/OpenMP/target_map_codegen_10.cpp
13

I see. Makes sense.

clang/test/OpenMP/target_uses_allocators.c
42

I am not really sure about the warning to begin with but I get your point about placement.
I'm ok with this for now and we revisit this as the next OpenMP TR is going to clarify the allocate traits anyway.

This revision is now accepted and ready to land.Oct 6 2022, 6:44 AM

Another patch that landed after this patch introduced merge
conflicts in the target_map_codegen_10.cpp with regards to the
use of the -no-opaque-pointers. Those merge conflicts are
fixed in the revision.

This revision was landed with ongoing or failed builds.Oct 14 2022, 6:43 AM
This revision was automatically updated to reflect the committed changes.