[llvm-commits] [llvm] r165739 - in /llvm/trunk: include/llvm/Bitcode/BitstreamReader.h lib/Bitcode/Reader/BitcodeReader.cpp lib/Bitcode/Reader/BitcodeReader.h lib/Bitcode/Writer/BitcodeWriter.cpp test/Bitcode/function-encoding-rel-operands.ll

Jan Voung jvoung at chromium.org
Thu Oct 11 14:47:45 PDT 2012


Oops, thanks Duncan -- fixed.


On Thu, Oct 11, 2012 at 1:32 PM, Duncan Sands <baldrick at free.fr> wrote:

> Hi Jan,
>
>
>  Change encoding of instruction operands in bitcode binaries to be relative
>> to the instruction position.  The old encoding would give an absolute
>> ID which counts up within a function, and only resets at the next
>> function.
>>
>
> it looks great!  I did notice the following typos:
>
>
>  --- llvm/trunk/lib/Bitcode/Reader/**BitcodeReader.h (original)
>> +++ llvm/trunk/lib/Bitcode/Reader/**BitcodeReader.h Thu Oct 11 15:20:40
>> 2012
>> @@ -179,18 +179,27 @@
>>     typedef std::pair<unsigned, GlobalVariable*> BlockAddrRefTy;
>>     DenseMap<Function*, std::vector<BlockAddrRefTy> > BlockAddrFwdRefs;
>>
>> +  /// UseRelativeIDs - Indicates that we are using a new encoding for
>> +  /// instrunction operands where most operands in the current
>>
>
> instrunction -> instruction
>
>
>  +  /// FUNCTION_BLOCK are encoded relative to the instruction number,
>> +  /// for a more compact encoding.  Some instruction operands are not
>> +  /// relative to the instruction ID: basic block numbers, and types.
>> +  /// Once the old style function blocks have been phased out, we would
>> +  /// not need this flag.
>> +  bool UseRelativeIDs;
>>
> ...
>
>
>  @@ -1514,8 +1551,8 @@
>>   // Emit blockinfo, which defines the standard abbreviations etc.
>>   static void WriteBlockInfo(const ValueEnumerator &VE, BitstreamWriter
>> &Stream) {
>>     // We only want to emit block info records for blocks that have
>> multiple
>> -  // instances: CONSTANTS_BLOCK, FUNCTION_BLOCK and VALUE_SYMTAB_BLOCK.
>>  Other
>> -  // blocks can defined their abbrevs inline.
>> +  // instances: CONSTANTS_BLOCK, FUNCTION_BLOCK and VALUE_SYMTAB_BLOCK.
>> +  // Other blocks can defined their abbrevs inline.
>>
>
> can defined -> can define
>
>
>      Stream.EnterBlockInfoBlock(2);
>>
>>     { // 8-bit fixed-width VST_ENTRY/VST_BBENTRY strings.
>>
>
> Ciao, Duncan.
>
>
> ______________________________**_________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/**mailman/listinfo/llvm-commits<http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121011/7c803af5/attachment.html>


More information about the llvm-commits mailing list