This is an archive of the discontinued LLVM Phabricator instance.

NFC. Refactor bitcode writer
AbandonedPublic

Authored by beanz on Mar 18 2022, 10:24 AM.

Details

Summary

This is an initial NFC refactor of the LLVM bitcode writer to support
implementing alternate bitcode serializations of LLVM IR.

This refactoring moves the basic bitcode encoding helper functionality
into a header that is available outside the BitWriter library.

This is in support of adding DXIL emission to LLVM as discussed in the
RFC here:
https://discourse.llvm.org/t/rfc-adding-hlsl-and-directx-support-to-clang-llvm/60783/

Diff Detail

Event Timeline

beanz created this revision.Mar 18 2022, 10:24 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 18 2022, 10:24 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
beanz requested review of this revision.Mar 18 2022, 10:24 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 18 2022, 10:24 AM
jdoerfert edited the summary of this revision. (Show Details)Mar 18 2022, 1:27 PM
efriedma added inline comments.
llvm/include/llvm/Bitcode/BitcodeWriterBase.h
200

Not sure I follow why you're exposing ModuleBitcodeWriter publicly.

beanz updated this revision to Diff 418053.Mar 24 2022, 2:51 PM

Rolling back some unintendedly over-grabby changes :)

beanz abandoned this revision.Mar 25 2022, 3:37 PM

Abandoning this revision. Reviews on the downstream changes have requested forking the full bit writer infrastructure instead of refactoring it for reuse. The next patch in the stack has the forked bit writer (see: D122082).