[llvm-commits] [llvm] r53390 - /llvm/trunk/lib/CodeGen/RegAllocLocal.cpp

Owen Anderson resistor at mac.com
Wed Jul 9 21:15:38 PDT 2008


On Jul 9, 2008, at 9:03 PM, Chris Lattner wrote:

>
> On Jul 9, 2008, at 6:56 PM, Owen Anderson wrote:
>
>> Author: resistor
>> Date: Wed Jul  9 20:56:35 2008
>> New Revision: 53390
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=53390&view=rev
>> Log:
>> Use DenseMap instead of std::map in local register allocation.  This
>> improves the time on instcombine from .31s to .22s
>
> nice!
>
>>      if (MO.isReg() && MO.getReg() && MO.isDef()) {
>> -        std::map<unsigned, std::pair<MachineInstr*, unsigned>
>>> ::iterator
>> +        DenseMap<unsigned, std::pair<MachineInstr*, unsigned>
>>> ::iterator
>>          last = LastUseDef.find(MO.getReg());
>
> Neither of these loops will care that iteration will be non-
> deterministic, will they?
>

Nope.

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


More information about the llvm-commits mailing list