aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Lex/ModuleMap.cpp
diff options
context:
space:
mode:
authorJoseph Huber <jhuber6@vols.utk.edu>2022-10-05 11:03:24 -0500
committerJoseph Huber <jhuber6@vols.utk.edu>2022-10-05 14:40:01 -0500
commit92233159035d1b50face95d886901cf99035bd99 (patch)
treedb3253054e300745db8095a1c19104e4c4f0f228 /clang/lib/Lex/ModuleMap.cpp
parenta8ec170e01dd0d0cbf8c059aa7addaaf3d886876 (diff)
downloadllvm-92233159035d1b50face95d886901cf99035bd99.zip
llvm-92233159035d1b50face95d886901cf99035bd99.tar.gz
llvm-92233159035d1b50face95d886901cf99035bd99.tar.bz2
[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
Diffstat (limited to 'clang/lib/Lex/ModuleMap.cpp')
0 files changed, 0 insertions, 0 deletions