[LLVMdev] Debug information and JIT

Paweł Bylica chfast at gmail.com
Mon Jul 30 01:16:29 PDT 2012


On Sun, Jul 29, 2012 at 6:59 AM, Bendersky, Eli <eli.bendersky at intel.com> wrote:
>> > probably the reason that there is no action is surely that the old JIT
>> > implementation is being replaced with the new MCJIT implementation, so
>> > no-one feels very motivated to fix the old JIT since it is going away.
>> > Try passing -use-mcjit to lli.
>> >
>> > Ciao, Duncan.
>>
>> Thanks for suggestion. Unfortunately, I can't check it now as MCJIT does not
>> work with my project at the moment.
>>
>
> Why doesn’t it work with your project?
>
> The old JIT emitter does not support debug info, hence the asserts. It is unlikely at this point that debug info support will be added to it in the future. So IMHO, you have two options:
>
> 1. If you need debug information emitted to your JITted machine code, use MCJIT.
> 2. If you don't need debug info, then as Eric has suggested, simply don't build the code with debug info (don't pass -g to clang when generating IR).
>
> Eli

I actually work on a new compiler so debug info is a feature of it.

It looks like the debug information is stripped before the code is
JIT'd but this process can fail in some cases and some
@llvm.dbg.declare are passed to JIT anyway.

If what you say is true and the old JIT cannot emit debug information
so generating debug info in IR makes no sense neither. I will try to
run it with MCJIT. Thanks for advice.

Paweł




More information about the llvm-dev mailing list