[LLVMdev] RFC: Reduce the memory footprint of DIEs (and DIEValues)
yaron.keren at gmail.com
Tue Jun 16 21:40:38 PDT 2015
Singly linked lists are used throught LLVM:
ArrayRecycler, Registry, LiveInterval, SCEVUnknown, CGBlockInfo, MacroArgCache,
What do you think about implementing a singly-linked ADT?
2015-06-05 3:24 GMT+03:00 Duncan P. N. Exon Smith <dexonsmith at apple.com>:
> > On 2015 May 28, at 14:14, Duncan P. N. Exon Smith <dexonsmith at apple.com>
> >> On 2015-May-26, at 15:30, Duncan P. N. Exon Smith <dexonsmith at apple.com>
> >> 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.
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-commits