Stephan Z via llvm-dev
2020-Aug-27 03:35 UTC
[llvm-dev] Who uses blocklen_32 in ENTER_SUBBLOCK
Hi, https://llvm.org/docs/BitCodeFormat.html#enter-subblock-encoding "The blocklen value is a 32-bit aligned value that specifies the size of the subblock in 32-bit words. This value allows the reader to skip over the entire block in one jump." In the code base, the parsing function of BitstreamCursor::EnterSubBlock <https://llvm.org/doxygen/BitstreamReader_8h_source.html#l00498> has an optional argument to return blocklen. The code <https://llvm.org/doxygen/BitcodeAnalyzer_8cpp_source.html#I00759> at BitcodeAnalyzer is the only one that uses this argument. But it simply prints its value. I did not find any code that uses the value to skip reading bitcode files. Does anyone know if any clients use blocklen? <https://llvm.org/doxygen/BitstreamReader_8h_source.html#l00498> I am interested in this because Bitcode Writer cannot flush memory because it needs to backfill <https://llvm.org/doxygen/BitstreamWriter_8h_source.html#l00242> until the end of a block. At the very-top level, there is such a block <https://llvm.org/doxygen/BitcodeWriter_8cpp_source.html#I04328>: MODULE_BLOCK. So the entire bitcode contents cannot be flushed. Thank you, -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200826/058e672b/attachment.html>
Stephan Z via llvm-dev
2020-Aug-27 05:11 UTC
[llvm-dev] Who uses blocklen_32 in ENTER_SUBBLOCK
nvm. ValueSymbolTable uses this blocklen a lot. On Wed, Aug 26, 2020 at 8:35 PM Stephan Z <stephan.yichao.zhao at gmail.com> wrote:> Hi, > > https://llvm.org/docs/BitCodeFormat.html#enter-subblock-encoding > "The blocklen value is a 32-bit aligned value that specifies the size of > the subblock in 32-bit words. This value allows the reader to skip over the > entire block in one jump." > > In the code base, the parsing function of BitstreamCursor::EnterSubBlock > <https://llvm.org/doxygen/BitstreamReader_8h_source.html#l00498> has an > optional argument to return blocklen. The code > <https://llvm.org/doxygen/BitcodeAnalyzer_8cpp_source.html#I00759> at > BitcodeAnalyzer is the only one that uses this argument. But it simply > prints its value. I did not find any code that uses the value to skip > reading bitcode files. > > Does anyone know if any clients use blocklen? > <https://llvm.org/doxygen/BitstreamReader_8h_source.html#l00498> > I am interested in this because Bitcode Writer cannot flush memory because > it needs to backfill > <https://llvm.org/doxygen/BitstreamWriter_8h_source.html#l00242> until > the end of a block. At the very-top level, there is such a block > <https://llvm.org/doxygen/BitcodeWriter_8cpp_source.html#I04328>: > MODULE_BLOCK. So the entire bitcode contents cannot be flushed. > > Thank you, >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200826/fd8a01f7/attachment.html>