brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.4 KiB · 5abd3af Raw
75 lines · plain
1# RUN: llc -start-after=machineverifier -O0 %s -filetype=obj -o - | llvm-dwarfdump - | FileCheck %s2 3# CHECK:      DW_TAG_variable4# CHECK-NEXT:   DW_AT_location        (DW_OP_GNU_entry_value(DW_OP_reg22 W22))5# CHECK-NEXT:   DW_AT_name    ("a")6# CHECK:      DW_TAG_variable7# CHECK-NEXT:   DW_AT_location8# CHECK-SAME:     DW_OP_GNU_entry_value(DW_OP_reg22 W22), DW_OP_piece 0x8,9# CHECK-SAME:     DW_OP_GNU_entry_value(DW_OP_reg22 W22), DW_OP_plus_uconst 0x2a, DW_OP_piece 0x8)10# CHECK-NEXT:   DW_AT_name    ("fragmented_var")11# CHECK:      DW_TAG_variable12# CHECK-NEXT:   DW_AT_location       (DW_OP_piece 0x8, DW_OP_GNU_entry_value(DW_OP_reg22 W22), DW_OP_piece 0x8)13# CHECK-NEXT:   DW_AT_name    ("multi_type_fragmented_var")14 15 16--- |17  target triple = "aarch64--"18  define void @foo(ptr %unused_arg, ptr swiftasync %async_arg) !dbg !4 {19    %storage = alloca i6420    call void @llvm.dbg.declare(metadata ptr %async_arg, metadata !10, metadata !DIExpression(DW_OP_LLVM_entry_value, 1)), !dbg !1221    ; A two fragment variable.22    ; Fragments intentionally out of order to ensure the code can handle this.23    call void @llvm.dbg.declare(metadata ptr %async_arg, metadata !10, metadata !DIExpression(DW_OP_LLVM_entry_value, 1, DW_OP_plus_uconst, 42, DW_OP_LLVM_fragment, 64, 64)), !dbg !1224    call void @llvm.dbg.declare(metadata ptr %async_arg, metadata !11, metadata !DIExpression(DW_OP_LLVM_entry_value, 1, DW_OP_LLVM_fragment, 0, 64)), !dbg !1225    ; A fragmented variable mixing entry values and stack slot locations.26    call void @llvm.dbg.declare(metadata ptr %async_arg, metadata !13, metadata !DIExpression(DW_OP_LLVM_entry_value, 1, DW_OP_LLVM_fragment, 64, 64)), !dbg !1227    call void @llvm.dbg.declare(metadata ptr %storage, metadata !13, metadata !DIExpression(DW_OP_LLVM_fragment, 0, 64)), !dbg !1228    ret void, !dbg !1229  }30  declare void @llvm.dbg.declare(metadata, metadata, metadata)31  declare void @consume(ptr)32  !llvm.dbg.cu = !{!0}33  !llvm.module.flags = !{!2, !3}34  !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)35  !1 = !DIFile(filename: "x.c", directory: "/")36  !2 = !{i32 2, !"Dwarf Version", i32 4}37  !3 = !{i32 2, !"Debug Info Version", i32 3}38  !4 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 1, type: !5, scopeLine: 1, spFlags: DISPFlagDefinition, unit: !0)39  !5 = !DISubroutineType(types: !6)40  !6 = !{null, !7, !7, !7}41  !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !9, size: 128)42  !9 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char)43  !10 = !DILocalVariable(name: "a", scope: !4, file: !1, line: 1, type: !7)44  !11 = !DILocalVariable(name: "fragmented_var", scope: !4, file: !1, line: 1, type: !7)45  !12 = !DILocation(line: 1, column: 37, scope: !4)46  !13 = !DILocalVariable(name: "multi_type_fragmented_var", scope: !4, file: !1, line: 1, type: !7)47...48---49name:            foo50liveins:51  - { reg: '$x0', virtual-reg: '' }52  - { reg: '$x22', virtual-reg: '' }53stack:54  - { id: 0, name: '', type: spill-slot, offset: -16, size: 8, alignment: 16,55      stack-id: default, callee-saved-register: '$lr', callee-saved-restored: true }56  - { id: 1, name: '', type: default, offset: 0, size: 1, alignment: 8,57      stack-id: default, callee-saved-register: '', callee-saved-restored: true,58      debug-info-variable: '!13', debug-info-expression: '!DIExpression(DW_OP_LLVM_fragment, 0, 64)',59      debug-info-location: '!12' }60 61entry_values:62  - { entry-value-register: '$x22', debug-info-variable: '!10', debug-info-expression: '!DIExpression(DW_OP_LLVM_entry_value, 1, DW_OP_deref)',63      debug-info-location: '!12' }64  - { entry-value-register: '$x22', debug-info-variable: '!11', debug-info-expression: '!DIExpression(DW_OP_LLVM_entry_value, 1, DW_OP_plus_uconst, 42, DW_OP_deref, DW_OP_LLVM_fragment, 64, 64)',65      debug-info-location: '!12' }66  - { entry-value-register: '$x22', debug-info-variable: '!11', debug-info-expression: '!DIExpression(DW_OP_LLVM_entry_value, 1,  DW_OP_deref, DW_OP_LLVM_fragment, 0, 64)',67      debug-info-location: '!12' }68  - { entry-value-register: '$x22', debug-info-variable: '!13', debug-info-expression: '!DIExpression(DW_OP_LLVM_entry_value, 1, DW_OP_deref, DW_OP_LLVM_fragment, 64, 64)',69      debug-info-location: '!12' }70body:             |71  bb.0 (%ir-block.0):72    liveins: $x0, $x22, $lr73    RET undef $lr, debug-location !1274...75