Skip to content

Commit cb1e86c

Browse files
author
git apple-llvm automerger
committed
Merge commit 'f5d290db5eda' from apple/main into swift/next
2 parents 416990f + f5d290d commit cb1e86c

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

llvm/lib/CodeGen/MachineFunctionSplitter.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,18 @@
3939

4040
using namespace llvm;
4141

42+
// FIXME: This cutoff value is CPU dependent and should be moved to
43+
// TargetTransformInfo once we consider enabling this on other platforms.
44+
// The value is expressed as a ProfileSummaryInfo integer percentile cutoff.
45+
// Defaults to 999950, i.e. all blocks colder than 99.995 percentile are split.
46+
// The default was empirically determined to be optimal when considering cutoff
47+
// values between 99%-ile to 100%-ile with respect to iTLB and icache metrics on
48+
// Intel CPUs.
4249
static cl::opt<unsigned>
4350
PercentileCutoff("mfs-psi-cutoff",
4451
cl::desc("Percentile profile summary cutoff used to "
4552
"determine cold blocks. Unused if set to zero."),
46-
cl::init(0), cl::Hidden);
53+
cl::init(999950), cl::Hidden);
4754

4855
static cl::opt<unsigned> ColdCountThreshold(
4956
"mfs-count-threshold",

llvm/test/CodeGen/X86/machine-function-splitter.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -split-machine-functions | FileCheck %s -check-prefix=MFS-DEFAULTS
2-
; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -split-machine-functions -mfs-count-threshold=2000 | FileCheck %s --dump-input=always -check-prefix=MFS-OPTS1
2+
; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -split-machine-functions -mfs-psi-cutoff=0 -mfs-count-threshold=2000 | FileCheck %s --dump-input=always -check-prefix=MFS-OPTS1
33
; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -split-machine-functions -mfs-psi-cutoff=950000 | FileCheck %s -check-prefix=MFS-OPTS2
44

55
define void @foo1(i1 zeroext %0) nounwind !prof !14 !section_prefix !15 {

0 commit comments

Comments
 (0)