<div dir="ltr">Nah, doesn't look like LLVM generates implicit_const for any compilation output (the output support is only used in unit tests at the moment/in the patch you mentioned - probably shouldn't've bothered with that (the dumping support is separate & seems fine to have in-tree))<br><br>LLVM uses FORM_flag_present for cases where adding the attribute at all is only done when the 'true' value is needed (eg: we don't put "DW_AT_declaration false" on non-declaration, the attribute isn't used on non-declarations at all). Arguably, LLVM could avoid using flag_present when a DIE might otherwise share an abbreviation eg: DW_AT_artificial is done as flag_present, but that means an artificial and non-artificial DW_TAG_subprogram use entirely different abbreviations.<br><br>I think it'd be hard to justify using implicit_const in most cases - because the value changes between different uses & that would then need different abbreviations which would end up more expensive (more bytes) than if the alternative inline-value forms had been used.<br><br>But I guess if someone comes up with a heuristic about when to use implicit_const & data to support it being an improvement in DWARF size, I'm not completely opposed to the idea.<br><br><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Nov 4, 2019 at 11:54 PM Jini Susan George via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">Hello folks, </p><p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><br></p><p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">I was interested in the support we have for the attribute form DW_FORM_implicit_const (DWARFv5 feature) in clang/LLVM. And I had some doubts wrt
this. I noticed that support for this was put in here in 2017: </p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"> </p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><a href="https://rev.ng/gitlab/revng-bar-2019/llvm/commit/d9df13befcbc702e239b650dd1f55778d72b8571" style="font-family:"Times New Roman",serif;color:rgb(5,99,193)" target="_blank"><span style="color:black">https://rev.ng/gitlab/revng-bar-2019/llvm/commit/d9df13befcbc702e239b650dd1f55778d72b8571</span></a></p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"> </p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:11pt">From what I could make out, the support for generating
DW_FORM_implicit_const is there, but I could not make out the DWARF attributes
for which this form is being generated currently. Are there any attributes for
which this form is generated currently ? </span><br></p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"> </p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">Gcc typically generates this form for a bunch of attributes
like: DW_AT_decl_file, DW_AT_decl_column, DW_AT_accessibility, DW_AT_defaulted,
DW_AT_byte_size, etc</p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"> </p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">Any pointers are deeply appreciated.</p><p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><br></p><p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">Thanks,</p><p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">Jini.</p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"> </p></div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>