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

Artem Belevich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 24 11:54:58 PDT 2022


tra added a comment.

In D121299#3406044 <https://reviews.llvm.org/D121299#3406044>, @MaskRay wrote:

> 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.

To me it looks like yet another knob to accommodate a target-specific quirk. We already have to deal with various oddities of PTX, including limits on supported DWARF version and various oddities of PTX syntax. This particular knob appears relatively noninvasive to me.

I would argue that it's worth making things 'just work'. We can not expect all users to remember that if they want to compile for target X with debug info, then they need to specify additional options.


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