[all-commits] [llvm/llvm-project] b6eafb: [Bitcode] Store type IDs for values

Nikita Popov via All-commits all-commits at lists.llvm.org
Tue Feb 22 08:27:22 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b6eafba296fc0444892a176ccc3cb947399b408c
      https://github.com/llvm/llvm-project/commit/b6eafba296fc0444892a176ccc3cb947399b408c
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-02-22 (Tue, 22 Feb 2022)

  Changed paths:
    M llvm/lib/Bitcode/Reader/BitcodeReader.cpp
    M llvm/lib/Bitcode/Reader/MetadataLoader.cpp
    M llvm/lib/Bitcode/Reader/ValueList.cpp
    M llvm/lib/Bitcode/Reader/ValueList.h

  Log Message:
  -----------
  [Bitcode] Store type IDs for values

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.

Differential Revision: https://reviews.llvm.org/D119821




More information about the All-commits mailing list