<div dir="ltr"><div>Ok, so my best shot at this would be to just throw away existing debug infos and regenerating new ones, if I understand you.<br><br></div>That would work, I was hoping for something better, but it will do. Thank you.<br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-10-05 10:20 GMT-07:00 Eric Christopher <span dir="ltr"><<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">This is about the best idea. There's no way to take the non-temporary md nodes back to temporary.<div><br></div><div>-eric</div></div><br><div class="gmail_quote"><div><div class="h5"><div dir="ltr">On Mon, Oct 5, 2015 at 10:12 AM Robinson, Paul via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br></div></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
<div link="blue" vlink="purple" lang="EN-US">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Abstractly, (I don't get inside this code as much as I should) debug info works on a translation-unit basis, not a function basis, so regenerating a single
function's debug info is not a natural or well-isolated operation.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">You might have to emit each function as its own LLVM module and re-JIT the module?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">People more deeply familiar with how the metadata stuff works might be able to offer better suggestions.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">--paulr<u></u><u></u></span></p>
<p class="MsoNormal"><a name="150390558661638f_msg-f:1514212039519197825__MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></a></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> llvm-dev [mailto:<a href="mailto:llvm-dev-bounces@lists.llvm.org" target="_blank">llvm-dev-bounces@lists.llvm.org</a>]
<b>On Behalf Of </b>deadal nix via llvm-dev<br>
<b>Sent:</b> Friday, October 02, 2015 11:38 PM<br>
<b>To:</b> llvm-dev<br>
<b>Subject:</b> [llvm-dev] Editing metadata<u></u><u></u></span></p>
</div>
</div></div></div></div><div link="blue" vlink="purple" lang="EN-US"><div><div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hi all,<u></u><u></u></p>
</div>
<p class="MsoNormal">I'm using the JIT capabilities of LLVM. But so far, I've been unable to use the debug capabilities of LLVM in conjunction with the JIT. The problematic scenario goes as follow :<u></u><u></u></p>
</div>
<p class="MsoNormal"> - Emit some IR with debug infos.<u></u><u></u></p>
</div>
<p class="MsoNormal"> - Install hooks to get back into some codepath that I do not wish to codegen at this stage.<u></u><u></u></p>
</div>
<p class="MsoNormal"> - JIT the method. This require to finalize the DIBuilder to complete the emission of debug metadata.<u></u><u></u></p>
</div>
<p class="MsoNormal"> - Later on, emit IR for some of the missing branches. Here the problem surface :<u></u><u></u></p>
</div>
<p class="MsoNormal"> - Without debug infos, the codegen for this specific method can be invalidated and redone, all is fine.<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"> - With debug infos, the metadata have been finalized already, and it doesn't seems that it is possible to revert this<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Is there a way to make that work ? If not, is there a patch I can work on to make that work ?<u></u><u></u></p>
</div>
<p class="MsoNormal">Thank in advance,<u></u><u></u></p>
</div>
</div></div></div></div></div>
_______________________________________________<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>
</blockquote></div>
</blockquote></div><br></div>