[cfe-commits] r59173 - /cfe/trunk/include/clang/AST/TypeOrdering.h

Doug Gregor doug.gregor at gmail.com
Wed Nov 12 14:13:17 PST 2008


On Wed, Nov 12, 2008 at 5:07 PM, Daniel Dunbar <daniel at zuster.org> wrote:
> Out of curiosity, was this motivated by a test case? Should we care
> about monitoring performance of this?

It's just a hunch, really; I don't think we need to monitor
performance of just this bit. I'd like to monitor performance of
overload resolution as a whole at some point, however.

  - Doug

> On Wed, Nov 12, 2008 at 1:52 PM, Douglas Gregor <doug.gregor at gmail.com> wrote:
>> Author: dgregor
>> Date: Wed Nov 12 15:52:20 2008
>> New Revision: 59173
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=59173&view=rev
>> Log:
>> Slightly improve type hash
>>
>> Modified:
>>    cfe/trunk/include/clang/AST/TypeOrdering.h
>>
>> Modified: cfe/trunk/include/clang/AST/TypeOrdering.h
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/TypeOrdering.h?rev=59173&r1=59172&r2=59173&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/include/clang/AST/TypeOrdering.h (original)
>> +++ cfe/trunk/include/clang/AST/TypeOrdering.h Wed Nov 12 15:52:20 2008
>> @@ -42,7 +42,8 @@
>>     }
>>
>>     static unsigned getHashValue(clang::QualType Val) {
>> -      return (unsigned)Val.getAsOpaquePtr();
>> +      return (unsigned)Val.getAsOpaquePtr() ^
>> +             ((unsigned)Val.getAsOpaquePtr() >> 9);
>>     }
>>
>>     static bool isEqual(clang::QualType LHS, clang::QualType RHS) {
>>
>>
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>
>



More information about the cfe-commits mailing list