<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 24, 2016 at 6:35 PM, Duncan P. N. Exon Smith <span dir="ltr"><<a href="mailto:dexonsmith@apple.com" target="_blank">dexonsmith@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br>
> On 2016-Mar-24, at 12:58, Teresa Johnson <<a href="mailto:tejohnson@google.com">tejohnson@google.com</a>> wrote:<br>
><br>
><br>
><br>
> On Thu, Mar 24, 2016 at 6:35 AM, Duncan Exon Smith <<a href="mailto:dexonsmith@apple.com">dexonsmith@apple.com</a>> wrote:<br>
><br>
><br>
> On Mar 24, 2016, at 6:22 AM, Teresa Johnson <<a href="mailto:tejohnson@google.com">tejohnson@google.com</a>> wrote:<br>
><br>
>><br>
>><br>
>> On Wed, Mar 23, 2016 at 11:06 PM, Duncan P. N. Exon Smith <<a href="mailto:dexonsmith@apple.com">dexonsmith@apple.com</a>> wrote:<br>
>><br>
>> > On 2016-Mar-22, at 19:28, Duncan P. N. Exon Smith via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br>
>> ><br>
>> > 1. If a piece of metadata is referenced from only a single `Function`,<br>
>> >    serialize that metadata in the function's metadata block instead of<br>
>> >    the global metadata block.<br>
>> ><br>
>> >    This addresses problems (a) and (b), primarily targeting<br>
>> >    `DILocation`s.  It should pick up lots of other stuff, depending on<br>
>> >    how much inlining has happened.<br>
>> ><br>
>> >    (I have a draft of the writer side, still working on the reader.)<br>
>><br>
>> Teresa: I had trouble make this work with the delayed metadata parsing<br>
>> (the logic around "SeenModuleValuesRecord").  My WIP patch rips that<br>
>> out rather unceremoniously.<br>
>><br>
>> (Attached the patch for reference, but it needs to be cleaned up, split<br>
>> up, etc.; not ready for review (although comments always welcome)).<br>
>><br>
>> My understanding from Mehdi is that maybe ThinLTO isn't currently<br>
>> relying on the delayed parsing.  I.e., the original scheme was:<br>
>> - cherry-pick functions one at a time (never reading metadata), then<br>
>> - come back at the end to read the metadata all at once.<br>
>> But the scheme has evolved to:<br>
>> - calculate the desired functions from each module, then<br>
>> - load the module and link all the functions in one go.<br>
>><br>
>> Right, that is what the FunctionImporter logic has changed to. I was keeping that support alive on the concern that for very large modules the overhead of keeping all the source modules materialized while importing decisions are made would be too high. But since I added a full reference/call graph to the summary and Mehdi has sent a patch to change the importer to do summary-based importing, that concern should be moot.<br>
>><br>
>> Is that accurate?  If so, I don't see remaining benefit in delaying the<br>
>> global metadata parsing, just an extra code path to maintain.  Do you<br>
>> agree?<br>
>><br>
>><br>
>> I think we can take this support out at this point now.<br>
><br>
> Great.<br>
><br>
>> Note however that llvm-link (used for testing) is still doing function at a time importing and therefore relying on this support. However it shouldn't be hard to rework that to collect all the imports from a given module for batch importing.<br>
>><br>
>> Let me take a stab at moving llvm-link over to using batch importing hopefully today or tomorrow, then at least no tests will rely on the post-pass metadata importing and I can pull that out independently.<br>
><br>
> Thank you!<br>
><br>
> Removed from llvm-link in  r264326.<br>
<br>
</div></div>I removed the use of it in r264378.<br></blockquote><div><br></div><div>Thanks. That is only part of the post-pass metadata linking, I'll remove the rest.</div><div><br></div><div>Teresa </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5"><br>
><br>
> Teresa<br>
><br>
><br>
>> Teresa<br>
>><br>
>> --<br>
>> Teresa Johnson |      Software Engineer |     <a href="mailto:tejohnson@google.com">tejohnson@google.com</a> |  <a href="tel:408-460-2413" value="+14084602413">408-460-2413</a><br>
><br>
><br>
><br>
> --<br>
> Teresa Johnson |       Software Engineer |     <a href="mailto:tejohnson@google.com">tejohnson@google.com</a> |  <a href="tel:408-460-2413" value="+14084602413">408-460-2413</a><br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><span style="font-family:Times;font-size:medium"><table cellspacing="0" cellpadding="0"><tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small"><td nowrap style="border-top-style:solid;border-top-color:rgb(213,15,37);border-top-width:2px">Teresa Johnson |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Software Engineer |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:tejohnson@google.com" target="_blank">tejohnson@google.com</a> |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"> 408-460-2413</td></tr></tbody></table></span></div>
</div></div>