Proposed Multi-Thread Parallel Compilation "MTPC" For LLVM Is Great News
([LLVM] 6 Hours Ago
Multi-Thread Parallel Compilation)
- Reference: 0001635174
- News link: https://www.phoronix.com/news/LLVM-ThinLTO-MTPC-Proposal
- Source link:
A new proposal volleyed today among LLVM developers is for Multi-Thread Parallel Compilation "MTPC" for the ThinLTO link-time optimization code. This is great news for today's high core count CPUs when looking to compile very large LLVM modules.
LLVM ThinLTO currently provides module-level parallelism but for very large modules this can be a compilation bottleneck with today's processors given that code generation and optimizations within individual LLVM modules is largely serialized.
What's being proposed now is Multi-Thread Parallel Compilation for LLVM's ThinLTO to offer intra-module parallelism. MTPC can split modules at the function level for parallel code generation to avoid lengthy compilation times on large modules and better exploit the multi-core potential of today's processors.
Experimental results with this Multi-Thread Parallel Compilation are showing very nice results with up to a 32% total time reduction on a full application going through a full build.
Those interested can see [1]this LLVM Discourse thread with the initial proposal. There already are a few pull requests open for laying out the foundation of Multi-Thread Parallel Compilation.
[1] https://discourse.llvm.org/t/rfc-thinlto-multi-thread-parallel-compilation-for-large-modules/90877
LLVM ThinLTO currently provides module-level parallelism but for very large modules this can be a compilation bottleneck with today's processors given that code generation and optimizations within individual LLVM modules is largely serialized.
What's being proposed now is Multi-Thread Parallel Compilation for LLVM's ThinLTO to offer intra-module parallelism. MTPC can split modules at the function level for parallel code generation to avoid lengthy compilation times on large modules and better exploit the multi-core potential of today's processors.
Experimental results with this Multi-Thread Parallel Compilation are showing very nice results with up to a 32% total time reduction on a full application going through a full build.
Those interested can see [1]this LLVM Discourse thread with the initial proposal. There already are a few pull requests open for laying out the foundation of Multi-Thread Parallel Compilation.
[1] https://discourse.llvm.org/t/rfc-thinlto-multi-thread-parallel-compilation-for-large-modules/90877