[PATCH] D155731: [AIX] Define llvm::thread::DefaultStackSize to 4 megabytes on AIX

wael yehia via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 19 11:58:17 PDT 2023


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGf94608a16489: Define llvm::thread::DefaultStackSize to 4 megabytes on AIX (authored by w2yehia).

Changed prior to commit:
  https://reviews.llvm.org/D155731?vs=542104&id=542140#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155731/new/

https://reviews.llvm.org/D155731

Files:
  llvm/lib/Support/Threading.cpp


Index: llvm/lib/Support/Threading.cpp
===================================================================
--- llvm/lib/Support/Threading.cpp
+++ llvm/lib/Support/Threading.cpp
@@ -83,6 +83,11 @@
   // the same interface as std::thread but requests the same stack size as the
   // main thread (8MB) before creation.
 const std::optional<unsigned> llvm::thread::DefaultStackSize = 8 * 1024 * 1024;
+#elif defined(_AIX)
+  // On AIX, the default pthread stack size limit is ~192k for 64-bit programs.
+  // This limit is easily reached when doing link-time thinLTO. AIX library
+  // developers have used 4MB, so we'll do the same.
+const std::optional<unsigned> llvm::thread::DefaultStackSize = 4 * 1024 * 1024;
 #else
 const std::optional<unsigned> llvm::thread::DefaultStackSize;
 #endif


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155731.542140.patch
Type: text/x-patch
Size: 789 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230719/485ceb48/attachment.bin>


More information about the llvm-commits mailing list