[llvm] Use an abbrev to reduce size of VALUE_GUID records in ThinLTO summaries (PR #90497)

Jan Voung via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 29 17:59:37 PDT 2024


jvoung wrote:

> thanks! out of curiosity, what happens if you try to specify a 64-bit fixed width value?

On the writer side, each chunk eventually gets to Emit: https://github.com/llvm/llvm-project/blob/9a1386e5fabb0d2741f2f7c873342eb86e350e9e/llvm/include/llvm/Bitstream/BitstreamWriter.h#L209 where the `Val` is of type `uint32_t` and there's an assert that requested `NumBits` is `<= 32`. 

I think there's other assumptions of the accumulator `CurValue` being 32-bits, and so on. On the Reader side similar checks / assumptions that the `MaxChunkSize` is 32 bits. https://github.com/llvm/llvm-project/blob/9a1386e5fabb0d2741f2f7c873342eb86e350e9e/llvm/include/llvm/Bitstream/BitstreamReader.h#L378

https://github.com/llvm/llvm-project/pull/90497


More information about the llvm-commits mailing list