[llvm-dev] Editing metadata

Eric Christopher via llvm-dev llvm-dev at lists.llvm.org
Mon Oct 5 13:06:01 PDT 2015


Yep. That's your best bet. I think if you're effectively regenerating the
IR from scratch (it's what it feels like to me) then you should probably
regenerate the debug information. If you were just deciding to optimize it
after a run or two then that should be fine and be able to get updated.

-eric

On Mon, Oct 5, 2015 at 1:04 PM deadal nix <deadalnix at gmail.com> wrote:

> Ok, so my best shot at this would be to just throw away existing debug
> infos and regenerating new ones, if I understand you.
>
> That would work, I was hoping for something better, but it will do. Thank
> you.
>
> 2015-10-05 10:20 GMT-07:00 Eric Christopher <echristo at gmail.com>:
>
>> This is about the best idea. There's no way to take the non-temporary md
>> nodes back to temporary.
>>
>> -eric
>>
>> On Mon, Oct 5, 2015 at 10:12 AM Robinson, Paul via llvm-dev <
>> llvm-dev at lists.llvm.org> wrote:
>>
>>> 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.
>>>
>>> --paulr
>>>
>>>
>>>
>>> *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,
>>> _______________________________________________
>>> LLVM Developers mailing list
>>> llvm-dev at lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151005/74e23ead/attachment.html>


More information about the llvm-dev mailing list