[llvm-commits] [llvm] r99883 - in /llvm/trunk: include/llvm/CodeGen/LiveInterval.h include/llvm/Support/Allocator.h lib/CodeGen/LiveInterval.cpp lib/CodeGen/LiveIntervalAnalysis.cpp lib/Support/Allocator.cpp
Benjamin Kramer
benny.kra at googlemail.com
Tue Mar 30 13:17:57 PDT 2010
On 30.03.2010, at 21:46, Jakob Stoklund Olesen wrote:
>
> On Mar 30, 2010, at 12:17 PM, Benjamin Kramer wrote:
>
>>
>> On 30.03.2010, at 19:00, Jakob Stoklund Olesen wrote:
>>
>>>
>>> On Mar 30, 2010, at 9:49 AM, Török Edwin wrote:
>>>
>>>> On 03/30/2010 07:32 PM, Jakob Stoklund Olesen wrote:
>>>
>>>>> A template class that is only capable of allocating one type would be safer.
>>>>
>>>> Sounds good, the template could automatically call the destructor when
>>>> Reset() is called, without the need for the special Reset() method.
>>
>> I quickly put together a patch that adds a templated BumpPtrAllocator and allocates all VNInfos through it.
>>
>> <specificbumpallocator.patch>
>
> Looks good to me, thanks!
>
> I would rename Reset() to something more ominous, like DestroyAll().
>
> + void Deallocate(const T *Ptr) {
> + Ptr->~T();
> + }
>
> Is that one necessary? If you are going to destroy single elements, you should not be using this class in the first place.
Fixed & Committed revision 99919.
More information about the llvm-commits
mailing list