[PATCH] D96170: [llvm][Bitcode] Add bitcode reader/writer for DSOLocalEquivalent

Leonard Chan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 16 16:52:03 PST 2021


leonardchan added a comment.

In D96170#2567026 <https://reviews.llvm.org/D96170#2567026>, @rjmccall wrote:

> In D96170#2566975 <https://reviews.llvm.org/D96170#2566975>, @leonardchan wrote:
>
>> In D96170#2561432 <https://reviews.llvm.org/D96170#2561432>, @rjmccall wrote:
>>
>>> I've never patched the bitcode reader/writer before, I think, but from similar patches I've seen, this look good to me.  Is there any sort of registration you're supposed to do of the new code?
>>
>> Hmm. By registration, do you mean making cmake aware of the new test? I don't *think* there's anything else I may need to change. I mainly just copied similar logic from how the other constant codes are handled.
>>
>> Adding @rnk who may have more familiarity.
>
> Some of the other serializers using bitcode require some of the codes to be registered, either as abbreviations or just for incidental reasons.  If there's nothing like that for similar record codes, though, it's probably not a thing for BC.

Ah I see. So something similar to:

  Abbv->Add(BitCodeAbbrevOp(bitc::CST_CODE_STRING));

It seems there's a handful of other ConstantCode BCs that use this, but most of them don't seem to use it. I'm guessing this might also be a case where it's not required.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96170/new/

https://reviews.llvm.org/D96170



More information about the llvm-commits mailing list