[llvm-commits] [llvm] r52951 - in /llvm/trunk: include/llvm/Target/TargetRegisterInfo.h utils/TableGen/RegisterInfoEmitter.cpp

Owen Anderson resistor at mac.com
Tue Jul 1 10:07:24 PDT 2008


On Jul 1, 2008, at 10:02 AM, Chris Lattner wrote:

>
> On Jul 1, 2008, at 12:02 AM, Owen Anderson wrote:
>
>> Author: resistor
>> Date: Tue Jul  1 02:02:30 2008
>> New Revision: 52951
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=52951&view=rev
>> Log:
>> Implement suggestions from Chris:
>> - Use a more accurate heuristic for the size of the hashtable.
>> - Use bitwise and instead of modulo since the size is a power of two.
>> - Use new[] instead of malloc().
>
> Thanks Owen!  BTW, is there a reason you use malloc/free (now new/
> delete) instead of a std::vector?

Not particularly.  A vector just seemed like overkill since I have to  
determine its
size upfront anyways.  Plus, it let me use similar code in tblgen and  
in TRI, since both of them
store it as an array of unsigned's.

--Owen




More information about the llvm-commits mailing list