hryx / llvm-bitcode

Experimental LLVM bitcode reader/writer
MIT License
20 stars 0 forks source link

Implement bitcode writer #3

Open hryx opened 1 year ago

hryx commented 1 year ago

Render the LLVM Bitcode structure to the bitstream format.

The only complicated part of this is the ability to choose the best encoding scheme for any given record (unabbreviated or using a custom abbreviation). I think a good way to start is rendering everything as unabbreviated, then introduce a way to render a record given a specific encoding scheme, and then finally a strategy for choosing a good encoding scheme for a given arbitrary record.