[llvm-commits] [PATCH] Make Inits FoldingSetNodes
Jakob Stoklund Olesen
stoklund at 2pi.dk
Mon Jul 18 10:06:06 PDT 2011
On Jul 18, 2011, at 8:52 AM, David A. Greene wrote:
> Jakob Stoklund Olesen <stoklund at 2pi.dk> writes:
>
>> 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!
>
> Looks good to me. Your DefInit interning is much better than mine due
> to RecTys being unique. :)
r135399.
Note that I didn't change all of the RecTy pointers into const pointers. I don't think it is necessary since the RecTy classes don't have any public mutators.
You could do the same for the Inits - It would require much fewer source changes.
/jakob
More information about the llvm-commits
mailing list