Skip to content

Commit

Permalink
Auto merge of #119418 - aaupov:master, r=Kobzol
Browse files Browse the repository at this point in the history
[BOLT] Use CDSort and CDSplit

CDSort and CDSplit are the most recent versions of function ordering and function splitting algorithms with some improvements over the previous baseline (ext-tsp and two-way splitting).
  • Loading branch information
bors committed Mar 16, 2024
2 parents 774ae59 + 13ef6d4 commit 9023f90
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/tools/opt-dist/src/bolt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,11 @@ pub fn bolt_optimize(path: &Utf8Path, profile: &BoltProfile) -> anyhow::Result<(
// Reorder basic blocks within functions
.arg("-reorder-blocks=ext-tsp")
// Reorder functions within the binary
.arg("-reorder-functions=hfsort+")
.arg("-reorder-functions=cdsort")
// Split function code into hot and code regions
.arg("-split-functions")
// Split using best available strategy (three-way splitting, Cache-Directed Sort)
.arg("-split-strategy=cdsplit")
// Split as many basic blocks as possible
.arg("-split-all-cold")
// Move jump tables to a separate section
Expand Down

0 comments on commit 9023f90

Please sign in to comment.