summaryrefslogtreecommitdiffstats
path: root/llvm/test/Bitcode/mdnodes-in-post-order.ll
diff options
context:
space:
mode:
authorMehdi Amini <mehdi.amini@apple.com>2016-12-28 19:44:19 +0000
committerMehdi Amini <mehdi.amini@apple.com>2016-12-28 19:44:19 +0000
commit32ca14819848b362af9e1879f3811e68427f5279 (patch)
treea3e908a27535a53a4ba4b72c4a30d49baba0af65 /llvm/test/Bitcode/mdnodes-in-post-order.ll
parent26dada79ffeba8237f50827da884111809633c7e (diff)
downloadbcm5719-llvm-32ca14819848b362af9e1879f3811e68427f5279.tar.gz
bcm5719-llvm-32ca14819848b362af9e1879f3811e68427f5279.zip
Add an index for Module Metadata record in the bitcode
Summary: This index record the position for each metadata record in the bitcode, so that the reader will be able to lazy-load on demand each individual record. We also make sure that every abbrev is emitted upfront so that the block can be skipped while reading. I don't plan to commit this before having the reader counterpart, but I figured this can be reviewed mostly independently. Reviewers: pcc, tejohnson Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28083 llvm-svn: 290684
Diffstat (limited to 'llvm/test/Bitcode/mdnodes-in-post-order.ll')
-rw-r--r--llvm/test/Bitcode/mdnodes-in-post-order.ll7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/test/Bitcode/mdnodes-in-post-order.ll b/llvm/test/Bitcode/mdnodes-in-post-order.ll
index fbe1c34cf00..845175d6879 100644
--- a/llvm/test/Bitcode/mdnodes-in-post-order.ll
+++ b/llvm/test/Bitcode/mdnodes-in-post-order.ll
@@ -15,6 +15,9 @@
; CHECK-NEXT: 'leaf
; CHECK-NEXT: }
+; Before the records we emit an offset to the index for the block
+; CHECK-NEXT: <INDEX_OFFSET
+
; The leafs should come first (in either order).
; CHECK-NEXT: <NODE op0=1/>
; CHECK-NEXT: <NODE op0=2/>
@@ -27,6 +30,10 @@
; CHECK-NEXT: <NODE op0=3 op1=5 op2=4/>
!6 = !{!3, !5, !4}
+; Before the named records we emit the index containing the position of the
+; previously emitted records
+; CHECK-NEXT: <INDEX {{.*}} (offset match)
+
; Note: named metadata nodes are not cannot reference null so their operands
; are numbered off-by-one.
; CHECK-NEXT: <NAME
OpenPOWER on IntegriCloud