[llvm-commits] [llvm] r68465 - in /llvm/trunk: docs/BitCodeFormat.html include/llvm/Bitcode/BitCodes.h include/llvm/Bitcode/BitstreamReader.h include/llvm/Bitcode/BitstreamWriter.h

Duncan Sands baldrick at free.fr
Tue Apr 7 00:47:34 PDT 2009


Hi Chris,

> +<li value="5">Blob: This field is emitted as a vbr6, followed by padding to a
> +    32-bit boundary (for alignment) and an array of 8-bit objects.  The array of
> +    bytes is further followed by tail padding to ensure that its total length is
> +    a multiple of 4 bytes.  This makes it very efficient for the reader to
> +    decode the data without having to make a copy of it: it can use a pointer to
> +    the data in the mapped in file and poke directly at it.  A blob may only
> +    occur as the last operand of an abbreviation.</li>

...

> +    Blob  = 5   // 8-bit aligned array of 8-bit characters.

in the docs it says 32-bit aligned, but here it says 8-bit...

> +        // Align end to 32-bits.
> +        while (Out.size() & 3)
> +          Out.push_back(0);

Can you use FlushToWord() here instead?

Ciao,

Duncan.




More information about the llvm-commits mailing list