[llvm-dev] Editing metadata

Robinson, Paul via llvm-dev llvm-dev at lists.llvm.org
Mon Oct 5 10:03:35 PDT 2015

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.
You might have to emit each function as its own LLVM module and re-JIT the module?
People more deeply familiar with how the metadata stuff works might be able to offer better suggestions.

From: llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org] On Behalf Of deadal nix via llvm-dev
Sent: Friday, October 02, 2015 11:38 PM
To: llvm-dev
Subject: [llvm-dev] Editing metadata

Hi all,
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 :
 - Emit some IR with debug infos.
 - Install hooks to get back into some codepath that I do not wish to codegen at this stage.
 - JIT the method. This require to finalize the DIBuilder to complete the emission of debug metadata.
 - Later on, emit IR for some of the missing branches. Here the problem surface :
    - Without debug infos, the codegen for this specific method can be invalidated and redone, all is fine.
    - With debug infos, the metadata have been finalized already, and it doesn't seems that it is possible to revert this
Is there a way to make that work ? If not, is there a patch I can work on to make that work ?
Thank in advance,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151005/7f24edbd/attachment.html>

More information about the llvm-dev mailing list