summaryrefslogtreecommitdiffstats
path: root/llvm/test/Bitcode/thinlto-function-summary.ll
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2017-04-17 17:51:36 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2017-04-17 17:51:36 +0000
commita0f371a106f003bb6575bc8f19ab82121d8bc1c4 (patch)
tree7367ce107322299d35983d4e5a7fd4c98dff7709 /llvm/test/Bitcode/thinlto-function-summary.ll
parentdc77b2e960b6b6d4622c89ee8d324848ac6a0609 (diff)
downloadbcm5719-llvm-a0f371a106f003bb6575bc8f19ab82121d8bc1c4.tar.gz
bcm5719-llvm-a0f371a106f003bb6575bc8f19ab82121d8bc1c4.zip
Bitcode: Add a string table to the bitcode format.
Add a top-level STRTAB block containing a string table blob, and start storing strings for module codes FUNCTION, GLOBALVAR, ALIAS, IFUNC and COMDAT in the string table. This change allows us to share names between globals and comdats as well as between modules, and improves the efficiency of loading bitcode files by no longer using a bit encoding for symbol names. Once we start writing the irsymtab to the bitcode file we will also be able to share strings between it and the module. On my machine, link time for Chromium for Linux with ThinLTO decreases by about 7% for no-op incremental builds or about 1% for full builds. Total bitcode file size decreases by about 3%. As discussed on llvm-dev: http://lists.llvm.org/pipermail/llvm-dev/2017-April/111732.html Differential Revision: https://reviews.llvm.org/D31838 llvm-svn: 300464
Diffstat (limited to 'llvm/test/Bitcode/thinlto-function-summary.ll')
-rw-r--r--llvm/test/Bitcode/thinlto-function-summary.ll25
1 files changed, 15 insertions, 10 deletions
diff --git a/llvm/test/Bitcode/thinlto-function-summary.ll b/llvm/test/Bitcode/thinlto-function-summary.ll
index ff61b7713f0..6b8bfbb292c 100644
--- a/llvm/test/Bitcode/thinlto-function-summary.ll
+++ b/llvm/test/Bitcode/thinlto-function-summary.ll
@@ -2,9 +2,19 @@
; RUN: opt -passes=name-anon-globals -module-summary < %s | llvm-bcanalyzer -dump | FileCheck %s -check-prefix=BC
; Check for summary block/records.
-; Check the value ids in the summary entries against the
-; same in the ValueSumbolTable, to ensure the ordering is stable.
-; Also check the linkage field on the summary entries.
+; BC: <SOURCE_FILENAME
+; "h"
+; BC-NEXT: <GLOBALVAR {{.*}} op0=0 op1=1
+; "foo"
+; BC-NEXT: <FUNCTION op0=1 op1=3
+; "bar"
+; BC-NEXT: <FUNCTION op0=4 op1=3
+; "anon.[32 chars].0"
+; BC-NEXT: <FUNCTION op0=7 op1=39
+; "variadic"
+; BC-NEXT: <FUNCTION op0=46 op1=8
+; "f"
+; BC-NEXT: <ALIAS op0=54 op1=1
; BC: <GLOBALVAL_SUMMARY_BLOCK
; BC-NEXT: <VERSION
; BC-NEXT: <PERMODULE {{.*}} op0=1 op1=0
@@ -13,13 +23,8 @@
; BC-NEXT: <PERMODULE {{.*}} op0=4 op1=16
; BC-NEXT: <ALIAS {{.*}} op0=5 op1=0 op2=3
; BC-NEXT: </GLOBALVAL_SUMMARY_BLOCK
-; BC-NEXT: <VALUE_SYMTAB
-; BC-NEXT: <FNENTRY {{.*}} op0=4 {{.*}}> record string = 'variadic'
-; BC-NEXT: <FNENTRY {{.*}} op0=1 {{.*}}> record string = 'foo'
-; BC-NEXT: <FNENTRY {{.*}} op0=2 {{.*}}> record string = 'bar'
-; BC-NEXT: <ENTRY {{.*}} op0=5 {{.*}}> record string = 'f'
-; BC-NEXT: <ENTRY {{.*}} record string = 'h'
-; BC-NEXT: <FNENTRY {{.*}} op0=3 {{.*}}> record string = 'anon.
+; BC: <STRTAB_BLOCK
+; BC-NEXT: blob data = 'hfoobaranon.{{................................}}.0variadicf'
; RUN: opt -name-anon-globals -module-summary < %s | llvm-dis | FileCheck %s
OpenPOWER on IntegriCloud