Hi!
I suggest adding to the Rustc compiler support for the Propeller Post-Link time Optimization (PLO) as a step forward to the currently existing Profile-Guided Optimization (PGO) infrastructure.
You can think about Propeller as an alternative to the LLVM BOLT which is already can be used for Rust programs with cargo-pgo
. Propeller is an interesting alternative since it does not require an additional external tool for the optimization process (LLVM BOLT has such a "limitation"). Also, it helps to avoid the disassemble-assemble process which can be tricky for really large binaries (I already met some issues with optimizing ClickHouse binary with BOLT).
I have a bunch of hopefully helpful links about the topic:
- LLVM PR to support Propeller: ⚙ D68063 Propeller: LLVM support for basic block sections
- Clang PR to support Propeller: ⚙ D68049 Propeller: Clang options for basic block sections . I guess we need something similar on the Rustc side to be able to use Propeller
- Slides from Google and Meta about Propeller and BOLT (for a better understanding of the difference between them and some internal insights): Practical Compiler Optimizations for WSC Workshop @ US LLVM Dev Meeting 2023 - #2 by maksfb - US Developer Meeting - LLVM Discussion Forums
After adding Propeller support to the Rustc compiler, I suggest adding an additional mode to cargo-pgo
as it's already done for BOLT.
Mentioning here @Kobzol as a Rust PGO hero