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

Andrew Savonichev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 24 07:42:52 PDT 2022


asavonic added a comment.

In D121299#3397875 <https://reviews.llvm.org/D121299#3397875>, @probinson wrote:

>> 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?
>
> The DWARF line table has had separate directory and file lists going back to DWARF v2; this .file directive syntax is unrelated to DWARF version.
> If some external assemblers don't support the split .file syntax, the flags/conditions should reflect that based on target or whatever.  Certainly not on DWARF version.

Thanks a lot! So `.file fileno directory filename` syntax *can* be lowered to DWARF < 5, but some assemblers decide not  to support it: GNU as only suppots it for DWARFv5 [1], ptxas does not support it at all. Therefore it is important to keep `-dwarf-directory` option as a way to force this feature, but we also need a way to override the default value - setting it to `true` does not make sense for NVPTX.

[1]: https://sourceware.org/binutils/docs/as/File.html


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