[PATCH] D103165: Threading: use independent llvm::thread implementation on Apple platforms to increase stack size

Duncan P. N. Exon Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 28 14:19:34 PDT 2021


dexonsmith added a comment.

In D103165#2786618 <https://reviews.llvm.org/D103165#2786618>, @t.p.northover wrote:

>> I guess one option would be to never use std::thread, and repurpose the guts of llvm_execute_on_thread_impl to implement a cross-platform llvm::thread that allows specifying the stack size as an optional constructor parameter (and then change llvm_execute_on_thread to use llvm::thread). WDYT?
>
> The `llvm_execute_on_thread` family only seems to have three users and is definitely a less appealing interface, I'd be very tempted round this `llvm::thread` out as you suggest and switch all users to it.

SGTM; not sure if there'll be other opinions, but it does seem like a nice general cleanup. Also this way llvm::thread users that don't need full-sized stacks can continue getting the Darwin default of smaller pages.


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

https://reviews.llvm.org/D103165



More information about the llvm-commits mailing list