[OpenMP] Make the exec_mode global have protected visibility
authorJoseph Huber <jhuber6@vols.utk.edu>
Wed, 5 Oct 2022 17:08:22 +0000 (12:08 -0500)
committerJoseph Huber <jhuber6@vols.utk.edu>
Wed, 5 Oct 2022 19:39:22 +0000 (14:39 -0500)
commita8ec170e01dd0d0cbf8c059aa7addaaf3d886876
treee265ded3e68b91ae1c25728e5f67d44e02f016e9
parent5f7f4846e826f97c7f298fe419c958398d5a0386
[OpenMP] Make the exec_mode global have protected visibility

We use protected visibility for almost everything with offloading. This
is because it provides us with the ability to read things from the host
without the expectation that it will be preempted by a shared library
load, bugs related to this have happened when offloading to the host.
This patch just makes the `exec_mode` global generated for each plugin
have protected visibility.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D135285
clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp
clang/test/OpenMP/nvptx_target_parallel_proc_bind_codegen.cpp
clang/test/OpenMP/nvptx_target_parallel_reduction_codegen.cpp
clang/test/OpenMP/nvptx_target_simd_codegen.cpp
clang/test/OpenMP/nvptx_target_teams_distribute_simd_codegen.cpp