Skip to content

Commit

Permalink
[BOLT] Use CDSort and CDSplit
Browse files Browse the repository at this point in the history
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
aaupov committed Dec 29, 2023
1 parent 29abb90 commit 13ef6d4
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 13ef6d4

Please sign in to comment.