[llvm-dev] get debug info after optimization

Robinson, Paul via llvm-dev llvm-dev at lists.llvm.org
Thu Mar 3 09:30:39 PST 2016


> > On Mar 3, 2016, at 8:40 AM, Mohammad Norouzi via llvm-dev <llvm-
> dev at lists.llvm.org> wrote:
> >
> > Is it possible to get debug information after optimization? for example,
> source code line numbers of instructions in an ir that is optimized by O2?
> 
> Absolutely. In textual IR, have a look at the !dbg annotations on the
> instructions. Let me know if you have any more specific questions.
> 
> -- adrian

And if you find cases where debug info doesn't survive optimization very
well, but you think it could do better, it's definitely worth reporting
those cases.  We can't necessarily make it better, but it's always worth
a look.
--paulr



More information about the llvm-dev mailing list