llvm-project/openmp/libomptarget/DeviceRTL/include
Joseph Huber 9223315903 [DeviceRTL] Allow IsSPMDMode to be optimized out in LTO mode
A previous patch merged the static and bitcode versions of the
deviceRTL. We previously used the static library's separate compilation
to set a special flag that prevented `IsSPMDMode` from being put in the
used list and preventing it from being optimized out. When they were
merged we could no longer do this separate compilation that allowed
users of LTO to get more optimal code.

This patch rearranges the code. The `IsSPMDMode` global is now
transitively used by its inclusion in the changed `__keep_alive`
function. This allows us to then manually delete the `__keep_alive`
function from the module when building the static library via
`llvm-extract`. The result is that the bitcode library correctly will
maintain the needed shared state, while the static library will be able
to internalize it and optimize it out.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D135280
2022-10-05 14:40:01 -05:00
..
Configuration.h [OpenMP] Add option to assert no nested OpenMP parallelism on the GPU 2022-08-23 14:09:51 -05:00
Debug.h [OpenMP][DeviceRTL] Implement libc function `memcmp` 2022-08-04 14:37:54 -04:00
Interface.h Revert "[OpenMP] Codegen aggregate for outlined function captures" 2022-09-15 03:08:46 +00:00
LibC.h [OpenMP][DeviceRTL] Implement libc function `memcmp` 2022-08-04 14:37:54 -04:00
Mapping.h [Libomptarget] Allow the device runtime to be compiled for the host 2022-05-13 14:38:27 -04:00
State.h [OpenMP] Eliminate the ThreadStates array in favor of indirection 2022-10-04 20:27:34 -07:00
Synchronization.h [OpenMP] Introduce more atomic operations into the runtime 2022-10-04 20:20:55 -07:00
Types.h [DeviceRTL] Allow IsSPMDMode to be optimized out in LTO mode 2022-10-05 14:40:01 -05:00
Utils.h [OpenMP] Introduce more atomic operations into the runtime 2022-10-04 20:20:55 -07:00
generated_microtask_cases.gen Revert "[OpenMP] Codegen aggregate for outlined function captures" 2022-09-15 03:08:46 +00:00