[PATCH] D45782: [DEBUGINFO, NVPTX] Allow to disable debug info from command line.

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 19 11:12:30 PDT 2018


ABataev added a comment.

In https://reviews.llvm.org/D45782#1072425, @tra wrote:

> > For better support of the CUDA profiling tools with the optimized code
> >  we should be able to emit .target directive without debug option.
> >  This is required as .line and .file directives must be emitted, but
> >  the DWARF sections should be ignored. ptxas does not support compilation
> >  of the modules with the enabled debug info when optimization level is
>
> I'm not sure I understand how removing ", debug" helps profiling tools. It does allow compiling PTX with -O1+ even if dwarf bits are present and that is useful, but I'm not sure how it's connected to profiling. Are you saying that nvprof (or something else) may look at the dwarf bits in the PTX?
>
> If dwarf info is not going to make it to SASS, I think we'd be better off not generating dwarf at all.
>  What do I miss?


`, debug` should be removed to enable opt level > 0. I checked the ptxas, without `, debug` it just ignores DWARF sections, but with `-lineinfo` option it may generate correct data for the `nvprof` from `.loc` and `.file` directives.


Repository:
  rL LLVM

https://reviews.llvm.org/D45782





More information about the llvm-commits mailing list