What is the current status of PGO support in Rust?

The PGO RFC looks abandoned:

https://github.com/rust-lang/rfcs/issues/1220

2 Likes

The toolling is in nightly, not sure state on anything more elaborate.

env RUSTFLAGS="-Z pgo-gen=target/pgo/pgo.profraw" cargo +nightly run --target-dir target/pgo/gen --release
rustup run nightly ../lib/rustlib/x86_64-unknown-linux-gnu/bin/llvm-profdata merge -o target/pgo/pgo.profdata target/pgo/pgo.profraw
env RUSTFLAGS="-Z pgo-use=target/pgo/pgo.profdata" cargo +nightly run --target-dir target/pgo --release
3 Likes