File: debug-addr-space.ll

package info (click to toggle)
llvm-toolchain-21 1%3A21.1.6-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,245,028 kB
  • sloc: cpp: 7,619,726; ansic: 1,434,018; asm: 1,058,748; python: 252,740; f90: 94,671; objc: 70,685; lisp: 42,813; pascal: 18,401; sh: 8,601; ml: 5,111; perl: 4,720; makefile: 3,675; awk: 3,523; javascript: 2,409; xml: 892; fortran: 770
file content (25 lines) | stat: -rw-r--r-- 1,276 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
; RUN: llc < %s -mtriple=nvptx64-nvidia-cuda | FileCheck %s

; Test that translateToNVVMDWARFAddrSpace() function translates NVVM IR address space
; value `Shared` (3) to the corresponding DWARF DW_AT_address_class attributeĀ for PTX.

; CHECK: .section .debug_info
; CHECK:      .b8 103                                 // DW_AT_name
; CHECK-NEXT: .b8 0
; CHECK-NEXT: .b32 55                                 // DW_AT_type
; CHECK-NEXT: .b8 1                                   // DW_AT_decl_file
; CHECK-NEXT: .b8 1                                   // DW_AT_decl_line
; CHECK-NEXT: .b8 8                                   // DW_AT_address_class

@g = internal addrspace(3) global i32 0, align 4, !dbg !0

!llvm.dbg.cu = !{!2}
!llvm.module.flags = !{!6}

!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
!1 = distinct !DIGlobalVariable(name: "g", linkageName: "g", scope: !2, file: !3, line: 1, type: !5, isLocal: true, isDefinition: true)
!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, globals: !4)
!3 = !DIFile(filename: "test.cu", directory: "test")
!4 = !{!0}
!5 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
!6 = !{i32 1, !"Debug Info Version", i32 3}