[PATCH] D121299: [NVPTX] Disable DWARF .file directory for PTX
Andrew Savonichev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 9 11:23:32 PST 2022
asavonic updated this revision to Diff 414167.
asavonic added a comment.
Re-upload the patch with -U99999
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121299/new/
https://reviews.llvm.org/D121299
Files:
llvm/lib/MC/MCAsmStreamer.cpp
llvm/test/DebugInfo/NVPTX/dbg-declare-alloca.ll
llvm/test/DebugInfo/NVPTX/debug-file-loc-only.ll
llvm/test/DebugInfo/NVPTX/debug-file-loc.ll
llvm/test/DebugInfo/NVPTX/debug-loc-offset.ll
Index: llvm/test/DebugInfo/NVPTX/debug-loc-offset.ll
===================================================================
--- llvm/test/DebugInfo/NVPTX/debug-loc-offset.ll
+++ llvm/test/DebugInfo/NVPTX/debug-loc-offset.ll
@@ -1,4 +1,4 @@
-; RUN: llc -mtriple=nvptx64-nvidia-cuda -dwarf-directory=0 < %s | FileCheck %s
+; RUN: llc -mtriple=nvptx64-nvidia-cuda < %s | FileCheck %s
; CHECK: .target sm_{{[0-9]+}}, debug
Index: llvm/test/DebugInfo/NVPTX/debug-file-loc.ll
===================================================================
--- llvm/test/DebugInfo/NVPTX/debug-file-loc.ll
+++ llvm/test/DebugInfo/NVPTX/debug-file-loc.ll
@@ -27,8 +27,8 @@
ret void, !dbg !11
}
-; CHECK-DAG: .file [[FOO]] "{{.*}}foo.h"
-; CHECK-DAG: .file [[BAR]] "{{.*}}bar.cu"
+; CHECK-DAG: .file [[FOO]] "/source/dir/foo.h"
+; CHECK-DAG: .file [[BAR]] "/source/dir/bar.cu"
; CHECK: .section .debug_abbrev
; CHECK-NEXT: {
; CHECK-NEXT: .b8 1 // Abbreviation Code
Index: llvm/test/DebugInfo/NVPTX/debug-file-loc-only.ll
===================================================================
--- llvm/test/DebugInfo/NVPTX/debug-file-loc-only.ll
+++ llvm/test/DebugInfo/NVPTX/debug-file-loc-only.ll
@@ -27,8 +27,8 @@
ret void, !dbg !11
}
-; CHECK-DAG: .file [[FOO]] "{{.*}}foo.h"
-; CHECK-DAG: .file [[BAR]] "{{.*}}bar.cu"
+; CHECK-DAG: .file [[FOO]] "/source/dir/foo.h"
+; CHECK-DAG: .file [[BAR]] "/source/dir/bar.cu"
; CHECK-NOT: .section .debug{{.*}}
Index: llvm/test/DebugInfo/NVPTX/dbg-declare-alloca.ll
===================================================================
--- llvm/test/DebugInfo/NVPTX/dbg-declare-alloca.ll
+++ llvm/test/DebugInfo/NVPTX/dbg-declare-alloca.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -mtriple=nvptx64-nvidia-cuda -dwarf-directory=0 | FileCheck %s
+; RUN: llc < %s -mtriple=nvptx64-nvidia-cuda | FileCheck %s
; CHECK: .target sm_20, debug
Index: llvm/lib/MC/MCAsmStreamer.cpp
===================================================================
--- llvm/lib/MC/MCAsmStreamer.cpp
+++ llvm/lib/MC/MCAsmStreamer.cpp
@@ -1554,8 +1554,12 @@
SmallString<128> Str;
raw_svector_ostream OS1(Str);
+ bool UseDwarfDir = UseDwarfDirectory;
+ if (getContext().getDwarfVersion() < 5 && !MAI->useIntegratedAssembler())
+ UseDwarfDir = false;
+
printDwarfFileDirective(FileNo, Directory, Filename, Checksum, Source,
- UseDwarfDirectory, OS1);
+ UseDwarfDir, OS1);
if (MCTargetStreamer *TS = getTargetStreamer())
TS->emitDwarfFileDirective(OS1.str());
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121299.414167.patch
Type: text/x-patch
Size: 2573 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220309/79e092d4/attachment.bin>
More information about the llvm-commits
mailing list