[llvm-commits] [PATCH 12/20] [AVX] Make ListInits Unique
Jakob Stoklund Olesen
stoklund at 2pi.dk
Wed Jul 20 09:28:21 PDT 2011
On Jul 19, 2011, at 1:11 PM, David Greene wrote:
> Make ListInit a FastFoldingSetNode to ensure ListInits are unique
> and only created once. This will be important for AVX as lists
> will be used extensively to pass generic patterns, prefix
> information and other things to lower-level pattern-generation
> classes.
I don't really understand this approach. The FastFoldingSetNode base class adds 160 bytes of overhead, and it is guaranteed to at least double the memory used by a ListInit.
Now that you have a FoldingSet per Init subclass, you can just provide a Profile method instead. That reduces the overhead to just a pointer.
See APFloat for a simple example.
/jakob
More information about the llvm-commits
mailing list