[llvm-commits] PATCH: Refactored hashing for constant unique map

Talin viridia at gmail.com
Sun Feb 5 16:51:05 PST 2012


On Sun, Feb 5, 2012 at 4:49 PM, Nick Lewycky <nicholas at mxc.ca> wrote:

> Jakob Stoklund Olesen wrote:
>
>>
>> On Feb 5, 2012, at 4:31 PM, Talin wrote:
>>
>>  Patch to refactor the hashing functions for the constant unique map, to
>>> avoid code duplication.
>>>
>>
>> Wouldn't it give nicer code if you kept the intermediate state as a class
>> member?
>>
>> Something like:
>>
>> IncrementalHash Hash
>> Hash.add(foo);
>> Hahs.add(bar);
>> return Hash.finish();
>>
>
> You mean, FoldingSetNodeID? :)
>

No - FoldingSetNodeID keeps a vector of all of the values. This just
computes the hash only.

>
> Nick
>



-- 
-- Talin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120205/73b5cb47/attachment.html>


More information about the llvm-commits mailing list