-
Notifications
You must be signed in to change notification settings - Fork 13.7k
[NVPTX] Fixing debug symbols for ptx target emitting #101891
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
0c1eb6c
[NVPTX] Fixing debug symbols for ptx target emitting
vyom1611 64e683a
clang-format linting
vyom1611 52d2722
Merge branch 'main' into nvptx-symbol-transform
vyom1611 d109aac
Merge branch 'main' into nvptx-symbol-transform
vyom1611 0e6deea
Added small unit test for symbol checking
vyom1611 59cfcc4
Merge branch 'main' into nvptx-symbol-transform
vyom1611 a393f5e
Update nvptx-debug-symbol-name.ll
vyom1611 58a8943
Update nvptx-debug-symbol-name.ll
vyom1611 c9aa5bd
Update nvptx-debug-symbol-name.ll
vyom1611 7e0ec5a
Update llvm/test/CodeGen/NVPTX/nvptx-debug-symbol-name.ll
jhuber6 d8076d5
Merge branch 'main' into nvptx-symbol-transform
vyom1611 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
; RUN: llc -mtriple=nvptx64-nvidia-cuda -mcpu=sm_86 < %s | FileCheck %s | ||
; RUN: %if ptxas %{ llc < %s -mtriple=nvptx64-nvidia-cuda -mcpu=sm_86 -verify-machineinstrs | %ptxas-verify %} | ||
|
||
; CHECK: .global .align 1 .b8 __func___$__Z10foo_kernelv | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need a check for the debug line.
enferex marked this conversation as resolved.
Show resolved
Hide resolved
jhuber6 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
; CHECK: .b64 __func__$_Z10foo_kernelv | ||
|
||
@__func__._Z10foo_kernelv = private unnamed_addr constant [11 x i8] c"foo_kernel\00", align 1, !dbg !0 | ||
|
||
define void @_Z10foo_kernelv() !dbg !20 { | ||
entry: | ||
call void @_Z6escapePKc(ptr noundef @__func__._Z10foo_kernelv) #2, !dbg !23 | ||
ret void, !dbg !24 | ||
} | ||
|
||
declare void @_Z6escapePKc(ptr) | ||
|
||
!llvm.dbg.cu = !{!14} | ||
!llvm.ident = !{!18} | ||
|
||
!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) | ||
!1 = distinct !DIGlobalVariable(scope: null, file: !2, name: "__func__", linkageName: "__func__._Z10foo_kernelv", line: 6, type: !3, isLocal: true, isDefinition: true) | ||
!2 = !DIFile(filename: "test_module.cu", directory: "/") | ||
!3 = !DICompositeType(tag: DW_TAG_array_type, baseType: !4, size: 88, elements: !6) | ||
!4 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !5) | ||
!5 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char) | ||
!6 = !{!7} | ||
!7 = !DISubrange(count: 11) | ||
!14 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !2, producer: "clang version 20.0.0git", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, globals: !16, nameTableKind: None) | ||
!16 = !{!0} | ||
!18 = !{!"clang version 20.0.0git"} | ||
!20 = distinct !DISubprogram(name: "foo_kernel", linkageName: "_Z10foo_kernelv", scope: !2, file: !2, line: 4, type: !21, scopeLine: 5, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !14) | ||
!21 = !DISubroutineType(types: !22) | ||
!22 = !{null} | ||
!23 = !DILocation(line: 6, column: 5, scope: !20) | ||
!24 = !DILocation(line: 7, column: 1, scope: !20) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.