aboutsummaryrefslogtreecommitdiff
path: root/libc/startup
diff options
context:
space:
mode:
authorJoseph Huber <jhuber6@vols.utk.edu>2023-06-19 03:25:37 -0500
committerJoseph Huber <jhuber6@vols.utk.edu>2023-06-19 03:25:51 -0500
commit5a8fc419379faa517e614c55b0b27de59572019d (patch)
tree34cd7e61acfff90caee7dab264350b4bd77284bc /libc/startup
parent0eb0fecbc544a0416b70f4450a38dfb27c9b5b9a (diff)
downloadllvm-5a8fc419379faa517e614c55b0b27de59572019d.zip
llvm-5a8fc419379faa517e614c55b0b27de59572019d.tar.gz
llvm-5a8fc419379faa517e614c55b0b27de59572019d.tar.bz2
[libc] Disable atomic optimizations for `libc` AMDGPU builds
Recently the AMDGPU backend automatically enables a pass to optimize atomics. This results in the LTO build taking about 10x longer in all cases. For now we disable this by default as was the case before the patch in D152649. Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D153232
Diffstat (limited to 'libc/startup')
-rw-r--r--libc/startup/gpu/amdgpu/CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/libc/startup/gpu/amdgpu/CMakeLists.txt b/libc/startup/gpu/amdgpu/CMakeLists.txt
index e7c0aea..b54dc37 100644
--- a/libc/startup/gpu/amdgpu/CMakeLists.txt
+++ b/libc/startup/gpu/amdgpu/CMakeLists.txt
@@ -26,4 +26,7 @@ target_link_libraries(
"--target=${LIBC_GPU_TARGET_TRIPLE}"
"-flto"
"-Wl,-mllvm,-amdgpu-lower-global-ctor-dtor=0"
+ # FIXME: This pass causes builds to take ~10x longer. Disable until the
+ # performance problems have been addressed.
+ "-Wl,-mllvm,-amdgpu-atomic-optimizations=0"
)