[llvm-commits] [PATCH] Make TableGen Inits FoldingSetNodes
Jakob Stoklund Olesen
stoklund at 2pi.dk
Mon Jul 11 12:59:00 PDT 2011
On Jul 11, 2011, at 12:16 PM, John McCall wrote:
> On Jul 11, 2011, at 12:02 PM, David A. Greene wrote:
>> Jakob Stoklund Olesen <stoklund at 2pi.dk> writes:
>>> On Jul 8, 2011, at 9:41 AM, David Greene wrote:
>>>
>>> Here's a patch to manage TableGen Inits using a FoldingSet. This allows
>>> us to clean up all of the allocated Inits on TableGen exit, saves memory
>>> and makes TableGen run a bit faster due to elimination of duplicate
>>> objects.
>>>
>>> Very nice. Please use get() instead of Create().
>>
>> Is there a naming convention here? I've seen Create() used in other
>> places, which is why I used it. :)
>
> The convention, as I see it, is to use 'create' for factory methods that
> return a non-uniqued object and 'get' for factory methods that return
> a uniqued object. Note that I have no idea which category this falls
> into.
It's the latter.
And function names begin with a lower-case letter.
/jakob
More information about the llvm-commits
mailing list