[llvm-commits] [llvm] r152116 - /llvm/trunk/lib/VMCore/ConstantsContext.h

Duncan Sands baldrick at free.fr
Tue Mar 6 03:08:46 PST 2012


Hi Jay,

>>> +      hash_code code = hash_value(CP->getType());
>>> +      for (unsigned I = 0, E = CP->getNumOperands(); I<    E; ++I)
>>> +        code = hash_combine(code, hash_value(CP->getOperand(I)));
>>
>> maybe this could/should be done with hash_combine_range?
>
> As Meador explained when he posted the patch :-) the operands array is
> an array of Uses, but we don't want to hash the whole of each Use,
> just the Value* pointer.

I see, thanks for explaining.  Since hashing all operands is likely to come up
a lot, maybe there should be a helper for it?

Ciao, Duncan.



More information about the llvm-commits mailing list