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

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 24 10:55:43 PDT 2022


MaskRay added a comment.

> In D121299#3376523 <https://reviews.llvm.org/D121299#3376523>, @MaskRay wrote:
>
>> I am a bit unsure whether we should make such logic spread in two places (clang Driver and MCAsmStreamer).
>> It's nice that `llc` without other options (-dwarf-directory=0) produced assembly can be passed to the assembler for the target but that's not a requirement.
>
> I think it is important for llc to produce valid assembly output by default, especially considering that the error message from ptxas is not obvious.

I just worry whether this patch may be busywork. It seems like a "UI" thing of llc anyway, not really affecting Clang.
Have you tried contacting CUDA folks about supporting the syntax in ptxas?
If ptxas will soon get the support, in the future someone may propose to revert this patch (the `enum DwarfDirectory` mechanism won't be needed).

> Although the way we should change this default depends on use cases and expectations for -dwarf-directory. I traced it back to 2011 (commit 40f8f2ff "Add support for a new extension to the .file directive") , where it it was added as an extension and (I assume) later included into DWARFv5. Do we still want to support it as an extension for DWARF < 5, or it is only needed for integrated assembler?

[This has been answered by Paul]


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