[PATCH] D28083: Add an index for Module Metadata record in the bitcode

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 23 15:26:30 PST 2016


mehdi_amini created this revision.
mehdi_amini added reviewers: pcc, tejohnson.
mehdi_amini added a subscriber: llvm-commits.

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.


https://reviews.llvm.org/D28083

Files:
  llvm/include/llvm/Bitcode/BitstreamWriter.h
  llvm/include/llvm/Bitcode/LLVMBitCodes.h
  llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
  llvm/test/Bitcode/mdnodes-distinct-in-post-order.ll
  llvm/test/Bitcode/mdnodes-distinct-nodes-break-cycles.ll
  llvm/test/Bitcode/mdnodes-distinct-nodes-first.ll
  llvm/test/Bitcode/mdnodes-in-post-order.ll
  llvm/test/Bitcode/metadata-function-blocks.ll
  llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28083.82425.patch
Type: text/x-patch
Size: 10657 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161223/5b5171f2/attachment.bin>


More information about the llvm-commits mailing list