mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-21 03:05:26 -04:00
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290684 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -17,6 +17,10 @@
|
||||
; CHECK-NEXT: <DISTINCT_NODE op0=1 op1=3 op2=2/>
|
||||
!4 = distinct !{!1, !3, !2}
|
||||
|
||||
; 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
|
||||
|
||||
@@ -22,6 +22,10 @@
|
||||
; CHECK-NEXT: <NODE op0=2/>
|
||||
!3 = !{!2}
|
||||
|
||||
; 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
|
||||
|
||||
@@ -11,6 +11,10 @@
|
||||
; CHECK-NEXT: <NODE op0=1/>
|
||||
!2 = !{!1}
|
||||
|
||||
; 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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
; Each node gets a new number. Bottom-up traversal of nodes.
|
||||
!named = !{!6}
|
||||
|
||||
; Before the records we emit an offset to the index for the block
|
||||
; CHECK-NEXT: <INDEX_OFFSET
|
||||
|
||||
; CHECK-NEXT: <NODE op0=1/>
|
||||
!4 = !{!"named"}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user