[LLVMdev] [PROPOSAL] Attach debugging information with LLVM instruction

Richard Pennington rich at pennware.com
Thu Sep 10 14:55:16 PDT 2009

Devang Patel wrote:
>   store i32 42, i32* %i, dbg metadata !7
>   store i32 1, i32* %j.addr, dbg metadata !8
>   br label %if.end, dbg metadata !8
>   ...
> Now, the optimizer does not need to worry about those llvm.dbg
> hurdles. Instructions do not lose their location information when they
> are rearranged in instruction stream. And the stage is set to produce,
> preserve and emit accurate debug information for inlined functions.

I like this.

Would it be very ugly to treat stoppoint like a pseudo op that filled in 
the metadata for subsequent instructions until the end of the basic 
block? It might help for backward compatibility.


More information about the llvm-dev mailing list