[lld] [llvm] [lld][MachO] Follow-up to use madvise() for threaded file page-in. (PR #157917)
Alexandre Ganea via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 28 07:00:43 PDT 2025
https://github.com/aganea commented:
As a general comment for this PR, we avoid usually `#ifdefs in code. I think you can write this entire PR without ever using any `#ifdef LLVM_ENABLE_THREADS`; either by leaving the code active at all times, or by using existing LLVM APIs that already support that flag. An example of this is `llvm::get_threadpool_strategy` which falls back to not using threads when `LLVM_ENABLE_THREADS` is set. Similarly, `ThreadPool` does the same thing. Also, all places where we test for `if (config->readWorkers)` we could also test for `llvm_is_multithreaded()`.
https://github.com/llvm/llvm-project/pull/157917
More information about the llvm-commits
mailing list