[llvm-commits] [PATCH] Make Inits FoldingSetNodes
Jakob Stoklund Olesen
stoklund at 2pi.dk
Fri Jul 15 18:04:07 PDT 2011
On Jul 15, 2011, at 4:56 PM, David A. Greene wrote:
> Jakob Stoklund Olesen <stoklund at 2pi.dk> writes:
>
>> I have a patch that interns all the RecTy objects. It reduces TableGen
>> heap usage from 24 MB to 16 MB IIRC. That is a lot in relative terms,
>> but not in absolute terms, and it didn't improve parse time by much. I
>> didn't think it was worth the churn at the time, but since you are
>> churning in the same code now, I can send you the patch if you are
>> interested.
>
> Actually, this could help the Init effort quite a bit. Interning RecTys
> and making them unique means I can avoid string hash/compare for all
> Inits that have a type.
>
> So yeah, if you could commit that patch series _before_ mine, that would
> be great. I think it best that it go in before any of my series.
>
> Are you willing and able to commit your patch set?
OK, here we go.
The attached patch makes most RecTy subclasses into singletons with a get() factory method.
It also uniques DefInit instances because of the Record-> DefInit -> RecordRecTy -> DefInit chicken and egg problem.
Please review!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Intern-all-RecTy-subclass-instances-to-avoid-duplica.patch
Type: application/octet-stream
Size: 21274 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110715/0a9a9832/attachment.obj>
More information about the llvm-commits
mailing list