diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 10:51:19 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 10:51:19 +0000 |
| commit | eb11fae6d08f479c0799db45860a98af528fa6e7 (patch) | |
| tree | 44d492a50c8c1a7eb8e2d17ea3360ec4d066f042 /test/Transforms/FunctionImport/Inputs | |
| parent | b8a2042aa938069e862750553db0e4d82d25822c (diff) | |
Notes
Diffstat (limited to 'test/Transforms/FunctionImport/Inputs')
7 files changed, 60 insertions, 43 deletions
diff --git a/test/Transforms/FunctionImport/Inputs/funcimport_cutoff.ll b/test/Transforms/FunctionImport/Inputs/funcimport_cutoff.ll new file mode 100644 index 000000000000..4283215d74c9 --- /dev/null +++ b/test/Transforms/FunctionImport/Inputs/funcimport_cutoff.ll @@ -0,0 +1,9 @@ +define void @foo() { +entry: + ret void +} + +define void @bar() { +entry: + ret void +} diff --git a/test/Transforms/FunctionImport/Inputs/funcimport_debug.ll b/test/Transforms/FunctionImport/Inputs/funcimport_debug.ll index 0e75924cd3b6..f553af41896f 100644 --- a/test/Transforms/FunctionImport/Inputs/funcimport_debug.ll +++ b/test/Transforms/FunctionImport/Inputs/funcimport_debug.ll @@ -17,7 +17,7 @@ attributes #0 = { nounwind uwtable "disable-tail-calls"="false" "less-precise-fp !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 255685) (llvm/trunk 255682)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) !1 = !DIFile(filename: "funcimport_debug.c", directory: ".") !2 = !{} -!4 = distinct !DISubprogram(name: "func", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: false, unit: !0, variables: !2) +!4 = distinct !DISubprogram(name: "func", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: false, unit: !0, retainedNodes: !2) !5 = !DISubroutineType(types: !6) !6 = !{null} !7 = !{i32 2, !"Dwarf Version", i32 4} diff --git a/test/Transforms/FunctionImport/Inputs/funcimport_forcecold.ll b/test/Transforms/FunctionImport/Inputs/funcimport_forcecold.ll new file mode 100644 index 000000000000..a59d68c1e186 --- /dev/null +++ b/test/Transforms/FunctionImport/Inputs/funcimport_forcecold.ll @@ -0,0 +1,4 @@ +define void @foo() { +entry: + ret void +} diff --git a/test/Transforms/FunctionImport/Inputs/funcimport_resolved1.ll b/test/Transforms/FunctionImport/Inputs/funcimport_resolved1.ll new file mode 100644 index 000000000000..2b2443c96afe --- /dev/null +++ b/test/Transforms/FunctionImport/Inputs/funcimport_resolved1.ll @@ -0,0 +1,34 @@ +target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-apple-macosx10.11.0" + +define void @foo() { + call void @linkonceodrfunc() + call void @linkonceodrfunc2() + ret void +} + +define linkonce_odr void @linkonceodrfunc() { + call void @f() + call void @f() + call void @f() + call void @f() + call void @f() + call void @f() + call void @f() + ret void +} + +define linkonce_odr void @linkonceodrfunc2() { + call void @f() + call void @f() + call void @f() + call void @f() + call void @f() + call void @f() + call void @f() + ret void +} + +define internal void @f() { + ret void +} diff --git a/test/Transforms/FunctionImport/Inputs/funcimport_resolved2.ll b/test/Transforms/FunctionImport/Inputs/funcimport_resolved2.ll new file mode 100644 index 000000000000..278a7f4553fe --- /dev/null +++ b/test/Transforms/FunctionImport/Inputs/funcimport_resolved2.ll @@ -0,0 +1,6 @@ +target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-apple-macosx10.11.0" + +define linkonce_odr void @linkonceodrfunc() { + ret void +} diff --git a/test/Transforms/FunctionImport/Inputs/hotness_based_import2.ll b/test/Transforms/FunctionImport/Inputs/hotness_based_import2.ll deleted file mode 100644 index 4f17cb2cd9a1..000000000000 --- a/test/Transforms/FunctionImport/Inputs/hotness_based_import2.ll +++ /dev/null @@ -1,42 +0,0 @@ -; ModuleID = 'thinlto-function-summary-callgraph-profile-summary2.ll' -target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" -target triple = "x86_64-unknown-linux-gnu" - - -define void @hot() #1 !prof !28 { - call void @calledFromHot() - ret void -} - -; 9 instructions so it is above decayed cold threshold of 7 and below -; decayed hot threshold of 10. -define void @calledFromHot() !prof !28 { - %b = alloca i32, align 4 - store i32 1, i32* %b, align 4 - store i32 1, i32* %b, align 4 - store i32 1, i32* %b, align 4 - store i32 1, i32* %b, align 4 - store i32 1, i32* %b, align 4 - store i32 1, i32* %b, align 4 - store i32 1, i32* %b, align 4 - ret void -} - -!llvm.module.flags = !{!1} - -!1 = !{i32 1, !"ProfileSummary", !2} -!2 = !{!3, !4, !5, !6, !7, !8, !9, !10} -!3 = !{!"ProfileFormat", !"InstrProf"} -!4 = !{!"TotalCount", i64 222} -!5 = !{!"MaxCount", i64 110} -!6 = !{!"MaxInternalCount", i64 1} -!7 = !{!"MaxFunctionCount", i64 110} -!8 = !{!"NumCounts", i64 4} -!9 = !{!"NumFunctions", i64 3} -!10 = !{!"DetailedSummary", !11} -!11 = !{!12, !13, !14} -!12 = !{i32 10000, i64 110, i32 2} -!13 = !{i32 999000, i64 2, i32 4} -!14 = !{i32 999999, i64 2, i32 4} -!28 = !{!"function_entry_count", i64 110} -!29 = !{!"function_entry_count", i64 1} diff --git a/test/Transforms/FunctionImport/Inputs/not-prevailing.ll b/test/Transforms/FunctionImport/Inputs/not-prevailing.ll new file mode 100644 index 000000000000..ca17d7f377c7 --- /dev/null +++ b/test/Transforms/FunctionImport/Inputs/not-prevailing.ll @@ -0,0 +1,6 @@ +target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-unknown-linux-gnu" + +define weak i32 @foo() { + ret i32 0 +} |
