[PATCH] D121299: [NVPTX] Disable DWARF .file directory for PTX

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 11 17:53:29 PST 2022


MaskRay added a comment.

In D121299#3370852 <https://reviews.llvm.org/D121299#3370852>, @tra wrote:

> In D121299#3370530 <https://reviews.llvm.org/D121299#3370530>, @MaskRay wrote:
>
>> Can you list the clang and ptxas commands to be clearer?
>
> I do not think ptxas gets any special command line options. Debug info format affects the generated PTX outout only.
>
>> Also, should the change be in clang/lib/Driver? There are existing settings for CUDA.
>> It's also worth adding comments like "As of <date>/<version>, ptxas does not support ..." so that others can revisit the opt-out in the future.
>
> We already clamp DWARF version for targets that don't support newer ones. 
> If split directory/file arguments for `.file` directive are properties of DWARF5 (AFAICT, they are: https://sourceware.org/binutils/docs/as/File.html) , then not generating this format for older versions looks sensible to me. It does not have anything to do with CUDA itself. 
> The question is whether this is the right place to do it, or would it better to do it wherever `UseDwarfDirectory` is set.

Is the change just to make `llc` output usable by ptxas but does not affect Clang? If so, I am not sure it is useful to do so, to make the configuration separated in two places (Clang and llc).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D121299/new/

https://reviews.llvm.org/D121299



More information about the llvm-commits mailing list