Skip to content

Commit

Permalink
python: pgo-llvm-builder: Build with ThinLTO if performing BOLT
Browse files Browse the repository at this point in the history
Signed-off-by: Nathan Chancellor <[email protected]>
  • Loading branch information
nathanchance committed Nov 14, 2023
1 parent 6145194 commit 7ae7e8f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/pgo-llvm-builder/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,11 @@
# https://github.com/llvm/llvm-project/issues/55004)
# - We are on aarch64 with LLVM greater than or equal to 18.x (due to
# https://github.com/llvm/llvm-project/issues/71822)
# Enable ThinLTO if BOLT is enabled, as it adds more speed gains (but it
# appears to regress PGO's wins without BOLT)
maj_ver = int(VERSION.split('.', 1)[0])
if (maj_ver >= 16 and MACHINE == 'x86_64') or (maj_ver >= 18 and MACHINE == 'aarch64'):
build_cmd.append('--bolt')
build_cmd += ['--bolt', '--lto', 'thin']
subprocess.run(build_cmd, check=True)

llvm_tarball = Path(llvm_install.parent, f"{llvm_install.name}.tar")
Expand Down

0 comments on commit 7ae7e8f

Please sign in to comment.