[PATCH] D119821: [Bitcode] Store type IDs for values

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 15 02:12:59 PST 2022


nikic created this revision.
nikic added a reviewer: opaque-pointers.
Herald added a subscriber: hiraditya.
nikic requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This is the next step towards supporting bitcode auto upgrade with opaque pointers. The ValueList now stores the `Value*` together with its associated type ID, which allows inspecting the original pointer element type of arbitrary values.

This is a largely mechanical change threading the type ID through various places. I've left TODOTypeID placeholders in a number of places where determining the type ID is either non-trivial or requires allocating a new type ID not present in the original bitcode. For this reason, the new type IDs are also not used for anything yet (apart from propagation). They will get used once the TODOs are resolved.


https://reviews.llvm.org/D119821

Files:
  llvm/lib/Bitcode/Reader/BitcodeReader.cpp
  llvm/lib/Bitcode/Reader/MetadataLoader.cpp
  llvm/lib/Bitcode/Reader/ValueList.cpp
  llvm/lib/Bitcode/Reader/ValueList.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119821.408775.patch
Type: text/x-patch
Size: 59639 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220215/0232dd41/attachment-0001.bin>


More information about the llvm-commits mailing list