[PATCH] D89085: [llvm] Update default cutoff threshold for machine function splitter.

Snehasish Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 8 18:14:43 PDT 2020


snehasish updated this revision to Diff 297095.
snehasish added a comment.

Add a FIXME to move defaults to TTI.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89085/new/

https://reviews.llvm.org/D89085

Files:
  llvm/lib/CodeGen/MachineFunctionSplitter.cpp
  llvm/test/CodeGen/X86/machine-function-splitter.ll


Index: llvm/test/CodeGen/X86/machine-function-splitter.ll
===================================================================
--- llvm/test/CodeGen/X86/machine-function-splitter.ll
+++ llvm/test/CodeGen/X86/machine-function-splitter.ll
@@ -1,5 +1,5 @@
 ; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -split-machine-functions | FileCheck %s -check-prefix=MFS-DEFAULTS
-; 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
+; 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
 ; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -split-machine-functions -mfs-psi-cutoff=950000 | FileCheck %s -check-prefix=MFS-OPTS2
 
 define void @foo1(i1 zeroext %0) nounwind !prof !14 !section_prefix !15 {
Index: llvm/lib/CodeGen/MachineFunctionSplitter.cpp
===================================================================
--- llvm/lib/CodeGen/MachineFunctionSplitter.cpp
+++ llvm/lib/CodeGen/MachineFunctionSplitter.cpp
@@ -39,11 +39,13 @@
 
 using namespace llvm;
 
+// FIXME: This cutoff value is cpu dependent and should be moved to TTI once we
+// consider enabling this on other platforms.
 static cl::opt<unsigned>
     PercentileCutoff("mfs-psi-cutoff",
                      cl::desc("Percentile profile summary cutoff used to "
                               "determine cold blocks. Unused if set to zero."),
-                     cl::init(0), cl::Hidden);
+                     cl::init(999950), cl::Hidden);
 
 static cl::opt<unsigned> ColdCountThreshold(
     "mfs-count-threshold",


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89085.297095.patch
Type: text/x-patch
Size: 1718 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201009/389da13f/attachment.bin>


More information about the llvm-commits mailing list