[llvm-commits] [llvm] r74129 - /llvm/trunk/lib/Analysis/IPA/Andersens.cpp

Owen Anderson resistor at mac.com
Thu Jun 25 01:33:45 PDT 2009


On Jun 25, 2009, at 1:20 AM, Duncan Sands wrote:

> Hi Owen,
>
>>       // Timestamp a node (used for work list prioritization)
>>       void Stamp() {
>> -        Timestamp = Counter++;
>> +        Timestamp = Counter;
>> +        sys::AtomicIncrement(&Counter);
>
> does it matter if different threads have the same value for Timestamp?

No.  Really, the counter could be per-thread, but this solution was  
simpler to implement.

--Owen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2620 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090625/029c3937/attachment.bin>


More information about the llvm-commits mailing list