[LLVMdev] RFC: Reduce the memory footprint of DIEs (and DIEValues)

Duncan P. N. Exon Smith dexonsmith at apple.com
Thu Jun 4 17:24:29 PDT 2015


> On 2015 May 28, at 14:14, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote:
> 
> 
>> On 2015-May-26, at 15:30, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote:
>> 
>> David, let me know if you have any comments on the `DIE::Children`
>> stuff (patch 0008 in particular, although I think Eric wanted your
>> opinion on 0007 as well).
>> 
>>> On 2015-May-26, at 14:41, Eric Christopher <echristo at gmail.com> wrote:
>>> 0007 - LGTM, might want to have Dave take a look at it as well.
>>> 0008 - reverseChildren and finalizeChildren is pretty gross. Also, I'm going to punt on the rest of this to Dave.
> 
> I've committed all but these two.  I've attached rebased versions
> that incorporate (most of) Fred's feedback.
> 
> David, I found a way to avoid the reverseChildren/finalizeChildren
> thing without paying for an extra pointer, but it means that
> `DIE` would no longer use `std::unique_ptr<>` internally.  (High
> level: change the sibling list to a circular linked list, point at
> the last child instead of the first, and store a "this-is-last"
> marker on the last child to support iteration.)
> 
> stop-reversing-children.patch implements this on top of 0008;
> stop-reversing-children-with-0008.patch has that patch and 0008
> merged together.  I think this might be the better way to do it,
> but I'm open to other ideas.
> 
> If you're okay with this approach, maybe I'll rewrite 0007 to
> save an extra pointer there as well?

Ping.  Patches reattached.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0008-AsmPrinter-Use-an-intrusively-linked-list-for-DIE-Ch.patch
Type: application/octet-stream
Size: 43692 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150604/2329e078/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stop-reversing-children.patch
Type: application/octet-stream
Size: 7050 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150604/2329e078/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stop-reversing-children-with-0008.patch
Type: application/octet-stream
Size: 42493 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150604/2329e078/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0007-AsmPrinter-Convert-DIE-Values-to-a-linked-list.patch
Type: application/octet-stream
Size: 64146 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150604/2329e078/attachment-0003.obj>


More information about the llvm-commits mailing list