[llvm] r351480 - [HotColdSplit] Simplify tests by lowering their splitting thresholds
Vedant Kumar via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 17 13:29:35 PST 2019
Author: vedantk
Date: Thu Jan 17 13:29:34 2019
New Revision: 351480
URL: http://llvm.org/viewvc/llvm-project?rev=351480&view=rev
Log:
[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.
Added:
llvm/trunk/test/Transforms/HotColdSplit/X86/do-not-split.ll
llvm/trunk/test/Transforms/HotColdSplit/X86/extraction-subregion-breaks-phis.ll
Removed:
llvm/trunk/test/Transforms/HotColdSplit/do-not-split.ll
llvm/trunk/test/Transforms/HotColdSplit/extraction-subregion-breaks-phis.ll
Modified:
llvm/trunk/lib/Transforms/IPO/HotColdSplitting.cpp
llvm/trunk/test/Transforms/HotColdSplit/X86/outline-expensive.ll
llvm/trunk/test/Transforms/HotColdSplit/delete-use-without-def-dbg-val.ll
llvm/trunk/test/Transforms/HotColdSplit/duplicate-phi-preds-crash.ll
llvm/trunk/test/Transforms/HotColdSplit/eh-pads.ll
llvm/trunk/test/Transforms/HotColdSplit/eh-typeid-for.ll
llvm/trunk/test/Transforms/HotColdSplit/forward-dfs-reaches-marked-block.ll
llvm/trunk/test/Transforms/HotColdSplit/lifetime-markers-on-inputs.ll
llvm/trunk/test/Transforms/HotColdSplit/mark-the-whole-func-cold.ll
llvm/trunk/test/Transforms/HotColdSplit/minsize.ll
llvm/trunk/test/Transforms/HotColdSplit/multiple-exits.ll
llvm/trunk/test/Transforms/HotColdSplit/noreturn.ll
llvm/trunk/test/Transforms/HotColdSplit/outline-cold-asm.ll
llvm/trunk/test/Transforms/HotColdSplit/outline-disjoint-diamonds.ll
llvm/trunk/test/Transforms/HotColdSplit/outline-if-then-else.ll
llvm/trunk/test/Transforms/HotColdSplit/outline-multiple-entry-region.ll
llvm/trunk/test/Transforms/HotColdSplit/outline-while-loop.ll
llvm/trunk/test/Transforms/HotColdSplit/phi-with-distinct-outlined-values.ll
llvm/trunk/test/Transforms/HotColdSplit/region-overlap.ll
llvm/trunk/test/Transforms/HotColdSplit/split-cold-2.ll
llvm/trunk/test/Transforms/HotColdSplit/split-out-dbg-val-of-arg.ll
llvm/trunk/test/Transforms/HotColdSplit/succ-block-with-self-edge.ll
llvm/trunk/test/Transforms/HotColdSplit/unwind.ll
Modified: llvm/trunk/lib/Transforms/IPO/HotColdSplitting.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/HotColdSplitting.cpp?rev=351480&r1=351479&r2=351480&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/HotColdSplitting.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/HotColdSplitting.cpp Thu Jan 17 13:29:34 2019
@@ -69,9 +69,9 @@ static cl::opt<bool> EnableStaticAnalyis
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 @@ static bool mayExtractBlock(const BasicB
/// 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 @@ static bool isProfitableToOutline(const
Cost += TTI.getInstructionCost(&I, TargetTransformInfo::TCK_CodeSize);
- if (Cost >= (MinOutliningThreshold * TargetTransformInfo::TCC_Basic))
+ if (Cost >= (SplittingThreshold * TargetTransformInfo::TCC_Basic))
return true;
}
return false;
Added: llvm/trunk/test/Transforms/HotColdSplit/X86/do-not-split.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/HotColdSplit/X86/do-not-split.ll?rev=351480&view=auto
==============================================================================
--- llvm/trunk/test/Transforms/HotColdSplit/X86/do-not-split.ll (added)
+++ llvm/trunk/test/Transforms/HotColdSplit/X86/do-not-split.ll Thu Jan 17 13:29:34 2019
@@ -0,0 +1,101 @@
+; RUN: opt -hotcoldsplit -hotcoldsplit-threshold=2 -S < %s | FileCheck %s
+
+target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-apple-macosx10.14.0"
+
+; Check that these functions are not split. Outlined functions are called from a
+; basic block named codeRepl.
+
+; The cold region is too small to split.
+; CHECK-LABEL: @foo
+; CHECK-NOT: foo.cold.1
+define void @foo() {
+entry:
+ br i1 undef, label %if.then, label %if.end
+
+if.then: ; preds = %entry
+ unreachable
+
+if.end: ; preds = %entry
+ ret void
+}
+
+; The cold region is still too small to split.
+; CHECK-LABEL: @bar
+; CHECK-NOT: bar.cold.1
+define void @bar() {
+entry:
+ br i1 undef, label %if.then, label %if.end
+
+if.then: ; preds = %entry
+ call void @sink()
+ ret void
+
+if.end: ; preds = %entry
+ ret void
+}
+
+; Make sure we don't try to outline the entire function.
+; CHECK-LABEL: @fun
+; CHECK-NOT: fun.cold.1
+define void @fun() {
+entry:
+ br i1 undef, label %if.then, label %if.end
+
+if.then: ; preds = %entry
+ br label %if.end
+
+if.end: ; preds = %entry
+ ret void
+}
+
+; Don't outline infinite loops.
+; CHECK-LABEL: @infinite_loop
+; CHECK-NOT: infinite_loop.cold.1
+define void @infinite_loop() {
+entry:
+ br label %loop
+
+loop:
+ call void @sink()
+ br label %loop
+}
+
+; Don't count debug intrinsics towards the outlining threshold.
+; CHECK-LABEL: @dont_count_debug_intrinsics
+; CHECK-NOT: dont_count_debug_intrinsics.cold.1
+define void @dont_count_debug_intrinsics(i32 %arg1) !dbg !6 {
+entry:
+ %var = add i32 0, 0, !dbg !11
+ br i1 undef, label %if.then, label %if.end
+
+if.then: ; preds = %entry
+ ret void
+
+if.end: ; preds = %entry
+ call void @llvm.dbg.value(metadata i32 %arg1, metadata !9, metadata !DIExpression()), !dbg !11
+ call void @llvm.dbg.value(metadata i32 %arg1, metadata !9, metadata !DIExpression()), !dbg !11
+ call void @sink()
+ ret void
+}
+
+declare void @llvm.dbg.value(metadata, metadata, metadata)
+
+declare void @sink() cold
+
+!llvm.dbg.cu = !{!0}
+!llvm.debugify = !{!3, !4}
+!llvm.module.flags = !{!5}
+
+!0 = distinct !DICompileUnit(language: DW_LANG_C, file: !1, producer: "debugify", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
+!1 = !DIFile(filename: "<stdin>", directory: "/")
+!2 = !{}
+!3 = !{i32 7}
+!4 = !{i32 1}
+!5 = !{i32 2, !"Debug Info Version", i32 3}
+!6 = distinct !DISubprogram(name: "dont_count_debug_intrinsics", linkageName: "dont_count_debug_intrinsics", scope: null, file: !1, line: 1, type: !7, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: true, unit: !0, retainedNodes: !8)
+!7 = !DISubroutineType(types: !2)
+!8 = !{!9}
+!9 = !DILocalVariable(name: "1", scope: !6, file: !1, line: 1, type: !10)
+!10 = !DIBasicType(name: "ty32", size: 32, encoding: DW_ATE_unsigned)
+!11 = !DILocation(line: 1, column: 1, scope: !6)
Added: llvm/trunk/test/Transforms/HotColdSplit/X86/extraction-subregion-breaks-phis.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/HotColdSplit/X86/extraction-subregion-breaks-phis.ll?rev=351480&view=auto
==============================================================================
--- llvm/trunk/test/Transforms/HotColdSplit/X86/extraction-subregion-breaks-phis.ll (added)
+++ llvm/trunk/test/Transforms/HotColdSplit/X86/extraction-subregion-breaks-phis.ll Thu Jan 17 13:29:34 2019
@@ -0,0 +1,63 @@
+; RUN: opt -S -hotcoldsplit -hotcoldsplit-threshold=1 < %s | FileCheck %s
+
+target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-apple-macosx10.14.0"
+
+; CHECK-LABEL: define {{.*}}@foo(
+; CHECK: call {{.*}}@foo.cold.1(
+; CHECK: unreachable
+
+; CHECK-LABEL: define {{.*}}@foo.cold.1(
+; CHECK: switch i32 undef, label %sw.epilog.i
+define void @foo(i32 %QMM) {
+entry:
+ switch i32 %QMM, label %entry.if.end16_crit_edge [
+ i32 1, label %if.then
+ ]
+
+entry.if.end16_crit_edge: ; preds = %entry
+ br label %if.end16
+
+if.then: ; preds = %entry
+ br i1 undef, label %cond.true.i.i, label %_ZN10StringView8popFrontEv.exit.i
+
+cond.true.i.i: ; preds = %if.then
+ ret void
+
+_ZN10StringView8popFrontEv.exit.i: ; preds = %if.then
+ switch i32 undef, label %sw.epilog.i [
+ i32 81, label %if.end16
+ i32 82, label %sw.bb4.i
+ i32 83, label %sw.bb8.i
+ i32 84, label %sw.bb12.i
+ i32 65, label %if.end16
+ i32 66, label %sw.bb20.i
+ i32 67, label %sw.bb24.i
+ i32 68, label %sw.bb28.i
+ ]
+
+sw.bb4.i: ; preds = %_ZN10StringView8popFrontEv.exit.i
+ br label %if.end16
+
+sw.bb8.i: ; preds = %_ZN10StringView8popFrontEv.exit.i
+ br label %if.end16
+
+sw.bb12.i: ; preds = %_ZN10StringView8popFrontEv.exit.i
+ br label %if.end16
+
+sw.bb20.i: ; preds = %_ZN10StringView8popFrontEv.exit.i
+ br label %if.end16
+
+sw.bb24.i: ; preds = %_ZN10StringView8popFrontEv.exit.i
+ br label %if.end16
+
+sw.bb28.i: ; preds = %_ZN10StringView8popFrontEv.exit.i
+ br label %if.end16
+
+sw.epilog.i: ; preds = %_ZN10StringView8popFrontEv.exit.i
+ br label %if.end16
+
+if.end16: ; preds = %sw.epilog.i, %sw.bb28.i, %sw.bb24.i, %sw.bb20.i, %sw.bb12.i, %sw.bb8.i, %sw.bb4.i, %_ZN10StringView8popFrontEv.exit.i, %_ZN10StringView8popFrontEv.exit.i, %entry.if.end16_crit_edge
+ %0 = phi i8 [ 0, %entry.if.end16_crit_edge ], [ 0, %_ZN10StringView8popFrontEv.exit.i ], [ 0, %_ZN10StringView8popFrontEv.exit.i ], [ 1, %sw.bb4.i ], [ 2, %sw.bb8.i ], [ 3, %sw.bb12.i ], [ 1, %sw.bb20.i ], [ 2, %sw.bb24.i ], [ 3, %sw.bb28.i ], [ 0, %sw.epilog.i ]
+ unreachable
+}
Modified: llvm/trunk/test/Transforms/HotColdSplit/X86/outline-expensive.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/HotColdSplit/X86/outline-expensive.ll?rev=351480&r1=351479&r2=351480&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/HotColdSplit/X86/outline-expensive.ll (original)
+++ llvm/trunk/test/Transforms/HotColdSplit/X86/outline-expensive.ll Thu Jan 17 13:29:34 2019
@@ -1,5 +1,5 @@
; The magic number 6 comes from (1 * TCC_Expensive) + (1 * CostOfCallX86).
-; RUN: opt -hotcoldsplit -min-outlining-thresh=6 -S < %s | FileCheck %s
+; RUN: opt -hotcoldsplit -hotcoldsplit-threshold=6 -S < %s | FileCheck %s
; Test that we outline even though there are only two cold instructions. TTI
; should determine that they are expensive in terms of code size.
Modified: llvm/trunk/test/Transforms/HotColdSplit/delete-use-without-def-dbg-val.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/HotColdSplit/delete-use-without-def-dbg-val.ll?rev=351480&r1=351479&r2=351480&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/HotColdSplit/delete-use-without-def-dbg-val.ll (original)
+++ llvm/trunk/test/Transforms/HotColdSplit/delete-use-without-def-dbg-val.ll Thu Jan 17 13:29:34 2019
@@ -1,4 +1,4 @@
-; RUN: opt -hotcoldsplit -S < %s | FileCheck %s
+; RUN: opt -hotcoldsplit -hotcoldsplit-threshold=0 -S < %s | FileCheck %s
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.14.0"
@@ -20,8 +20,6 @@ if.end:
; We expect this block to be outlined. That kills the definition of %var.
%var = add i32 0, 0, !dbg !11
call void @sink()
- call void @sink()
- call void @sink()
br label %cleanup
cleanup:
Removed: llvm/trunk/test/Transforms/HotColdSplit/do-not-split.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/HotColdSplit/do-not-split.ll?rev=351479&view=auto
==============================================================================
--- llvm/trunk/test/Transforms/HotColdSplit/do-not-split.ll (original)
+++ llvm/trunk/test/Transforms/HotColdSplit/do-not-split.ll (removed)
@@ -1,105 +0,0 @@
-; RUN: opt -hotcoldsplit -S < %s | FileCheck %s
-; RUN: opt -passes=hotcoldsplit -S < %s | FileCheck %s
-
-target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
-target triple = "x86_64-apple-macosx10.14.0"
-
-; Check that these functions are not split. Outlined functions are called from a
-; basic block named codeRepl.
-
-; The cold region is too small to split.
-; CHECK-LABEL: @foo
-; CHECK-NOT: foo.cold.1
-define void @foo() {
-entry:
- br i1 undef, label %if.then, label %if.end
-
-if.then: ; preds = %entry
- unreachable
-
-if.end: ; preds = %entry
- ret void
-}
-
-; The cold region is still too small to split.
-; CHECK-LABEL: @bar
-; CHECK-NOT: bar.cold.1
-define void @bar() {
-entry:
- br i1 undef, label %if.then, label %if.end
-
-if.then: ; preds = %entry
- call void @sink()
- call void @sink()
- ret void
-
-if.end: ; preds = %entry
- ret void
-}
-
-; Make sure we don't try to outline the entire function.
-; CHECK-LABEL: @fun
-; CHECK-NOT: fun.cold.1
-define void @fun() {
-entry:
- br i1 undef, label %if.then, label %if.end
-
-if.then: ; preds = %entry
- br label %if.end
-
-if.end: ; preds = %entry
- ret void
-}
-
-; Don't outline infinite loops.
-; CHECK-LABEL: @infinite_loop
-; CHECK-NOT: infinite_loop.cold.1
-define void @infinite_loop() {
-entry:
- br label %loop
-
-loop:
- call void @sink()
- call void @sink()
- call void @sink()
- br label %loop
-}
-
-; Don't count debug intrinsics towards the outlining threshold.
-; CHECK-LABEL: @dont_count_debug_intrinsics
-; CHECK-NOT: dont_count_debug_intrinsics.cold.1
-define void @dont_count_debug_intrinsics(i32 %arg1) !dbg !6 {
-entry:
- %var = add i32 0, 0, !dbg !11
- br i1 undef, label %if.then, label %if.end
-
-if.then: ; preds = %entry
- ret void
-
-if.end: ; preds = %entry
- call void @llvm.dbg.value(metadata i32 %arg1, metadata !9, metadata !DIExpression()), !dbg !11
- call void @llvm.dbg.value(metadata i32 %arg1, metadata !9, metadata !DIExpression()), !dbg !11
- call void @sink()
- ret void
-}
-
-declare void @llvm.dbg.value(metadata, metadata, metadata)
-
-declare void @sink() cold
-
-!llvm.dbg.cu = !{!0}
-!llvm.debugify = !{!3, !4}
-!llvm.module.flags = !{!5}
-
-!0 = distinct !DICompileUnit(language: DW_LANG_C, file: !1, producer: "debugify", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
-!1 = !DIFile(filename: "<stdin>", directory: "/")
-!2 = !{}
-!3 = !{i32 7}
-!4 = !{i32 1}
-!5 = !{i32 2, !"Debug Info Version", i32 3}
-!6 = distinct !DISubprogram(name: "dont_count_debug_intrinsics", linkageName: "dont_count_debug_intrinsics", scope: null, file: !1, line: 1, type: !7, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: true, unit: !0, retainedNodes: !8)
-!7 = !DISubroutineType(types: !2)
-!8 = !{!9}
-!9 = !DILocalVariable(name: "1", scope: !6, file: !1, line: 1, type: !10)
-!10 = !DIBasicType(name: "ty32", size: 32, encoding: DW_ATE_unsigned)
-!11 = !DILocation(line: 1, column: 1, scope: !6)
Modified: llvm/trunk/test/Transforms/HotColdSplit/duplicate-phi-preds-crash.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/HotColdSplit/duplicate-phi-preds-crash.ll?rev=351480&r1=351479&r2=351480&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/HotColdSplit/duplicate-phi-preds-crash.ll (original)
+++ llvm/trunk/test/Transforms/HotColdSplit/duplicate-phi-preds-crash.ll Thu Jan 17 13:29:34 2019
@@ -1,4 +1,4 @@
-; RUN: opt -S -hotcoldsplit < %s | FileCheck %s
+; RUN: opt -S -hotcoldsplit -hotcoldsplit-threshold=0 < %s | FileCheck %s
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.14.0"
Modified: llvm/trunk/test/Transforms/HotColdSplit/eh-pads.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/HotColdSplit/eh-pads.ll?rev=351480&r1=351479&r2=351480&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/HotColdSplit/eh-pads.ll (original)
+++ llvm/trunk/test/Transforms/HotColdSplit/eh-pads.ll Thu Jan 17 13:29:34 2019
@@ -1,4 +1,4 @@
-; RUN: opt -S -hotcoldsplit < %s | FileCheck %s
+; RUN: opt -S -hotcoldsplit -hotcoldsplit-threshold=0 < %s | FileCheck %s
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.14.0"
@@ -17,7 +17,6 @@ exception:
continue_exception:
call void @sideeffect(i32 0)
- call void @sideeffect(i32 1)
call void @sink()
ret void
@@ -44,17 +43,19 @@ continue:
exception:
; Note: EH pads are not candidates for region entry points.
%cleanup = landingpad i8 cleanup
- ret void
+ br label %trivial-eh-handler
+
+trivial-eh-handler:
+ call void @sideeffect(i32 1)
+ br label %normal
normal:
call void @sideeffect(i32 0)
- call void @sideeffect(i32 1)
ret void
}
; CHECK-LABEL: define {{.*}}@foo.cold.1(
; CHECK: sideeffect(i32 0)
-; CHECK: sideeffect(i32 1)
; CHECK: sink
declare void @sideeffect(i32)
Modified: llvm/trunk/test/Transforms/HotColdSplit/eh-typeid-for.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/HotColdSplit/eh-typeid-for.ll?rev=351480&r1=351479&r2=351480&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/HotColdSplit/eh-typeid-for.ll (original)
+++ llvm/trunk/test/Transforms/HotColdSplit/eh-typeid-for.ll Thu Jan 17 13:29:34 2019
@@ -1,4 +1,4 @@
-; RUN: opt -hotcoldsplit -S < %s | FileCheck %s
+; RUN: opt -hotcoldsplit -hotcoldsplit-threshold=0 -S < %s | FileCheck %s
; Do not outline calls to @llvm.eh.typeid.for. See llvm.org/PR39545.
@@ -16,8 +16,6 @@ if.then:
if.else:
%t = call i32 @llvm.eh.typeid.for(i8* bitcast (i8** @_ZTIi to i8*))
call void @sink()
- call void @sink()
- call void @sink()
ret void
}
Removed: llvm/trunk/test/Transforms/HotColdSplit/extraction-subregion-breaks-phis.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/HotColdSplit/extraction-subregion-breaks-phis.ll?rev=351479&view=auto
==============================================================================
--- llvm/trunk/test/Transforms/HotColdSplit/extraction-subregion-breaks-phis.ll (original)
+++ llvm/trunk/test/Transforms/HotColdSplit/extraction-subregion-breaks-phis.ll (removed)
@@ -1,63 +0,0 @@
-; RUN: opt -S -hotcoldsplit < %s | FileCheck %s
-
-target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
-target triple = "x86_64-apple-macosx10.14.0"
-
-; CHECK-LABEL: define {{.*}}@foo(
-; CHECK: call {{.*}}@foo.cold.1(
-; CHECK: unreachable
-
-; CHECK-LABEL: define {{.*}}@foo.cold.1(
-; CHECK: switch i32 undef, label %sw.epilog.i
-define void @foo(i32 %QMM) {
-entry:
- switch i32 %QMM, label %entry.if.end16_crit_edge [
- i32 1, label %if.then
- ]
-
-entry.if.end16_crit_edge: ; preds = %entry
- br label %if.end16
-
-if.then: ; preds = %entry
- br i1 undef, label %cond.true.i.i, label %_ZN10StringView8popFrontEv.exit.i
-
-cond.true.i.i: ; preds = %if.then
- ret void
-
-_ZN10StringView8popFrontEv.exit.i: ; preds = %if.then
- switch i32 undef, label %sw.epilog.i [
- i32 81, label %if.end16
- i32 82, label %sw.bb4.i
- i32 83, label %sw.bb8.i
- i32 84, label %sw.bb12.i
- i32 65, label %if.end16
- i32 66, label %sw.bb20.i
- i32 67, label %sw.bb24.i
- i32 68, label %sw.bb28.i
- ]
-
-sw.bb4.i: ; preds = %_ZN10StringView8popFrontEv.exit.i
- br label %if.end16
-
-sw.bb8.i: ; preds = %_ZN10StringView8popFrontEv.exit.i
- br label %if.end16
-
-sw.bb12.i: ; preds = %_ZN10StringView8popFrontEv.exit.i
- br label %if.end16
-
-sw.bb20.i: ; preds = %_ZN10StringView8popFrontEv.exit.i
- br label %if.end16
-
-sw.bb24.i: ; preds = %_ZN10StringView8popFrontEv.exit.i
- br label %if.end16
-
-sw.bb28.i: ; preds = %_ZN10StringView8popFrontEv.exit.i
- br label %if.end16
-
-sw.epilog.i: ; preds = %_ZN10StringView8popFrontEv.exit.i
- br label %if.end16
-
-if.end16: ; preds = %sw.epilog.i, %sw.bb28.i, %sw.bb24.i, %sw.bb20.i, %sw.bb12.i, %sw.bb8.i, %sw.bb4.i, %_ZN10StringView8popFrontEv.exit.i, %_ZN10StringView8popFrontEv.exit.i, %entry.if.end16_crit_edge
- %0 = phi i8 [ 0, %entry.if.end16_crit_edge ], [ 0, %_ZN10StringView8popFrontEv.exit.i ], [ 0, %_ZN10StringView8popFrontEv.exit.i ], [ 1, %sw.bb4.i ], [ 2, %sw.bb8.i ], [ 3, %sw.bb12.i ], [ 1, %sw.bb20.i ], [ 2, %sw.bb24.i ], [ 3, %sw.bb28.i ], [ 0, %sw.epilog.i ]
- unreachable
-}
Modified: llvm/trunk/test/Transforms/HotColdSplit/forward-dfs-reaches-marked-block.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/HotColdSplit/forward-dfs-reaches-marked-block.ll?rev=351480&r1=351479&r2=351480&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/HotColdSplit/forward-dfs-reaches-marked-block.ll (original)
+++ llvm/trunk/test/Transforms/HotColdSplit/forward-dfs-reaches-marked-block.ll Thu Jan 17 13:29:34 2019
@@ -1,4 +1,4 @@
-; RUN: opt -hotcoldsplit -S < %s | FileCheck %s
+; RUN: opt -hotcoldsplit -hotcoldsplit-threshold=0 -S < %s | FileCheck %s
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.14.0"
Modified: llvm/trunk/test/Transforms/HotColdSplit/lifetime-markers-on-inputs.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/HotColdSplit/lifetime-markers-on-inputs.ll?rev=351480&r1=351479&r2=351480&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/HotColdSplit/lifetime-markers-on-inputs.ll (original)
+++ llvm/trunk/test/Transforms/HotColdSplit/lifetime-markers-on-inputs.ll Thu Jan 17 13:29:34 2019
@@ -1,4 +1,4 @@
-; RUN: opt -S -hotcoldsplit < %s 2>&1 | FileCheck %s
+; RUN: opt -S -hotcoldsplit -hotcoldsplit-threshold=0 < %s 2>&1 | FileCheck %s
declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture)
Modified: llvm/trunk/test/Transforms/HotColdSplit/mark-the-whole-func-cold.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/HotColdSplit/mark-the-whole-func-cold.ll?rev=351480&r1=351479&r2=351480&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/HotColdSplit/mark-the-whole-func-cold.ll (original)
+++ llvm/trunk/test/Transforms/HotColdSplit/mark-the-whole-func-cold.ll Thu Jan 17 13:29:34 2019
@@ -1,4 +1,4 @@
-; RUN: opt -S -hotcoldsplit < %s | FileCheck %s
+; RUN: opt -S -hotcoldsplit -hotcoldsplit-threshold=0 < %s | FileCheck %s
; Source:
;
Modified: llvm/trunk/test/Transforms/HotColdSplit/minsize.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/HotColdSplit/minsize.ll?rev=351480&r1=351479&r2=351480&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/HotColdSplit/minsize.ll (original)
+++ llvm/trunk/test/Transforms/HotColdSplit/minsize.ll Thu Jan 17 13:29:34 2019
@@ -1,4 +1,4 @@
-; RUN: opt -hotcoldsplit -S < %s | FileCheck %s
+; RUN: opt -hotcoldsplit -hotcoldsplit-threshold=0 -S < %s | FileCheck %s
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.14.0"
@@ -14,8 +14,6 @@ if.then:
if.else:
call void @sink()
- call void @sink()
- call void @sink()
ret void
}
Modified: llvm/trunk/test/Transforms/HotColdSplit/multiple-exits.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/HotColdSplit/multiple-exits.ll?rev=351480&r1=351479&r2=351480&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/HotColdSplit/multiple-exits.ll (original)
+++ llvm/trunk/test/Transforms/HotColdSplit/multiple-exits.ll Thu Jan 17 13:29:34 2019
@@ -1,4 +1,4 @@
-; RUN: opt -S -hotcoldsplit < %s | FileCheck %s
+; RUN: opt -S -hotcoldsplit -hotcoldsplit-threshold=0 < %s | FileCheck %s
; Source:
;
@@ -55,7 +55,6 @@ return:
}
; CHECK-LABEL: define {{.*}}@foo.cold.1(
-; TODO: Eliminate this unnecessary unconditional branch.
; CHECK: br
; CHECK: [[exit1Stub:.*]]:
; CHECK-NEXT: ret i1 true
Modified: llvm/trunk/test/Transforms/HotColdSplit/noreturn.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/HotColdSplit/noreturn.ll?rev=351480&r1=351479&r2=351480&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/HotColdSplit/noreturn.ll (original)
+++ llvm/trunk/test/Transforms/HotColdSplit/noreturn.ll Thu Jan 17 13:29:34 2019
@@ -1,4 +1,4 @@
-; RUN: opt -hotcoldsplit -S < %s | FileCheck %s
+; RUN: opt -hotcoldsplit -hotcoldsplit-threshold=0 -S < %s | FileCheck %s
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.14.0"
@@ -34,8 +34,6 @@ define void @bar(i32) {
sink:
tail call void @_Z10sideeffectv()
- tail call void @_Z10sideeffectv()
- tail call void @_Z10sideeffectv()
call void @llvm.trap()
unreachable
Modified: llvm/trunk/test/Transforms/HotColdSplit/outline-cold-asm.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/HotColdSplit/outline-cold-asm.ll?rev=351480&r1=351479&r2=351480&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/HotColdSplit/outline-cold-asm.ll (original)
+++ llvm/trunk/test/Transforms/HotColdSplit/outline-cold-asm.ll Thu Jan 17 13:29:34 2019
@@ -1,4 +1,4 @@
-; RUN: opt -hotcoldsplit -S < %s | FileCheck %s
+; RUN: opt -hotcoldsplit -hotcoldsplit-threshold=0 -S < %s | FileCheck %s
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.14.0"
@@ -19,8 +19,6 @@ if.then:
if.else:
call void asm "", ""()
call void @sink()
- call void @sink()
- call void @sink()
ret void
}
Modified: llvm/trunk/test/Transforms/HotColdSplit/outline-disjoint-diamonds.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/HotColdSplit/outline-disjoint-diamonds.ll?rev=351480&r1=351479&r2=351480&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/HotColdSplit/outline-disjoint-diamonds.ll (original)
+++ llvm/trunk/test/Transforms/HotColdSplit/outline-disjoint-diamonds.ll Thu Jan 17 13:29:34 2019
@@ -1,4 +1,4 @@
-; RUN: opt -S -hotcoldsplit < %s 2>&1 | FileCheck %s
+; RUN: opt -S -hotcoldsplit -hotcoldsplit-threshold=0 < %s 2>&1 | FileCheck %s
; CHECK-LABEL: define {{.*}}@fun
; CHECK: call {{.*}}@fun.cold.2(
Modified: llvm/trunk/test/Transforms/HotColdSplit/outline-if-then-else.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/HotColdSplit/outline-if-then-else.ll?rev=351480&r1=351479&r2=351480&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/HotColdSplit/outline-if-then-else.ll (original)
+++ llvm/trunk/test/Transforms/HotColdSplit/outline-if-then-else.ll Thu Jan 17 13:29:34 2019
@@ -1,4 +1,4 @@
-; RUN: opt -S -hotcoldsplit < %s | FileCheck %s
+; RUN: opt -S -hotcoldsplit -hotcoldsplit-threshold=0 < %s | FileCheck %s
; Source:
;
Modified: llvm/trunk/test/Transforms/HotColdSplit/outline-multiple-entry-region.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/HotColdSplit/outline-multiple-entry-region.ll?rev=351480&r1=351479&r2=351480&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/HotColdSplit/outline-multiple-entry-region.ll (original)
+++ llvm/trunk/test/Transforms/HotColdSplit/outline-multiple-entry-region.ll Thu Jan 17 13:29:34 2019
@@ -1,4 +1,4 @@
-; RUN: opt -S -hotcoldsplit < %s | FileCheck %s
+; RUN: opt -S -hotcoldsplit -hotcoldsplit-threshold=0 < %s | FileCheck %s
; Source:
;
@@ -26,11 +26,9 @@ target triple = "x86_64-apple-macosx10.1
; CHECK-LABEL: define {{.*}}@_Z3fooii.cold.1
; CHECK: call void @_Z10sideeffecti(i32 1)
-; CHECK: call void @_Z10sideeffecti(i32 11)
; CHECK-LABEL: define {{.*}}@_Z3fooii.cold.2
; CHECK: call void @_Z10sideeffecti(i32 0)
-; CHECK: call void @_Z10sideeffecti(i32 10)
; CHECK-LABEL: define {{.*}}@_Z3fooii.cold.3
; CHECK: call void @_Z4sinkv
@@ -50,7 +48,6 @@ define void @_Z3fooii(i32, i32) {
; <label>:8: ; preds = %5
call void @_Z10sideeffecti(i32 0)
- call void @_Z10sideeffecti(i32 10)
br label %14
; <label>:9: ; preds = %5
@@ -60,7 +57,6 @@ define void @_Z3fooii(i32, i32) {
; <label>:12: ; preds = %9
call void @_Z10sideeffecti(i32 1)
- call void @_Z10sideeffecti(i32 11)
br label %14
; <label>:13: ; preds = %9
Modified: llvm/trunk/test/Transforms/HotColdSplit/outline-while-loop.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/HotColdSplit/outline-while-loop.ll?rev=351480&r1=351479&r2=351480&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/HotColdSplit/outline-while-loop.ll (original)
+++ llvm/trunk/test/Transforms/HotColdSplit/outline-while-loop.ll Thu Jan 17 13:29:34 2019
@@ -1,4 +1,4 @@
-; RUN: opt -S -hotcoldsplit < %s | FileCheck %s
+; RUN: opt -S -hotcoldsplit -hotcoldsplit-threshold=0 < %s | FileCheck %s
; Source:
;
Modified: llvm/trunk/test/Transforms/HotColdSplit/phi-with-distinct-outlined-values.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/HotColdSplit/phi-with-distinct-outlined-values.ll?rev=351480&r1=351479&r2=351480&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/HotColdSplit/phi-with-distinct-outlined-values.ll (original)
+++ llvm/trunk/test/Transforms/HotColdSplit/phi-with-distinct-outlined-values.ll Thu Jan 17 13:29:34 2019
@@ -1,4 +1,4 @@
-; RUN: opt -S -hotcoldsplit < %s | FileCheck %s
+; RUN: opt -S -hotcoldsplit -hotcoldsplit-threshold=0 < %s | FileCheck %s
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.14.0"
@@ -19,7 +19,6 @@ entry:
coldbb:
call void @sink()
call void @sideeffect()
- call void @sideeffect()
br i1 undef, label %if.end, label %coldbb2
coldbb2:
Modified: llvm/trunk/test/Transforms/HotColdSplit/region-overlap.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/HotColdSplit/region-overlap.ll?rev=351480&r1=351479&r2=351480&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/HotColdSplit/region-overlap.ll (original)
+++ llvm/trunk/test/Transforms/HotColdSplit/region-overlap.ll Thu Jan 17 13:29:34 2019
@@ -1,4 +1,4 @@
-; RUN: opt -S -hotcoldsplit < %s | FileCheck %s
+; RUN: opt -S -hotcoldsplit -hotcoldsplit-threshold=0 < %s | FileCheck %s
; Source:
;
@@ -8,14 +8,12 @@
; if (cond1) {
; if (cond2) { // This is the first cold region we visit.
; sideeffect(0);
-; sideeffect(10);
; sink(0);
; }
;
; // There's a larger, overlapping cold region here. But we ignore it.
; // This could be improved.
; sideeffect(1);
-; sideeffect(11);
; sink(1);
; }
; }
@@ -42,13 +40,11 @@ define void @_Z3fooii(i32, i32) {
; <label>:10: ; preds = %7
call void @_Z10sideeffecti(i32 0)
- call void @_Z10sideeffecti(i32 10)
call void @_Z4sinki(i32 0) #3
br label %11
; <label>:11: ; preds = %10, %7
call void @_Z10sideeffecti(i32 1)
- call void @_Z10sideeffecti(i32 11)
call void @_Z4sinki(i32 1) #3
br label %12
@@ -58,7 +54,6 @@ define void @_Z3fooii(i32, i32) {
; CHECK-LABEL: define {{.*}}@_Z3fooii.cold.1
; CHECK: call void @_Z10sideeffecti(i32 0)
-; CHECK: call void @_Z10sideeffecti(i32 10)
declare void @_Z10sideeffecti(i32)
Modified: llvm/trunk/test/Transforms/HotColdSplit/split-cold-2.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/HotColdSplit/split-cold-2.ll?rev=351480&r1=351479&r2=351480&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/HotColdSplit/split-cold-2.ll (original)
+++ llvm/trunk/test/Transforms/HotColdSplit/split-cold-2.ll Thu Jan 17 13:29:34 2019
@@ -1,5 +1,5 @@
-; RUN: opt -hotcoldsplit -pass-remarks=hotcoldsplit -S < %s 2>&1 | FileCheck %s
-; RUN: opt -passes=hotcoldsplit -pass-remarks=hotcoldsplit -S < %s 2>&1 | FileCheck %s
+; RUN: opt -hotcoldsplit -hotcoldsplit-threshold=0 -pass-remarks=hotcoldsplit -S < %s 2>&1 | FileCheck %s
+; RUN: opt -hotcoldsplit-threshold=0 -passes=hotcoldsplit -pass-remarks=hotcoldsplit -S < %s 2>&1 | FileCheck %s
; Make sure this compiles. This test used to fail with an invalid phi node: the
; two predecessors were outlined and the SSA representation was invalid.
Modified: llvm/trunk/test/Transforms/HotColdSplit/split-out-dbg-val-of-arg.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/HotColdSplit/split-out-dbg-val-of-arg.ll?rev=351480&r1=351479&r2=351480&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/HotColdSplit/split-out-dbg-val-of-arg.ll (original)
+++ llvm/trunk/test/Transforms/HotColdSplit/split-out-dbg-val-of-arg.ll Thu Jan 17 13:29:34 2019
@@ -1,4 +1,4 @@
-; RUN: opt -hotcoldsplit -S < %s | FileCheck %s
+; RUN: opt -hotcoldsplit -hotcoldsplit-threshold=0 -S < %s | FileCheck %s
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.14.0"
@@ -17,8 +17,6 @@ if.then:
if.end: ; preds = %entry
call void @llvm.dbg.value(metadata i32 %arg1, metadata !9, metadata !DIExpression()), !dbg !11
call void @sink()
- call void @sink()
- call void @sink()
ret void
}
Modified: llvm/trunk/test/Transforms/HotColdSplit/succ-block-with-self-edge.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/HotColdSplit/succ-block-with-self-edge.ll?rev=351480&r1=351479&r2=351480&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/HotColdSplit/succ-block-with-self-edge.ll (original)
+++ llvm/trunk/test/Transforms/HotColdSplit/succ-block-with-self-edge.ll Thu Jan 17 13:29:34 2019
@@ -1,4 +1,4 @@
-; RUN: opt -S -hotcoldsplit < %s | FileCheck %s
+; RUN: opt -S -hotcoldsplit -hotcoldsplit-threshold=0 < %s | FileCheck %s
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.14.0"
@@ -15,7 +15,6 @@ entry:
coldbb:
call void @sink()
call void @sideeffect()
- call void @sideeffect()
br i1 undef, label %if.end, label %coldbb2
coldbb2:
@@ -39,7 +38,6 @@ entry:
coldbb:
call void @sink()
call void @sideeffect()
- call void @sideeffect()
br i1 undef, label %if.end, label %coldbb2
coldbb2:
Modified: llvm/trunk/test/Transforms/HotColdSplit/unwind.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/HotColdSplit/unwind.ll?rev=351480&r1=351479&r2=351480&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/HotColdSplit/unwind.ll (original)
+++ llvm/trunk/test/Transforms/HotColdSplit/unwind.ll Thu Jan 17 13:29:34 2019
@@ -1,4 +1,4 @@
-; RUN: opt -hotcoldsplit -S < %s | FileCheck %s
+; RUN: opt -hotcoldsplit -hotcoldsplit-threshold=0 -S < %s | FileCheck %s
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.14.0"
@@ -18,7 +18,6 @@ exception:
continue_exception:
call void @sideeffect(i32 0)
- call void @sideeffect(i32 1)
call void @sink()
resume i32 undef
More information about the llvm-commits
mailing list