[PATCH] D107875: [DWARF] Add findAttribute to DWARFAbbreviationDeclaration
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 19 14:01:16 PDT 2021
dblaikie added a comment.
In D107875#2944723 <https://reviews.llvm.org/D107875#2944723>, @ayermolo wrote:
> In D107875#2942329 <https://reviews.llvm.org/D107875#2942329>, @dblaikie wrote:
>
>> These values could be computed from the index in AttributeSpecs, right? Maybe that'd be better, rather than adding memory overhead to every use of libDebugInfoDWARF?
>
> Sorry it's not clear to me how it can be calculated index in AttributeSpecs.
> You mean like iterate over abbrev section and build a map?
Sorry, no, I mean this data is computed by the for loop in DWARFAbbreviationDeclaration::getAttributeValue, for instance - so the patch seems like it's proposing a shift in the time/space tradeoff (adding more memory usage to avoid having to do the compute/time work done by that loop in getAttributeValue) & I'm not sure that shift is necessarily justified - I'd be inclined to keep with the status quo and suggest these values should be recomputed when needed by walking the AttributeSpecs in a DWARFAbbreviationDeclaration.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107875/new/
https://reviews.llvm.org/D107875
More information about the llvm-commits
mailing list