[llvm-dev] LLD: time to enable --threads by default

Rafael EspĂ­ndola via llvm-dev llvm-dev at lists.llvm.org
Thu Nov 17 13:20:28 PST 2016


>
> Thank you for the explanation! That makes sense.
>
> Unlike ThinLTO, each thread in LLD consumes very small amount of memory
> (probably just a few megabytes), so that's not a problem for me. At the
> final stage of linking, we spawn threads to copy section contents and apply
> relocations, and I guess that causes a lot of memory traffic because that's
> basically memcpy'ing input files to an output file, so the memory bandwidth
> could be a limiting factor there. But I do not see a reason to limit the
> number of threads to the number of physical core. For LLD, it seems like we
> can just spawn as many threads as HT provides.


It is quite common for SMT to *not* be profitable. I did notice some
small wins by not using it. On an intel machine you can do a quick
check by running with half the threads since they always have 2x SMT.


Cheers,
Rafael


More information about the llvm-dev mailing list