<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 May 4, 2017, at 4:53 PM, 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="">Alrighty, a little fuzzy on how best to implement this - Adrian, you've probably got the most context here as to how to wrangle this.<br class=""><br class="">My first attempt was in IRMover.cpp, IRLinker::linkFunctionBody - after metadata is copied over, create a new subprogram derived from Dst.getSubprogram, only changing the CU over (to the first, if any, CU on the <a href="http://llvm.dbg.cu/" class="">llvm.dbg.cu</a> named metadata).<br class=""><br class="">This is insufficient because all the metadata in the function (variables, etc) doesn't get updated and chains up to the old DISubprogram still.<br class=""></div></div></blockquote><div><br class=""></div>For this part you should be able to reuse the code I'm writing for ConeFunction right now (that can re-parent a function's debug info inside a new DISubprogram). Hopefully I'll have something out for review tomorrow.</div><div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><br class="">Next attempt was to RAUW the foreign CU with the desired CU, but that fails with "MDNode::replaceAllUsesWith - expected temporary node"<br class=""></div></div></blockquote><div><br class=""></div><div>Non-temporary MDNodes don't have RAUW support (this was deemed too expensive). You either need to create them pointing to a temporary node and then rauw the temp node with a distinct node, or you need tot create them already pointing to the right CU. Thankfully only DISubprograms should point to a CU node.</div><div><br class=""></div><div>-- adrian</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class="">So - any ideas?<br class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Thu, May 4, 2017 at 7:40 AM Teresa Johnson <<a href="mailto:tejohnson@google.com" class="">tejohnson@google.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote">On Thu, May 4, 2017 at 7:22 AM, Rafael Avila de Espindola via llvm-dev <span dir="ltr" class=""><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" class="">llvm-dev@lists.llvm.org</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">David Blaikie via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" class="">llvm-dev@lists.llvm.org</a>> writes:<br class="">
<br class="">
> So Dehao and I have been dealing with some of the nitty gritty details of<br class="">
> debug info with ThinLTO, specifically with Fission(Split DWARF).<br class="">
><br class="">
> This applies to LTO as well, so I won't single out ThinLTO here.<br class="">
<br class="">
</span>When are the .dwo files produced? If at link time, what is the advantage<br class="">
of using fission? Normally the advantage is the faster link, but if it<br class="">
is the linker producing them, what is left?<br class=""></blockquote><div class=""><br class=""></div></div></div></div><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><div class="">For ThinLTO they are produced by the backends, and only the split .o part needs to be linked. I think that benefit would occur with in-process ThinLTO as well (the .o files handed back to the linker are smaller), but for us where we have a distributed ThinLTO build, the backends are producing split .o and .dwo files and so the final native link process gets all the normal advantages of fission.</div><div class=""><br class=""></div><div class="">For regular LTO, I suppose the same benefit could occur - the backend produces a split .o and .dwo file and only passes the split .o file to the link.</div><div class=""><br class=""></div><div class="">Teresa</div><div class=""><br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br class="">
Cheers,<br class="">
Rafael</blockquote></div></div></div><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br class="">
<div class="m_2329140697180318645HOEnZb"><div class="m_2329140697180318645h5">_______________________________________________<br class="">
LLVM Developers mailing list<br class="">
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" class="">llvm-dev@lists.llvm.org</a><br class="">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br class="">
</div></div></blockquote></div></div></div><div dir="ltr" class=""><div class="gmail_extra"><br class=""><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div class="m_2329140697180318645gmail_signature" data-smartmail="gmail_signature"><span style="font-family: Times; font-size: inherit;" class=""><table cellspacing="0" cellpadding="0" class=""><tbody class=""><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small" class=""><td nowrap="" style="border-top-style:solid;border-top-color:rgb(213,15,37);border-top-width:2px" class="">Teresa Johnson |</td><td nowrap="" style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px" class=""> Software Engineer |</td><td nowrap="" style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px" class=""> <a href="mailto:tejohnson@google.com" target="_blank" class="">tejohnson@google.com</a> |</td><td nowrap="" style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px" class=""> <a href="tel:(408)%20460-2413" value="+14084602413" target="_blank" class="">408-460-2413</a></td></tr></tbody></table></span></div>
</div></div></blockquote></div></div>
</div></blockquote></div><br class=""></body></html>