[llvm-dev] Fwd: Implicit_const implementation related query. (original) (raw)

David Blaikie via llvm-dev llvm-dev at lists.llvm.org
Tue Feb 11 07:41:01 PST 2020


Dynamically choosing form based on usage isn't something that's been done in LLVM's DWARF emission thus far and would probably be a significant amount of work to implement. (I don't really recommend it)

But the way the existing similar support for DW_FORM_flag_present works is that it's explicitly chosen when creating the attributes/DIEs - it might be that by collecting some data you could show that most values for certain attributes on certain DIEs share the same value and then explicitly construct those using implicit_const always, rather than conditionally. (eg: maybe the private/public part of member descriptions could always be emitted with implicit_const)

This sort of hardcoded heuristic approach of course will not always yield optimal results but might have some gains.

On Mon, Feb 10, 2020 at 11:24 PM Sourabh Singh Tomar via llvm-dev < llvm-dev at lists.llvm.org> wrote:

Forwarding to Mailing list. Hello Everyone, I'm trying to implement DWFORMimplicitconst as an experimental feature to evaluate its gain in the overall size reduction in debug info. In my initial implementation, DWFORMimplicitconst is emitted only when a constant attribute is same across multiple DIE's. This is accomplished, in process of uniquing of Abbrevs i.e if an Abbrev is duplicate that suggests it's shared by multiple DIE's, so we replaced the constant attributes[DWATdeclfile] {value, form} with DWFORMimplicitconst in corresponding Abbrev. The problem I'm facing, is in deletion of the attribute[DWATdeclfile] from DIE's[debuginfo] that are using this abbrev. These DIE's are laid out as DIEValueList, Is there a way to cleanly remove a node[Attribute] from this list ?? Can anybody share comments/thoughts on the implementation side of this and suggest how to overcome the deletion of attributes from the DIEs in the debuginfo section. Thank You, Sourabh.


LLVM Developers mailing list llvm-dev at lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200211/3c8426eb/attachment.html>



More information about the llvm-dev mailing list