<div dir="ltr"><font color="#000000" face="arial, sans-serif">Hi,</font><div><font color="#000000" face="arial, sans-serif"><br></font></div><div><div><font color="#000000" face="arial, sans-serif"><a href="https://llvm.org/docs/BitCodeFormat.html#enter-subblock-encoding">https://llvm.org/docs/BitCodeFormat.html#enter-subblock-encoding</a><br></font></div><div><font color="#000000" face="arial, sans-serif">"The <code class="gmail-docutils gmail-literal gmail-notranslate" style=""><span class="gmail-pre" style="hyphens: none;">blocklen</span></code> 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."</font></div></div><div><font color="#000000" face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif"><font color="#000000">In the code base, the parsing function of BitstreamCursor::<span style="background-color:rgb(251,252,253);white-space:pre-wrap"><a href="https://llvm.org/doxygen/BitstreamReader_8h_source.html#l00498">EnterSubBlock</a> has an optional argument to return </span></font>blocklen. </font><span style="font-family:arial,sans-serif">The </span><a href="https://llvm.org/doxygen/BitcodeAnalyzer_8cpp_source.html#I00759" style="font-family:arial,sans-serif">code</a><span style="font-family:arial,sans-serif"> at BitcodeAnalyzer is the only one that uses this argument. But it simply prints its value. </span><span style="font-family:arial,sans-serif">I did not find any code that uses the value to skip reading bitcode files.</span></div><div><font color="#000000" face="arial, sans-serif"><br></font></div><div><font color="#000000" face="arial, sans-serif">Does anyone know if any clients use blocklen?</font></div><div><a href="https://llvm.org/doxygen/BitstreamReader_8h_source.html#l00498"><font color="#000000" face="arial, sans-serif"></font></a><br></div><div>I am interested in this because Bitcode Writer cannot flush memory because it needs to <a href="https://llvm.org/doxygen/BitstreamWriter_8h_source.html#l00242">backfill</a> until the end of a block. At the very-top level, there is such a <a href="https://llvm.org/doxygen/BitcodeWriter_8cpp_source.html#I04328">block</a>: MODULE_BLOCK. So the entire bitcode contents cannot be flushed. </div><div><br></div><div>Thank you,</div></div>