<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Wed, Jan 18, 2017 at 4:12 AM Hal Finkel via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">hfinkel added a comment.<br class="gmail_msg">
<br class="gmail_msg">
Can you provide a high-level description of what you're trying to accomplish and the usage model?<br class="gmail_msg"></blockquote><div><br></div><div>Oh, for sure - sorry for the assumption/missing info. Stuff that's been idly discussed (mostly offline) for a while, so I had more context in my head than was conveyed in this email.<br><br>Starting with the assumption/restriction of this requiring explicit modules and changes to the build system, here's the idea:<br><br>* In the original/normal object files: Demote linkonce_odr function definitions derived from code in imported modules to available_externally (Or removed entirely at -O0).<br>* Build new object files from every imported pcm across all object files linked into a given binary.<br>  * In these new object files, emit weak_odr definitions of any inline function defined in the module.<br><br>In this way, less code is generated, possibly saving compile time and reducing the size of inputs to the link step. Also reducing the size of debug info (DWARF debug info describes the inline function in every object file where an out of line definition remains - and these definitions are not deduplicated by the linker).<br><br>Once in place, this functionality can also be used to reduce DWARF debug info further by omitting/emitting type descriptions in the same way. (if the type is defined in a modular header - only emit the description of the type's definition in the modular object file - rather than emitting it in every object that uses that type)<br><br>Does that make sense? Happy to go into more detail, provide examples, etc.<br><br>- Dave </div><div> </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/D28845" rel="noreferrer" class="gmail_msg" target="_blank">https://reviews.llvm.org/D28845</a><br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
</blockquote></div></div>