2 ms·
No. LLVM is not amenable to using multiple threads to compile a single TU. The use-lists of global values (such as functions, global variables, or constant exp
by jcranmer 6y ago
No.
LLVM is not amenable to using multiple threads to compile a single TU. The use-lists of global values (such as functions, global variables, or constant expressions) include all uses from all functions, so parallelizing on a per-function basis requires acquiring locks (or some sort of lock-free data structure) to add, remove, or iterate these lists, which would considerable overhead on a relatively common operation.
If you want more details, you can read the recent thread on llvm-dev discussing this: http://lists.llvm.org/pipermail/llvm-dev/2020-March/139606.html http://lists.llvm.org/pipermail/llvm-dev/2020-March/139606.h...