[llvm] r196479 - DwarfDebug/DwarfUnit: Push abbreviation structures down into DwarfUnits to reduce duplication

David Blaikie dblaikie at gmail.com
Thu Dec 5 09:46:17 PST 2013


On Thu, Dec 5, 2013 at 9:33 AM, Eric Christopher <echristo at gmail.com> wrote:
> On Thu, Dec 5, 2013 at 9:13 AM, David Blaikie <dblaikie at gmail.com> wrote:
>> On Thu, Dec 5, 2013 at 9:05 AM, Eric Christopher <echristo at gmail.com> wrote:
>>> Hmm? We only want one FoldingSet per final .o/.dwo
>>
>> One each for the .o and for the .dwo, or are you expecting/claiming
>> there's one shared between both?
>>
>> As the code was written before, and as it is written now, there's a
>> separate set for the .o and the .dwo - which makes sense to me. We
>> need the abbreviations for the skeletons to be in the .o, so they
>> can't be stored away in the .dwo. But we don't want to put all the
>> non-skeletal abbrevations for the .dwo in the .o (because we want to
>> keep as much stuff in the dwo as possible - and it's not like there
>> are any abbreviations that are likely to appear in both the .o and the
>> .dwo)
>>
>> Previous code had these 4 members in DwarfDebug:
>>
>> FoldingSet<DIEAbbrev> AbbreviationsSet;
>> std::vector<DIEAbbrev *> Abbreviations;
>> FoldingSet<DIEAbbrev> SkeletonAbbrevSet;
>> std::vector<DIEAbbrev *> SkeletonAbbrevs;
>>
>> Now we have two members in DwarfUnit:
>>
>> FoldingSet<DIEAbbrev> AbbreviationsSet;
>> std::vector<DIEAbbrev *> Abbreviations;
>>
>> And two instances of DwarfUnit. So we have the same 4 objects and we
>> emit the same abbreviations in the same files, so far as I can tell.
>>
>
> Ah right. Naming confusion.

Yeah, looking back - my mistake. I said DwarfUnit on multiple
occasions in this thread when I should've said DwarfUnits. A little
subtle. We should figure out some better naming.

> I think I'd originally planned for
> DwarfUnit to do what you have Unit doing, etc. I'll fix a bit of that
> now.

Not sure which things you meant to have it do, but I'll keep an eye
out for the patches.

- Dave



More information about the llvm-commits mailing list