Mohammad Norouzi via llvm-dev
2016-Mar-03 16:40 UTC
[llvm-dev] get debug info after optimization
Hi, 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? Best, Mohammad -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160303/af4f46a7/attachment.html>
Adrian Prantl via llvm-dev
2016-Mar-03 16:51 UTC
[llvm-dev] get debug info after optimization
> 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
Robinson, Paul via llvm-dev
2016-Mar-03 17:30 UTC
[llvm-dev] get debug info after optimization
> > 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. > > -- adrianAnd 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