[libc-commits] [PATCH] D153232: [libc] Disable atomic optimizations for `libc` AMDGPU builds

Joseph Huber via Phabricator via libc-commits libc-commits at lists.llvm.org
Sun Jun 18 15:50:13 PDT 2023


jhuber6 created this revision.
jhuber6 added reviewers: JonChesterfield, jplehr, sivachandra, lntue, pravinjagtap.
Herald added subscribers: libc-commits, kerbowa, tpr, dstuttard, yaxunl, jvesely, kzhuravl.
Herald added projects: libc-project, All.
jhuber6 requested review of this revision.
Herald added a subscriber: wdng.

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 <https://reviews.llvm.org/D152649>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D153232

Files:
  libc/startup/gpu/amdgpu/CMakeLists.txt


Index: libc/startup/gpu/amdgpu/CMakeLists.txt
===================================================================
--- libc/startup/gpu/amdgpu/CMakeLists.txt
+++ libc/startup/gpu/amdgpu/CMakeLists.txt
@@ -26,4 +26,7 @@
   "--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"
 )


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153232.532490.patch
Type: text/x-patch
Size: 490 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230618/cfe546e8/attachment.bin>


More information about the libc-commits mailing list