]> git.lizzy.rs Git - rust.git/commit
Auto merge of #61268 - michaelwoerister:stabilize-pgo, r=alexcrichton
authorbors <bors@rust-lang.org>
Tue, 2 Jul 2019 20:00:29 +0000 (20:00 +0000)
committerbors <bors@rust-lang.org>
Tue, 2 Jul 2019 20:00:29 +0000 (20:00 +0000)
commit0beb2ba16a08dfa01569b5f4644da315dc4c806c
tree12d38055dab44d3af0739db03f498f7dd1ca4956
parent848e0a23f34aaab3e4a974b031c86ef2a4e4fcc1
parentb7fe2ca5e09b8edab393073198f8f55e1a78079f
Auto merge of #61268 - michaelwoerister:stabilize-pgo, r=alexcrichton

Stabilize support for Profile-guided Optimization

This PR makes profile-guided optimization available via the `-C profile-generate` / `-C profile-use` pair of commandline flags and adds end-user documentation for the feature to the [rustc book](https://doc.rust-lang.org/rustc/). The PR thus ticks the last two remaining checkboxes of the [stabilization tracking issue](https://github.com/rust-lang/rust/issues/59913).

From the tracking issue:
> Profile-guided optimization (PGO) is a common optimization technique for ahead-of-time compilers. It works by collecting data about a program's typical execution (e.g. probability of branches taken, typical runtime values of variables, etc) and then uses this information during program optimization for things like inlining decisions, machine code layout, or indirect call promotion.

If you are curious about how this can be used, there is a rendered version of the documentation this PR adds available [here](
https://github.com/michaelwoerister/rust/blob/stabilize-pgo/src/doc/rustc/src/profile-guided-optimization.md).

r? @alexcrichton
cc @rust-lang/compiler
src/librustc/session/config.rs
src/librustc/session/mod.rs
src/librustc_codegen_ssa/back/link.rs
src/librustc_codegen_ssa/back/symbol_export.rs