Issue |
148759
|
Summary |
Document that ThinLTO parallelism is limited to the number of bitcode files
|
Labels |
new issue
|
Assignees |
|
Reporter |
nh2
|
The documentation on https://clang.llvm.org/docs/ThinLTO.html says
> all transformations, including function importing, occur later when the modules are optimized in fully parallel backends
>
> the ThinLTO link step will launch as many threads in parallel as there are cores
so I had high hopes that ThinLTO would allow to achieve very fast [unity builds](https://en.wikipedia.org/wiki/Unity_build), because optimisation would be "parallel".
However, testing it, I noticed that there is no pallelism in that case. I observed that **the linker only spawns as many threads as there were `.o` files** created during the bitcode-creation steps.
This meant that, contrary to my hopes, **ThinLTO can never compile faster than a normal non-ThinLTO build.**
Is this expected / as designed, or could it be made faster (e.g. per-function optimisation parallelism)?
If it is as designed, it would be great to document this constraint on that page.
CC @teresajohnson
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs