summaryrefslogtreecommitdiffstats
path: root/test/Bitcode
diff options
context:
space:
mode:
authorMehdi Amini <mehdi.amini@apple.com>2016-04-24 03:18:11 +0000
committerMehdi Amini <mehdi.amini@apple.com>2016-04-24 03:18:11 +0000
commit3f53abc0a5a02d78bdf134103e03cab7841ad832 (patch)
treeffac76ba1bac16811373ac028c697bae6929769c /test/Bitcode
parentbbf2e449fd3a9fb842408e294ea875291aec4ef8 (diff)
Add a version field in the bitcode for the summary
Differential Revision: http://reviews.llvm.org/D19456 From: Mehdi Amini <mehdi.amini@apple.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267318 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Bitcode')
-rw-r--r--test/Bitcode/summary_version.ll12
-rw-r--r--test/Bitcode/thinlto-alias.ll2
-rw-r--r--test/Bitcode/thinlto-function-summary-callgraph-pgo.ll2
-rw-r--r--test/Bitcode/thinlto-function-summary-callgraph.ll2
-rw-r--r--test/Bitcode/thinlto-function-summary-originalnames.ll1
-rw-r--r--test/Bitcode/thinlto-function-summary.ll1
6 files changed, 20 insertions, 0 deletions
diff --git a/test/Bitcode/summary_version.ll b/test/Bitcode/summary_version.ll
new file mode 100644
index 000000000000..718a0ab9bd7f
--- /dev/null
+++ b/test/Bitcode/summary_version.ll
@@ -0,0 +1,12 @@
+; Check summary versioning
+; RUN: opt -module-summary %s -o - | llvm-bcanalyzer -dump | FileCheck %s
+
+; CHECK: <GLOBALVAL_SUMMARY_BLOCK
+; CHECK: <VERSION op0=1/>
+
+
+
+; Need a function for the summary to be populated.
+define void @foo() {
+ ret void
+}
diff --git a/test/Bitcode/thinlto-alias.ll b/test/Bitcode/thinlto-alias.ll
index 7fe6d43ca482..56a01ec05534 100644
--- a/test/Bitcode/thinlto-alias.ll
+++ b/test/Bitcode/thinlto-alias.ll
@@ -6,6 +6,7 @@
; RUN: llvm-bcanalyzer -dump %t3.thinlto.bc | FileCheck %s --check-prefix=COMBINED
; CHECK: <GLOBALVAL_SUMMARY_BLOCK
+; CHECK-NEXT: <VERSION
; See if the call to func is registered, using the expected callsite count
; and value id matching the subsequent value symbol table.
; CHECK-NEXT: <PERMODULE {{.*}} op4=[[FUNCID:[0-9]+]] op5=1/>
@@ -17,6 +18,7 @@
; CHECK-NEXT: </VALUE_SYMTAB>
; COMBINED: <GLOBALVAL_SUMMARY_BLOCK
+; COMBINED-NEXT: <VERSION
; See if the call to analias is registered, using the expected callsite count
; and value id matching the subsequent value symbol table.
; COMBINED-NEXT: <COMBINED {{.*}} op4=[[ALIASID:[0-9]+]] op5=1/>
diff --git a/test/Bitcode/thinlto-function-summary-callgraph-pgo.ll b/test/Bitcode/thinlto-function-summary-callgraph-pgo.ll
index dc9460849e77..7bf91a541a76 100644
--- a/test/Bitcode/thinlto-function-summary-callgraph-pgo.ll
+++ b/test/Bitcode/thinlto-function-summary-callgraph-pgo.ll
@@ -6,6 +6,7 @@
; RUN: llvm-bcanalyzer -dump %t3.thinlto.bc | FileCheck %s --check-prefix=COMBINED
; CHECK: <GLOBALVAL_SUMMARY_BLOCK
+; CHECK-NEXT: <VERSION
; See if the call to func is registered, using the expected callsite count
; and profile count, with value id matching the subsequent value symbol table.
; CHECK-NEXT: <PERMODULE_PROFILE {{.*}} op4=[[FUNCID:[0-9]+]] op5=1 op6=1/>
@@ -17,6 +18,7 @@
; CHECK-NEXT: </VALUE_SYMTAB>
; COMBINED: <GLOBALVAL_SUMMARY_BLOCK
+; COMBINED-NEXT: <VERSION
; COMBINED-NEXT: <COMBINED
; See if the call to func is registered, using the expected callsite count
; and profile count, with value id matching the subsequent value symbol table.
diff --git a/test/Bitcode/thinlto-function-summary-callgraph.ll b/test/Bitcode/thinlto-function-summary-callgraph.ll
index e8533dbc0553..878d39391d79 100644
--- a/test/Bitcode/thinlto-function-summary-callgraph.ll
+++ b/test/Bitcode/thinlto-function-summary-callgraph.ll
@@ -6,6 +6,7 @@
; RUN: llvm-bcanalyzer -dump %t3.thinlto.bc | FileCheck %s --check-prefix=COMBINED
; CHECK: <GLOBALVAL_SUMMARY_BLOCK
+; CHECK-NEXT: <VERSION
; See if the call to func is registered, using the expected callsite count
; and value id matching the subsequent value symbol table.
; CHECK-NEXT: <PERMODULE {{.*}} op4=[[FUNCID:[0-9]+]] op5=1/>
@@ -17,6 +18,7 @@
; CHECK-NEXT: </VALUE_SYMTAB>
; COMBINED: <GLOBALVAL_SUMMARY_BLOCK
+; COMBINED-NEXT: <VERSION
; COMBINED-NEXT: <COMBINED
; See if the call to func is registered, using the expected callsite count
; and value id matching the subsequent value symbol table.
diff --git a/test/Bitcode/thinlto-function-summary-originalnames.ll b/test/Bitcode/thinlto-function-summary-originalnames.ll
index 50c0a864e4eb..26cafeadd857 100644
--- a/test/Bitcode/thinlto-function-summary-originalnames.ll
+++ b/test/Bitcode/thinlto-function-summary-originalnames.ll
@@ -4,6 +4,7 @@
; RUN: llvm-bcanalyzer -dump %t.index.bc | FileCheck %s --check-prefix=COMBINED
; COMBINED: <GLOBALVAL_SUMMARY_BLOCK
+; COMBINED-NEXT: <VERSION
; COMBINED-DAG: <COMBINED
; COMBINED-DAG: <COMBINED_ORIGINAL_NAME op0=6699318081062747564/>
; COMBINED-DAG: <COMBINED_GLOBALVAR_INIT_REFS
diff --git a/test/Bitcode/thinlto-function-summary.ll b/test/Bitcode/thinlto-function-summary.ll
index 639b68df1df1..8b18f07bdebe 100644
--- a/test/Bitcode/thinlto-function-summary.ll
+++ b/test/Bitcode/thinlto-function-summary.ll
@@ -5,6 +5,7 @@
; same in the ValueSumbolTable, to ensure the ordering is stable.
; Also check the linkage field on the summary entries.
; BC: <GLOBALVAL_SUMMARY_BLOCK
+; BC-NEXT: <VERSION
; BC-NEXT: <PERMODULE {{.*}} op0=1 op1=0
; BC-NEXT: <PERMODULE {{.*}} op0=2 op1=0
; BC-NEXT: <PERMODULE {{.*}} op0=3 op1=3