[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 11:13:40 PDT 2022


MaskRay added a comment.

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

> In D121299#3405993 <https://reviews.llvm.org/D121299#3405993>, @MaskRay wrote:
>
>> 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).
>
> I can ask NVIDIA, but it's not going to help us much.

Thanks

> Even if we can convince NVIDIA to support this syntax, it will only apply to `ptxas` in some future CUDA version.
> We'll still need to deal with `ptxas` that has been shipped with all existing CUDA versions we support.

AIUI the complexity is to make `llc -mtriple=nvptx64-nvidia-cuda -dwarf-directory=0 a.ll` users convenient, but they can use `clang --target=nvptx64-nvidia-cuda -S a.ll` instead, to avoid setting `-dwarf-directory`.
What we need to do is make tradeoff between complexity and convenience. Omitting `-dwarf-directory=0` considering that (a) clang doesn't need the manual setting (b) the mechanism will need to be removed in the future
makes me unsure we need to introduce the seemingly heavy infrastructure as implemented in this patch.

If the patch is reworked to avoid `EnableDwarfFileDirectoryDefault`, I may concede.


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