llvm-project/lld/test/wasm/lto
Alexandre Ganea 09158252f7 [ThinLTO] Allow usage of all hardware threads in the system
Before this patch, it wasn't possible to extend the ThinLTO threads to all SMT/CMT threads in the system. Only one thread per core was allowed, instructed by usage of llvm::heavyweight_hardware_concurrency() in the ThinLTO code. Any number passed to the LLD flag /opt:lldltojobs=..., or any other ThinLTO-specific flag, was previously interpreted in the context of llvm::heavyweight_hardware_concurrency(), which means SMT disabled.

One can now say in LLD:
/opt:lldltojobs=0 -- Use one std::thread / hardware core in the system (no SMT). Default value if flag not specified.
/opt:lldltojobs=N -- Limit usage to N threads, regardless of usage of heavyweight_hardware_concurrency().
/opt:lldltojobs=all -- Use all hardware threads in the system. Equivalent to /opt:lldltojobs=$(nproc) on Linux and /opt:lldltojobs=%NUMBER_OF_PROCESSORS% on Windows. When an affinity mask is set for the process, threads will be created only for the cores selected by the mask.

When N > number-of-hardware-threads-in-the-system, the threads in the thread pool will be dispatched equally on all CPU sockets (tested only on Windows).
When N <= number-of-hardware-threads-on-a-CPU-socket, the threads will remain on the CPU socket where the process started (only on Windows).

Differential Revision: https://reviews.llvm.org/D75153
2020-03-27 10:20:58 -04:00
..
Inputs [lld][WebAssembly] Fail if bitcode objects are pulled in after LTO 2020-02-11 17:36:15 -08:00
archive.ll [WebAssebmly] Allow __wasm_call_ctors to be GC'ed 2019-03-01 22:35:47 +00:00
atomics.ll [WebAssembly] Remove uses of ThreadModel 2019-02-28 18:39:08 +00:00
cache.ll [test] Mark atime-based tests unsupported on NetBSD 2018-12-07 16:21:08 +00:00
comdat.ll [WebAssembly] Improve lto/comdat.ll test. NFC. 2019-06-05 21:08:30 +00:00
diagnostics.ll [LTO] Errors in LLVM backend should manifest as lld errors 2018-07-02 21:01:43 +00:00
export.ll [WebAssembly] Don't export __data_end and __heap_base by default. 2019-05-31 22:51:59 +00:00
import-attributes.ll [lld][WebAssebmly] Preserve custom import attributes with LTO 2019-10-17 05:16:54 +00:00
incompatible.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
internalize-basic.ll
libcall-archive.ll [lld][WebAssembly] Add libcall symbols to the link when LTO is being used. 2020-01-10 11:01:05 -08:00
libcall-truncsfhf2.ll [lld][WebAssembly] Fail if bitcode objects are pulled in after LTO 2020-02-11 17:36:15 -08:00
lto-start.ll [WebAssebmly] Allow __wasm_call_ctors to be GC'ed 2019-03-01 22:35:47 +00:00
opt-level.ll [WebAssembly] Use wasm-ld rather than lld with -flavor in tests. NFC. 2019-02-05 16:53:33 +00:00
parallel.ll
relocatable-undefined.ll [WebAssembly] Fix crash with LTO + relocatable + undefined symbols 2019-01-30 18:55:15 +00:00
relocatable.ll [test] Change llvm-readobj -long-option to --long-option or well-known short options. NFC 2019-05-01 05:49:01 +00:00
save-temps.ll
signature-mismatch.ll [WebAssembly] Don't generate invalid modules when function signatures mismatch 2019-02-20 23:19:31 +00:00
thinlto.ll [ThinLTO] Allow usage of all hardware threads in the system 2020-03-27 10:20:58 -04:00
undef.ll [WebAssembly] Fix signatures of undefined function in LTO object which are not called directly. 2019-05-29 15:36:42 +00:00
used.ll [WebAssebmly] Allow __wasm_call_ctors to be GC'ed 2019-03-01 22:35:47 +00:00
verify-invalid.ll
weak-undefined.ll [WebAssembly] Refactor handling of weak undefined functions. NFC. 2019-02-07 22:42:16 +00:00
weak.ll [test] Change llvm-readobj -long-option to --long-option or well-known short options. NFC 2019-05-01 05:49:01 +00:00