summaryrefslogtreecommitdiffstats
path: root/llvm/test/Bitcode/thinlto-function-summary-callgraph-relbf.ll
diff options
context:
space:
mode:
authorTeresa Johnson <tejohnson@google.com>2018-05-26 02:34:13 +0000
committerTeresa Johnson <tejohnson@google.com>2018-05-26 02:34:13 +0000
commit08d5b4ef0d0839761e3b7546efcd3ee0454742ea (patch)
tree1962452dfea56ccff172d7612ec1a8c982de27e2 /llvm/test/Bitcode/thinlto-function-summary-callgraph-relbf.ll
parentffebfe10c1cfc2eae92ddd0dc1b212595ac47864 (diff)
downloadbcm5719-llvm-08d5b4ef0d0839761e3b7546efcd3ee0454742ea.tar.gz
bcm5719-llvm-08d5b4ef0d0839761e3b7546efcd3ee0454742ea.zip
[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
Diffstat (limited to 'llvm/test/Bitcode/thinlto-function-summary-callgraph-relbf.ll')
-rw-r--r--llvm/test/Bitcode/thinlto-function-summary-callgraph-relbf.ll6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/test/Bitcode/thinlto-function-summary-callgraph-relbf.ll b/llvm/test/Bitcode/thinlto-function-summary-callgraph-relbf.ll
index 9955de6d958..b4e774f51f9 100644
--- a/llvm/test/Bitcode/thinlto-function-summary-callgraph-relbf.ll
+++ b/llvm/test/Bitcode/thinlto-function-summary-callgraph-relbf.ll
@@ -1,6 +1,7 @@
; Test to check the callgraph in summary
; RUN: opt -write-relbf-to-summary -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
@@ -33,3 +34,8 @@ declare void @func(...) #1
@undefinedglob = external global i32
; OLD: Index {{.*}} contains 1 nodes (1 functions, 0 alias, 0 globals) and 1 edges (0 refs and 1 calls)
+
+; DIS: ^0 = module: (path: "{{.*}}/test/Bitcode/Output/thinlto-function-summary-callgraph-relbf.ll.tmp.o", hash: (0, 0, 0, 0, 0))
+; DIS: ^1 = gv: (name: "func") ; guid = 7289175272376759421
+; DIS: ^2 = gv: (name: "main", summaries: (function: (module: ^0, flags: (linkage: external, notEligibleToImport: 0, live: 0, dsoLocal: 0), insts: 3, calls: ((callee: ^1, relbf: 256)), refs: (^3)))) ; guid = 15822663052811949562
+; DIS: ^3 = gv: (name: "undefinedglob") ; guid = 18036901804029949403
OpenPOWER on IntegriCloud