aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/Bitcode/thinlto-function-summary-refgraph.ll
diff options
context:
space:
mode:
authorTeresa Johnson <tejohnson@google.com>2018-06-26 13:56:49 +0000
committerTeresa Johnson <tejohnson@google.com>2018-06-26 13:56:49 +0000
commit63ee0e73e44e80d4e6d388de734cdb5106c8a6de (patch)
tree84f4df06ba721af4966e6f527e22e8bf9d094068 /llvm/test/Bitcode/thinlto-function-summary-refgraph.ll
parent5915777eca88a8c14c58869219aa6fe1543a70b5 (diff)
downloadllvm-63ee0e73e44e80d4e6d388de734cdb5106c8a6de.zip
llvm-63ee0e73e44e80d4e6d388de734cdb5106c8a6de.tar.gz
llvm-63ee0e73e44e80d4e6d388de734cdb5106c8a6de.tar.bz2
[ThinLTO] Parse module summary index from assembly
Summary: Adds assembly parsing support for the module summary index (follow on to r333335 which added the assembly writing support). I added support to llvm-as to invoke the index parsing, so that it can create either a bitcode file with a Module and a per-module index, or a combined index without a Module. I will send follow on patches soon to do the following: - add support to tools such as llvm-lto2 to parse the per-module indexes from assembly instead of bitcode when testing the thin link. - verification support. Depends on D47844 and D47842. Reviewers: pcc, dexonsmith, mehdi_amini Subscribers: inglorion, eraman, steven_wu, llvm-commits Differential Revision: https://reviews.llvm.org/D47905 llvm-svn: 335602
Diffstat (limited to 'llvm/test/Bitcode/thinlto-function-summary-refgraph.ll')
-rw-r--r--llvm/test/Bitcode/thinlto-function-summary-refgraph.ll4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/test/Bitcode/thinlto-function-summary-refgraph.ll b/llvm/test/Bitcode/thinlto-function-summary-refgraph.ll
index 4de5242..848598f 100644
--- a/llvm/test/Bitcode/thinlto-function-summary-refgraph.ll
+++ b/llvm/test/Bitcode/thinlto-function-summary-refgraph.ll
@@ -2,6 +2,8 @@
; RUN: opt -module-summary %s -o %t.o
; RUN: llvm-bcanalyzer -dump %t.o | FileCheck %s
; RUN: llvm-dis -o - %t.o | FileCheck %s --check-prefix=DIS
+; Round trip it through llvm-as
+; RUN: llvm-dis -o - %t.o | llvm-as -o - | llvm-dis -o - | FileCheck %s --check-prefix=DIS
; CHECK: <SOURCE_FILENAME
; "bar"
@@ -145,7 +147,7 @@ entry:
; Don't try to match summary IDs. The numbering depends on the map iteration
; order, which depends on GUID, and the private function Y GUID will depend
; on the path to the test.
-; DIS: ^0 = module: (path: "{{.*}}thinlto-function-summary-refgraph.ll.tmp.o", hash: (0, 0, 0, 0, 0))
+; DIS: ^0 = module: (path: "{{.*}}", hash: (0, 0, 0, 0, 0))
; DIS-DAG: = gv: (name: "Z", summaries: (function: (module: ^0, flags: (linkage: linkonce_odr, notEligibleToImport: 0, live: 0, dsoLocal: 0), insts: 2, calls: ((callee: ^{{.*}}))))) ; guid = 104084381700047393
; DIS-DAG: = gv: (name: "X", summaries: (function: (module: ^0, flags: (linkage: available_externally, notEligibleToImport: 0, live: 0, dsoLocal: 0), insts: 2, calls: ((callee: ^{{.*}})), refs: (^{{.*}})))) ; guid = 1881667236089500162
; DIS-DAG: = gv: (name: "W", summaries: (function: (module: ^0, flags: (linkage: weak_odr, notEligibleToImport: 0, live: 0, dsoLocal: 0), insts: 2, calls: ((callee: ^{{.*}})), refs: (^{{.*}})))) ; guid = 5790125716599269729