[PATCH] D76295: Use 64 bit integers for bit offsets inside AST file

Dmitry Polukhin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 17 11:16:55 PDT 2020


DmitryPolukhin added a comment.

In D76295#1927041 <https://reviews.llvm.org/D76295#1927041>, @aganea wrote:

> Hello Dmitry! Could we use varints <https://developers.google.com/protocol-buffers/docs/encoding#varints> instead of uint64_t if size on disk is a concern?


Variants are very close to LLVM Bitcode Variable Width Integers <https://llvm.org/docs/BitCodeFormat.html#variable-width-value> that can be even smaller than byte. So I think the answer is yes but it will require replacing blobs with encoded values and I'm not sure why it was not implemented this way from the beginning taking into account that mechanism exists. Perhaps it happens because indices can be memory mapped and used as is without expansion in memory.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76295





More information about the cfe-commits mailing list