<div dir="ltr">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><br>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">llvm.dbg.cu</a> named metadata).<br><br>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><br>Next attempt was to RAUW the foreign CU with the desired CU, but that fails with "MDNode::replaceAllUsesWith - expected temporary node"<br><br>So - any ideas?<br><br><div class="gmail_quote"><div dir="ltr">On Thu, May 4, 2017 at 7:40 AM Teresa Johnson <<a href="mailto:tejohnson@google.com">tejohnson@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><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"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>David Blaikie via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> writes:<br>
<br>
> So Dehao and I have been dealing with some of the nitty gritty details of<br>
> debug info with ThinLTO, specifically with Fission(Split DWARF).<br>
><br>
> This applies to LTO as well, so I won't single out ThinLTO here.<br>
<br>
</span>When are the .dwo files produced? If at link time, what is the advantage<br>
of using fission? Normally the advantage is the faster link, but if it<br>
is the linker producing them, what is left?<br></blockquote><div><br></div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>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><br></div><div>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><br></div><div>Teresa</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Cheers,<br>
Rafael</blockquote></div></div></div><div dir="ltr"><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>
<div class="m_2329140697180318645HOEnZb"><div class="m_2329140697180318645h5">_______________________________________________<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="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</div></div></blockquote></div></div></div><div dir="ltr"><div class="gmail_extra"><br><br clear="all"><div><br></div>-- <br><div class="m_2329140697180318645gmail_signature" data-smartmail="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"> <a href="tel:(408)%20460-2413" value="+14084602413" target="_blank">408-460-2413</a></td></tr></tbody></table></span></div>
</div></div></blockquote></div></div>