diff --git a/src/tools/opt-dist/src/bolt.rs b/src/tools/opt-dist/src/bolt.rs index f694c08f9b937..abc1763f3c2f7 100644 --- a/src/tools/opt-dist/src/bolt.rs +++ b/src/tools/opt-dist/src/bolt.rs @@ -71,6 +71,13 @@ pub fn bolt_optimize(path: &Utf8Path, profile: &BoltProfile) -> anyhow::Result<( .arg("-jump-tables=move") // Fold functions with identical code .arg("-icf=1") + // Perform indirect call promotion on calls and jump tables + .arg("-indirect-call-promotion=all") + // Optimize stack frame accesses + .arg("-frame-opt=hot") + // Inline functions smaller than 32 bytes + .arg("-inline-small-functions") + .arg("-inline-small-functions-bytes=32") // The following flag saves about 50 MiB of libLLVM.so size. // However, it succeeds very non-deterministically. To avoid frequent artifact size swings, // it is kept disabled for now.