Auto merge of #119418 - aaupov:master, r=Kobzol

[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).
This commit is contained in:
bors 2024-03-16 11:18:39 +00:00
commit 9023f908cf

View File

@ -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