summaryrefslogtreecommitdiff
path: root/test/Bitcode/Inputs
diff options
context:
space:
mode:
authorTeresa Johnson <tejohnson@google.com>2016-03-11 18:52:24 +0000
committerTeresa Johnson <tejohnson@google.com>2016-03-11 18:52:24 +0000
commitdc6615addb0b0f6b538b81b0e9b97bfbef57adaa (patch)
treeb2be4bb17d1ffd26c5d1030b723180583d9355c4 /test/Bitcode/Inputs
parentfcb50867e5541c43914687c187b1f1983112d961 (diff)
[ThinLTO] Support for reference graph in per-module and combined summary.
Summary: This patch adds support for including a full reference graph including call graph edges and other GV references in the summary. The reference graph edges can be used to make importing decisions without materializing any source modules, can be used in the plugin to make file staging decisions for distributed build systems, and is expected to have other uses. The call graph edges are recorded in each function summary in the bitcode via a list of <CalleeValueIds, StaticCount> tuples when no PGO data exists, or <CalleeValueId, StaticCount, ProfileCount> pairs when there is PGO, where the ValueId can be mapped to the function GUID via the ValueSymbolTable. In the function index in memory, the call graph edges reference the target via the CalleeGUID instead of the CalleeValueId. The reference graph edges are recorded in each summary record with a list of referenced value IDs, which can be mapped to value GUID via the ValueSymbolTable. Addtionally, a new summary record type is added to record references from global variable initializers. A number of bitcode records and data structures have been renamed to reflect the newly expanded scope of the summary beyond functions. More cleanup will follow. Reviewers: joker.eph, davidxl Subscribers: joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D17212 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263275 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Bitcode/Inputs')
-rw-r--r--test/Bitcode/Inputs/thinlto-function-summary-callgraph-pgo.ll11
-rw-r--r--test/Bitcode/Inputs/thinlto-function-summary-callgraph.ll10
2 files changed, 21 insertions, 0 deletions
diff --git a/test/Bitcode/Inputs/thinlto-function-summary-callgraph-pgo.ll b/test/Bitcode/Inputs/thinlto-function-summary-callgraph-pgo.ll
new file mode 100644
index 00000000000..f51ea4d500b
--- /dev/null
+++ b/test/Bitcode/Inputs/thinlto-function-summary-callgraph-pgo.ll
@@ -0,0 +1,11 @@
+; ModuleID = 'thinlto-function-summary-callgraph2.ll'
+target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
+
+; Function Attrs: nounwind uwtable
+define void @func() #0 !prof !2 {
+entry:
+ ret void
+}
+
+!2 = !{!"function_entry_count", i64 1}
diff --git a/test/Bitcode/Inputs/thinlto-function-summary-callgraph.ll b/test/Bitcode/Inputs/thinlto-function-summary-callgraph.ll
new file mode 100644
index 00000000000..c6ede3252d8
--- /dev/null
+++ b/test/Bitcode/Inputs/thinlto-function-summary-callgraph.ll
@@ -0,0 +1,10 @@
+; ModuleID = 'thinlto-function-summary-callgraph2.ll'
+target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
+
+; Function Attrs: nounwind uwtable
+define void @func() #0 {
+entry:
+ ret void
+}
+