summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorTeresa Johnson <tejohnson@google.com>2016-04-27 13:28:35 +0000
committerTeresa Johnson <tejohnson@google.com>2016-04-27 13:28:35 +0000
commit02e98331c04b9235d4b54c524db4885053c9fce0 (patch)
tree2a88d8b2ac00f1e95deacc98436cee56f9bb90ba /llvm/test
parent68d2b881d28ac77933d2580a50e23ec2e89a6a13 (diff)
downloadbcm5719-llvm-02e98331c04b9235d4b54c524db4885053c9fce0.tar.gz
bcm5719-llvm-02e98331c04b9235d4b54c524db4885053c9fce0.zip
[ThinLTO] Use valueid instead of bitcode offsets in combined index file
Summary: With the removal of support for lazy parsing of combined index summary records (e.g. r267344), we no longer need to include the summary record bitcode offset in the VST entries for definitions. Change the combined index format to be similar to the per-module index format in using value ids to cross-reference from the summary record to the VST entry (rather than the summary record bitcode offset to cross-reference in the other direction). The visible changes are: 1) Add the value id to the combined summary records 2) Remove the summary offset from the combined VST records, which has the following effects: - No longer need the VST_CODE_COMBINED_GVDEFENTRY record, as all combined index VST entries now only contain the value id and corresponding GUID. - No longer have duplicate VST entries in the case where there are multiple definitions of a symbol (e.g. weak/linkonce), as they all have the same value id and GUID. An implication of #2 above is that in order to hook up an alias to the correct aliasee based on the value id of the aliasee recorded in the combined index alias record, we need to scan the entries in the index for that GUID to find the one from the same module (i.e. the case where there are multiple entries for the aliasee). But the reader no longer has to maintain a special map to hook up the alias/aliasee. Reviewers: joker.eph Subscribers: joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D19481 llvm-svn: 267712
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Bitcode/thinlto-alias.ll10
-rw-r--r--llvm/test/Bitcode/thinlto-function-summary-callgraph-pgo.ll6
-rw-r--r--llvm/test/Bitcode/thinlto-function-summary-callgraph.ll6
-rw-r--r--llvm/test/Bitcode/thinlto-function-summary-originalnames.ll6
-rw-r--r--llvm/test/Bitcode/thinlto-summary-linkage-types.ll16
-rw-r--r--llvm/test/Bitcode/thinlto-summary-section.ll2
-rw-r--r--llvm/test/tools/gold/X86/thinlto.ll4
-rw-r--r--llvm/test/tools/llvm-lto/thinlto.ll4
8 files changed, 27 insertions, 27 deletions
diff --git a/llvm/test/Bitcode/thinlto-alias.ll b/llvm/test/Bitcode/thinlto-alias.ll
index 56a01ec0553..58411ca6523 100644
--- a/llvm/test/Bitcode/thinlto-alias.ll
+++ b/llvm/test/Bitcode/thinlto-alias.ll
@@ -21,16 +21,16 @@
; 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/>
+; COMBINED-NEXT: <COMBINED {{.*}} op5=[[ALIASID:[0-9]+]] op6=1/>
; Followed by the alias and aliasee
; COMBINED-NEXT: <COMBINED {{.*}}
-; COMBINED-NEXT: <COMBINED_ALIAS {{.*}} op2=[[ALIASEEOFFSET:[0-9]+]]
+; COMBINED-NEXT: <COMBINED_ALIAS {{.*}} op3=[[ALIASEEID:[0-9]+]]
; COMBINED-NEXT: </GLOBALVAL_SUMMARY_BLOCK
; COMBINED-NEXT: <VALUE_SYMTAB
; Entry for function func should have entry with value id ALIASID
-; COMBINED-NEXT: <COMBINED_GVDEFENTRY {{.*}} op0=[[ALIASID]] {{.*}} op2=-5751648690987223394/>
-; COMBINED-NEXT: <COMBINED_GVDEFENTRY
-; COMBINED-NEXT: <COMBINED_GVDEFENTRY {{.*}} op1=[[ALIASEEOFFSET]] op2=-1039159065113703048/>
+; COMBINED-NEXT: <COMBINED_ENTRY {{.*}} op0=[[ALIASID]] op1=-5751648690987223394/>
+; COMBINED-NEXT: <COMBINED
+; COMBINED-NEXT: <COMBINED_ENTRY {{.*}} op0=[[ALIASEEID]] op1=-1039159065113703048/>
; COMBINED-NEXT: </VALUE_SYMTAB>
; ModuleID = 'thinlto-function-summary-callgraph.ll'
diff --git a/llvm/test/Bitcode/thinlto-function-summary-callgraph-pgo.ll b/llvm/test/Bitcode/thinlto-function-summary-callgraph-pgo.ll
index 7bf91a541a7..a927a16be15 100644
--- a/llvm/test/Bitcode/thinlto-function-summary-callgraph-pgo.ll
+++ b/llvm/test/Bitcode/thinlto-function-summary-callgraph-pgo.ll
@@ -22,12 +22,12 @@
; 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.
-; COMBINED-NEXT: <COMBINED_PROFILE {{.*}} op4=[[FUNCID:[0-9]+]] op5=1 op6=1/>
+; COMBINED-NEXT: <COMBINED_PROFILE {{.*}} op5=[[FUNCID:[0-9]+]] op6=1 op7=1/>
; COMBINED-NEXT: </GLOBALVAL_SUMMARY_BLOCK>
; COMBINED-NEXT: <VALUE_SYMTAB
; Entry for function func should have entry with value id FUNCID
-; COMBINED-NEXT: <COMBINED_GVDEFENTRY {{.*}} op0=[[FUNCID]] {{.*}} op2=7289175272376759421/>
-; COMBINED-NEXT: <COMBINED_GVDEFENTRY
+; COMBINED-NEXT: <COMBINED_ENTRY {{.*}} op0=[[FUNCID]] op1=7289175272376759421/>
+; COMBINED-NEXT: <COMBINED
; COMBINED-NEXT: </VALUE_SYMTAB>
; ModuleID = 'thinlto-function-summary-callgraph.ll'
diff --git a/llvm/test/Bitcode/thinlto-function-summary-callgraph.ll b/llvm/test/Bitcode/thinlto-function-summary-callgraph.ll
index 878d39391d7..af38c3ef121 100644
--- a/llvm/test/Bitcode/thinlto-function-summary-callgraph.ll
+++ b/llvm/test/Bitcode/thinlto-function-summary-callgraph.ll
@@ -22,12 +22,12 @@
; 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.
-; COMBINED-NEXT: <COMBINED {{.*}} op4=[[FUNCID:[0-9]+]] op5=1/>
+; COMBINED-NEXT: <COMBINED {{.*}} op5=[[FUNCID:[0-9]+]] op6=1/>
; COMBINED-NEXT: </GLOBALVAL_SUMMARY_BLOCK>
; COMBINED-NEXT: <VALUE_SYMTAB
; Entry for function func should have entry with value id FUNCID
-; COMBINED-NEXT: <COMBINED_GVDEFENTRY {{.*}} op0=[[FUNCID]] {{.*}} op2=7289175272376759421/>
-; COMBINED-NEXT: <COMBINED_GVDEFENTRY
+; COMBINED-NEXT: <COMBINED_ENTRY {{.*}} op0=[[FUNCID]] op1=7289175272376759421/>
+; COMBINED-NEXT: <COMBINED
; COMBINED-NEXT: </VALUE_SYMTAB>
; ModuleID = 'thinlto-function-summary-callgraph.ll'
diff --git a/llvm/test/Bitcode/thinlto-function-summary-originalnames.ll b/llvm/test/Bitcode/thinlto-function-summary-originalnames.ll
index 26cafeadd85..8777bd91607 100644
--- a/llvm/test/Bitcode/thinlto-function-summary-originalnames.ll
+++ b/llvm/test/Bitcode/thinlto-function-summary-originalnames.ll
@@ -13,9 +13,9 @@
; COMBINED-DAG: <COMBINED_ORIGINAL_NAME op0=-4170563161550796836/>
; COMBINED-NEXT: </GLOBALVAL_SUMMARY_BLOCK>
; COMBINED-NEXT: <VALUE_SYMTAB
-; COMBINED-NEXT: <COMBINED_GVDEFENTRY {{.*}} op2=4947176790635855146/>
-; COMBINED-NEXT: <COMBINED_GVDEFENTRY {{.*}} op2=-6591587165810580810/>
-; COMBINED-NEXT: <COMBINED_GVDEFENTRY {{.*}} op2=-4377693495213223786/>
+; COMBINED-NEXT: <COMBINED_ENTRY {{.*}} op1=4947176790635855146/>
+; COMBINED-NEXT: <COMBINED_ENTRY {{.*}} op1=-6591587165810580810/>
+; COMBINED-NEXT: <COMBINED_ENTRY {{.*}} op1=-4377693495213223786/>
; COMBINED-NEXT: </VALUE_SYMTAB>
source_filename = "/path/to/source.c"
diff --git a/llvm/test/Bitcode/thinlto-summary-linkage-types.ll b/llvm/test/Bitcode/thinlto-summary-linkage-types.ll
index 86b9bdfa9d2..e8fea12e40b 100644
--- a/llvm/test/Bitcode/thinlto-summary-linkage-types.ll
+++ b/llvm/test/Bitcode/thinlto-summary-linkage-types.ll
@@ -6,56 +6,56 @@
define private void @private()
; CHECK: <PERMODULE {{.*}} op1=8
-; COMBINED-DAG: <COMBINED {{.*}} op1=8
+; COMBINED-DAG: <COMBINED {{.*}} op2=8
{
ret void
}
define internal void @internal()
; CHECK: <PERMODULE {{.*}} op1=7
-; COMBINED-DAG: <COMBINED {{.*}} op1=7
+; COMBINED-DAG: <COMBINED {{.*}} op2=7
{
ret void
}
define available_externally void @available_externally()
; CHECK: <PERMODULE {{.*}} op1=1
-; COMBINED-DAG: <COMBINED {{.*}} op1=1
+; COMBINED-DAG: <COMBINED {{.*}} op2=1
{
ret void
}
define linkonce void @linkonce()
; CHECK: <PERMODULE {{.*}} op1=2
-; COMBINED-DAG: <COMBINED {{.*}} op1=2
+; COMBINED-DAG: <COMBINED {{.*}} op2=2
{
ret void
}
define weak void @weak()
; CHECK: <PERMODULE {{.*}} op1=4
-; COMBINED-DAG: <COMBINED {{.*}} op1=4
+; COMBINED-DAG: <COMBINED {{.*}} op2=4
{
ret void
}
define linkonce_odr void @linkonce_odr()
; CHECK: <PERMODULE {{.*}} op1=3
-; COMBINED-DAG: <COMBINED {{.*}} op1=3
+; COMBINED-DAG: <COMBINED {{.*}} op2=3
{
ret void
}
define weak_odr void @weak_odr()
; CHECK: <PERMODULE {{.*}} op1=5
-; COMBINED-DAG: <COMBINED {{.*}} op1=5
+; COMBINED-DAG: <COMBINED {{.*}} op2=5
{
ret void
}
define external void @external()
; CHECK: <PERMODULE {{.*}} op1=0
-; COMBINED-DAG: <COMBINED {{.*}} op1=0
+; COMBINED-DAG: <COMBINED {{.*}} op2=0
{
ret void
}
diff --git a/llvm/test/Bitcode/thinlto-summary-section.ll b/llvm/test/Bitcode/thinlto-summary-section.ll
index 82b6a109118..d120622db81 100644
--- a/llvm/test/Bitcode/thinlto-summary-section.ll
+++ b/llvm/test/Bitcode/thinlto-summary-section.ll
@@ -5,7 +5,7 @@
; RUN: llvm-bcanalyzer -dump %t2.thinlto.bc | FileCheck %s --check-prefix=COMBINED
; CHECK: <PERMODULE {{.*}} op1=16
-; COMBINED-DAG: <COMBINED {{.*}} op1=16
+; COMBINED-DAG: <COMBINED {{.*}} op2=16
define void @functionWithSection() section "some_section" {
ret void
}
diff --git a/llvm/test/tools/gold/X86/thinlto.ll b/llvm/test/tools/gold/X86/thinlto.ll
index dcd0003be79..4bf8aa68aa5 100644
--- a/llvm/test/tools/gold/X86/thinlto.ll
+++ b/llvm/test/tools/gold/X86/thinlto.ll
@@ -65,8 +65,8 @@
; COMBINED-NEXT: <VALUE_SYMTAB
; Check that the format is: op0=valueid, op1=offset, op2=funcguid,
; where funcguid is the lower 64 bits of the function name MD5.
-; COMBINED-NEXT: <COMBINED_GVDEFENTRY abbrevid={{[0-9]+}} op0={{1|2}} op1={{[0-9]+}} op2={{-3706093650706652785|-5300342847281564238}}
-; COMBINED-NEXT: <COMBINED_GVDEFENTRY abbrevid={{[0-9]+}} op0={{1|2}} op1={{[0-9]+}} op2={{-3706093650706652785|-5300342847281564238}}
+; COMBINED-NEXT: <COMBINED_ENTRY abbrevid={{[0-9]+}} op0={{1|2}} op1={{-3706093650706652785|-5300342847281564238}}
+; COMBINED-NEXT: <COMBINED_ENTRY abbrevid={{[0-9]+}} op0={{1|2}} op1={{-3706093650706652785|-5300342847281564238}}
; COMBINED-NEXT: </VALUE_SYMTAB
declare void @g(...)
diff --git a/llvm/test/tools/llvm-lto/thinlto.ll b/llvm/test/tools/llvm-lto/thinlto.ll
index ee00da238c2..38c4196bb25 100644
--- a/llvm/test/tools/llvm-lto/thinlto.ll
+++ b/llvm/test/tools/llvm-lto/thinlto.ll
@@ -17,8 +17,8 @@
; COMBINED-NEXT: <VALUE_SYMTAB
; Check that the format is: op0=valueid, op1=offset, op2=funcguid,
; where funcguid is the lower 64 bits of the function name MD5.
-; COMBINED-NEXT: <COMBINED_GVDEFENTRY abbrevid={{[0-9]+}} op0={{1|2}} op1={{[0-9]+}} op2={{-3706093650706652785|-5300342847281564238}}
-; COMBINED-NEXT: <COMBINED_GVDEFENTRY abbrevid={{[0-9]+}} op0={{1|2}} op1={{[0-9]+}} op2={{-3706093650706652785|-5300342847281564238}}
+; COMBINED-NEXT: <COMBINED_ENTRY abbrevid={{[0-9]+}} op0={{1|2}} op1={{-3706093650706652785|-5300342847281564238}}
+; COMBINED-NEXT: <COMBINED_ENTRY abbrevid={{[0-9]+}} op0={{1|2}} op1={{-3706093650706652785|-5300342847281564238}}
; COMBINED-NEXT: </VALUE_SYMTAB
define void @f() {
OpenPOWER on IntegriCloud