[llvm-commits] CVS: llvm/include/llvm/ValueSymbolTable.h TypeSymbolTable.h SymbolTable.h

Chris Lattner sabre at nondot.org
Wed May 31 14:17:03 PDT 2006


On Wed, 31 May 2006, Reid Spencer wrote:
> Wouldn't uint32_t be sufficient for these? I can't see anyone having
> more than 4 billion name collisions. And it reduce a little arithmetic
> cost on 32-bit platforms.

Fine with me either way.  Collision handling code isn't going to amazingly 
suffer from having to increment a 64-bit value on 32-bit hosts, but utostr 
is a little more expensive for 64-bit values I guess.

-Chris

> On Wed, 2006-05-31 at 15:18 -0500, Andrew Lenharth wrote:
>> Log message:
>>
>> Fix build breakage on alpha, without causing it on x86.  as a bonus, all platforms can invent the same number of unique names now
>> Index: llvm/include/llvm/ValueSymbolTable.h
>> diff -u llvm/include/llvm/ValueSymbolTable.h:1.1 llvm/include/llvm/ValueSymbolTable.h:1.2
>> --- llvm/include/llvm/ValueSymbolTable.h:1.1	Tue Jan 10 03:51:48 2006
>> +++ llvm/include/llvm/ValueSymbolTable.h	Wed May 31 15:18:28 2006
>> @@ -127,7 +127,7 @@
>>  /// @{
>>  private:
>>    ValueMap vmap;                    ///< The map that holds the symbol table.
>> -  mutable unsigned long LastUnique; ///< Counter for tracking unique names
>> +  mutable uint64_t LastUnique; ///< Counter for tracking unique names
>>
>
>

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/



More information about the llvm-commits mailing list