[PATCH] D48730: [DEBUG_INFO, NVPTX] Do not emit .debug_loc section.

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 28 13:07:51 PDT 2018


ABataev added a comment.

In https://reviews.llvm.org/D48730#1147109, @ABataev wrote:

> In https://reviews.llvm.org/D48730#1147100, @probinson wrote:
>
> > This seems rather drastic.  Nearly all variables will be reported as "optimized away" at any optimization level above -O0.
> >  Have you looked at whether you can identify a single preferred location for the variable?
>
>
> Thanks for the review, Paul. I agree this is not the best solution. But this is how NVidia toolchain works. It does not allow debug info in optimized code. Debug info may be emitted only at -O0. For other optimization levels, only line number info emission is allowed.
>  I tried to do this kind of analysis and sometimes we can do it, but I don't think this is necessary as debug info is allowed only for non-optimized code.


BTW, I think that because of support of such simple DWARF version the debug info is allowed only at O0. Or vice versa, they're using such simple debug info only because it is allowed at O0 only. I lean to the first, as I think the original problem is in the oversimplified PTX file format.


Repository:
  rL LLVM

https://reviews.llvm.org/D48730





More information about the llvm-commits mailing list