Skip to content

Commit

Permalink
Merge pull request #252 from nathanchance/update-bolt-flags
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanchance authored Nov 9, 2023
2 parents 5931a24 + fc439f9 commit 88b1d7e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tc_build/llvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,17 +115,20 @@ def bolt_clang(self):
self.bolt_builder.bolt_sampling_output.unlink()

# Now actually optimize clang
bolt_readme = Path(self.folders.source, 'bolt/README.md').read_text(encoding='utf-8')
use_cache_plus = '-reorder-blocks=cache+' in bolt_readme
use_sf_val = '-split-functions=2' in bolt_readme
clang_opt_cmd = [
self.tools.llvm_bolt,
f"--data={bolt_profile}",
'--dyno-stats',
'--icf=1',
'-o',
clang_bolt,
'--reorder-blocks=cache+',
f"--reorder-blocks={'cache+' if use_cache_plus else 'ext-tsp'}",
'--reorder-functions=hfsort+',
'--split-all-cold',
'--split-functions=3',
f"--split-functions{'=3' if use_sf_val else ''}",
'--use-gnu-stack',
clang,
]
Expand Down

0 comments on commit 88b1d7e

Please sign in to comment.