[ThinLTO] Print module summary index to assembly
Summary: Implements AsmWriter support for printing the module summary index to assembly with the format discussed in the RFC "LLVM Assembly format for ThinLTO Summary". Implements just enough of the parsing support to recognize and ignore the summary entries. As agreed in the RFC thread, this will be the behavior when assembling the IR. A follow on change will implement parsing/assembling of the summary entries for use by tools that currently build the summary index from bitcode. Reviewers: dexonsmith, pcc Subscribers: inglorion, eraman, steven_wu, dblaikie, llvm-commits Differential Revision: https://reviews.llvm.org/D46699 llvm-svn: 333335
This commit is contained in:
1 parent
ffebfe10c1
commit
08d5b4ef0d
18 files changed
+1084
-61
No files matched your search
@@ -1,6 +1,7 @@
|
||||
; Test to check both the callgraph and refgraph in summary
|
||||
; 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
|
||||
|
||||
; CHECK: <SOURCE_FILENAME
|
||||
; "bar"
|
||||
@@ -140,3 +141,17 @@ entry:
|
||||
call i8 @llvm.ctpop.i8( i8 10 )
|
||||
ret i32 0
|
||||
}
|
||||
|
||||
; DIS: ^0 = module: (path: "{{.*}}/test/Bitcode/Output/thinlto-function-summary-refgraph.ll.tmp.o", hash: (0, 0, 0, 0, 0))
|
||||
; DIS: ^1 = gv: (name: "Z", summaries: (function: (module: ^0, flags: (linkage: linkonce_odr, notEligibleToImport: 0, live: 0, dsoLocal: 0), insts: 2, calls: ((callee: ^8))))) ; guid = 104084381700047393
|
||||
; DIS: ^2 = gv: (name: "X", summaries: (function: (module: ^0, flags: (linkage: available_externally, notEligibleToImport: 0, live: 0, dsoLocal: 0), insts: 2, calls: ((callee: ^4)), refs: (^4)))) ; guid = 1881667236089500162
|
||||
; DIS: ^3 = gv: (name: "W", summaries: (function: (module: ^0, flags: (linkage: weak_odr, notEligibleToImport: 0, live: 0, dsoLocal: 0), insts: 2, calls: ((callee: ^6)), refs: (^7)))) ; guid = 5790125716599269729
|
||||
; DIS: ^4 = gv: (name: "foo") ; guid = 6699318081062747564
|
||||
; DIS: ^5 = gv: (name: "func") ; guid = 7289175272376759421
|
||||
; DIS: ^6 = gv: (name: "func3") ; guid = 11517462787082255043
|
||||
; DIS: ^7 = gv: (name: "globalvar", summaries: (variable: (module: ^0, flags: (linkage: external, notEligibleToImport: 0, live: 0, dsoLocal: 0)))) ; guid = 12887606300320728018
|
||||
; DIS: ^8 = gv: (name: "func2") ; guid = 14069196320850861797
|
||||
; DIS: ^9 = gv: (name: "llvm.ctpop.i8") ; guid = 15254915475081819833
|
||||
; DIS: ^10 = gv: (name: "main", summaries: (function: (module: ^0, flags: (linkage: external, notEligibleToImport: 0, live: 0, dsoLocal: 0), insts: 9, calls: ((callee: ^5)), refs: (^5)))) ; guid = 15822663052811949562
|
||||
; DIS: ^11 = gv: (name: "bar", summaries: (variable: (module: ^0, flags: (linkage: external, notEligibleToImport: 0, live: 0, dsoLocal: 0), refs: (^5)))) ; guid = 16434608426314478903
|
||||
; DIS: ^12 = gv: (name: "Y", summaries: (function: (module: ^0, flags: (linkage: private, notEligibleToImport: 0, live: 0, dsoLocal: 1), insts: 14, calls: ((callee: ^8))))) ; guid = 18057131226797195731
|
||||
Reference in new issue
Block a user