[libc-commits] [libc] 5a8fc41 - [libc] Disable atomic optimizations for `libc` AMDGPU builds
Joseph Huber via libc-commits
libc-commits at lists.llvm.org
Mon Jun 19 01:26:01 PDT 2023
Author: Joseph Huber
Date: 2023-06-19T03:25:51-05:00
New Revision: 5a8fc419379faa517e614c55b0b27de59572019d
URL: https://github.com/llvm/llvm-project/commit/5a8fc419379faa517e614c55b0b27de59572019d
DIFF: https://github.com/llvm/llvm-project/commit/5a8fc419379faa517e614c55b0b27de59572019d.diff
LOG: [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
Added:
Modified:
libc/startup/gpu/amdgpu/CMakeLists.txt
Removed:
################################################################################
diff --git a/libc/startup/gpu/amdgpu/CMakeLists.txt b/libc/startup/gpu/amdgpu/CMakeLists.txt
index e7c0aeafafd9a..b54dc377a629b 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"
)
More information about the libc-commits
mailing list