[HotColdSplit] Simplify tests by lowering their splitting thresholds

This gets rid of the brittle/mysterious calls to @sink()/@sideeffect()
peppered throughout the test cases. They are no longer needed to force
splitting to occur.

llvm-svn: 351480
diff --git a/llvm/lib/Transforms/IPO/HotColdSplitting.cpp b/llvm/lib/Transforms/IPO/HotColdSplitting.cpp
index 924a7d5..d0f3fdf 100644
--- a/llvm/lib/Transforms/IPO/HotColdSplitting.cpp
+++ b/llvm/lib/Transforms/IPO/HotColdSplitting.cpp
@@ -69,9 +69,9 @@
                               cl::init(true), cl::Hidden);
 
 static cl::opt<int>
-    MinOutliningThreshold("min-outlining-thresh", cl::init(3), cl::Hidden,
-                          cl::desc("Code size threshold for outlining within a "
-                                   "single BB (as a multiple of TCC_Basic)"));
+    SplittingThreshold("hotcoldsplit-threshold", cl::init(3), cl::Hidden,
+                       cl::desc("Code size threshold for splitting cold code "
+                                "(as a multiple of TCC_Basic)"));
 
 namespace {
 
@@ -131,6 +131,11 @@
 /// Check whether \p Region is profitable to outline.
 static bool isProfitableToOutline(const BlockSequence &Region,
                                   TargetTransformInfo &TTI) {
+  // If the splitting threshold is set at or below zero, skip the usual
+  // profitability check.
+  if (SplittingThreshold <= 0)
+    return true;
+
   if (Region.size() > 1)
     return true;
 
@@ -142,7 +147,7 @@
 
     Cost += TTI.getInstructionCost(&I, TargetTransformInfo::TCK_CodeSize);
 
-    if (Cost >= (MinOutliningThreshold * TargetTransformInfo::TCC_Basic))
+    if (Cost >= (SplittingThreshold * TargetTransformInfo::TCC_Basic))
       return true;
   }
   return false;