<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Nov 30, 2016, at 11:43 AM, David Blaikie <<a href="mailto:dblaikie@gmail.com" class="">dblaikie@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><br class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Wed, Nov 30, 2016 at 11:38 AM Adrian Prantl via Phabricator <<a href="mailto:reviews@reviews.llvm.org" class="">reviews@reviews.llvm.org</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">aprantl added inline comments.<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
================<br class="gmail_msg">
Comment at: lib/CodeGen/AsmPrinter/DwarfUnit.cpp:303<br class="gmail_msg">
   Die.addValue(DIEValueAllocator, Attribute,<br class="gmail_msg">
-               EntryCU == DieCU ? dwarf::DW_FORM_ref4 : dwarf::DW_FORM_ref_addr,<br class="gmail_msg">
+               EntryCU == CU ? dwarf::DW_FORM_ref4 : dwarf::DW_FORM_ref_addr,<br class="gmail_msg">
                Entry);<br class="gmail_msg">
----------------<br class="gmail_msg">
dblaikie wrote:<br class="gmail_msg">
> Hey Adrian - did you happen to run size numbers on whether this is important? What would happen if we just always used ref_addr when we enabled cross-unit referencing? (wondering if the complexity is worth the benefit - 4 bytes per unit reference isn't nothing, for sure - just wondering how much it is in the end)<br class="gmail_msg">
I just did some numbers on a couple of projects by doing<br class="gmail_msg">
```<br class="gmail_msg">
<br class="gmail_msg">
dwarfdump -F WebKit.framework.dSYM | grep FORM_ref4 |wc -l<br class="gmail_msg">
<br class="gmail_msg">
               WebKit     clang   medium-sized ObjC project<br class="gmail_msg">
===========================================================<br class="gmail_msg">
FORM_ref_addr 7231489  15483428<br class="gmail_msg">
FORM_ref4      189099    555085    189189<br class="gmail_msg">
-----------------------------------------------------------<br class="gmail_msg">
Savings         ~700K       ~2M     ~700K<br class="gmail_msg"></blockquote><div class=""><br class=""></div><div class="">What's that as a % of the total bytes? (total bytes of the dSYM I guess)</div><div class=""> </div></div></div></div></blockquote><div><br class=""></div><div>The clang dSYM is 571M, so it is about 0.4%. But we are archiving a lot of .dSYMs :-)</div><div><br class=""></div><div>-- adrian</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br class="gmail_msg">
```<br class="gmail_msg">
<br class="gmail_msg">
It's not much in the grand scheme of things, but also not entirely negligible.  Since .dSYM bundles are made to be stored indefinitely I think we should keep every optimization that makes them smaller.<br class="gmail_msg"></blockquote><div class=""><br class=""></div><div class="">Fair enough - figured it was worth asking - might be worth putting a note in the code about roughly the % this is worth/why we do it.<br class=""><br class="">- Dave</div><div class=""> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br class="gmail_msg">
<br class="gmail_msg">
<a href="https://reviews.llvm.org/D27170" rel="noreferrer" class="gmail_msg" target="_blank">https://reviews.llvm.org/D27170</a><br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
</blockquote></div></div>
</div></blockquote></div><br class=""></body></html>