brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.6 KiB · abe27e9 Raw
76 lines · plain
1# RUN: llc %s --start-after=livedebugvalues --dwarf-use-key-instructions --filetype=obj -o - \2# RUN: | llvm-objdump -d - --no-show-raw-insn \3# RUN: | FileCheck %s --check-prefix=OBJ4 5# RUN: llc %s --start-after=livedebugvalues --dwarf-use-key-instructions --filetype=obj -o - \6# RUN: | llvm-dwarfdump - --debug-line \7# RUN: | FileCheck %s --check-prefix=DBG8 9# OBJ: 0000000000000000 <_Z1fPiii>:10# OBJ-NEXT:  0:       movl    $0x0, %ebx11# OBJ-NEXT:  5:       movl    $0x1, %ebx12# OBJ-NEXT:  a:       movl    $0x2, %ebx13# OBJ-NEXT:  f:       movl    $0x3, %ebx14# OBJ-NEXT: 14:       movl    $0x4, %eax15# OBJ-NEXT: 19:       movl    $0x5, %eax16# OBJ-NEXT: 1e:       movl    $0x6, %eax17# OBJ-NEXT: 23:       movl    $0x7, %eax18# OBJ-NEXT: 28:       retq19 20# DBG:      Address            Line   Column File   ISA Discriminator OpIndex Flags21# DBG-NEXT: ------------------ ------ ------ ------ --- ------------- ------- -------------22# DBG-NEXT: 0x0000000000000000      1      0      0   0             0       0  is_stmt prologue_end23# DBG-NEXT: 0x0000000000000005      2      0      0   0             0       0  is_stmt24# DBG-NEXT: 0x0000000000000019      2      0      0   0             0       0  is_stmt25# DBG-NEXT: 0x000000000000001e      2      0      0   0             0       0  is_stmt26# DBG-NEXT: 0x0000000000000023      2      0      0   0             0       0  is_stmt27# DBG-NEXT: 0x0000000000000029      2      0      0   0             0       0  is_stmt end_sequence28 29## Check that interleaving atoms on the same line still produces reasonable30## is_stmt placement (the is_stmts want to "float up" to the first instruction31## in a contiguous set with the same line, but we don't let them float past32## other atom groups).33 34--- |35  target triple = "x86_64-unknown-linux-gnu"36 37  define hidden noundef i32 @_Z1fPiii(ptr %a, i32 %b, i32 %c, i1 %cond) local_unnamed_addr !dbg !5 {38  entry:39    ret i32 240  }41 42  !llvm.dbg.cu = !{!0}43  !llvm.module.flags = !{!2, !3}44  !llvm.ident = !{!4}45 46  !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_17, file: !1, producer: "clang version 19.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, splitDebugInlining: false, nameTableKind: None)47  !1 = !DIFile(filename: "test.cpp", directory: "/")48  !2 = !{i32 7, !"Dwarf Version", i32 5}49  !3 = !{i32 2, !"Debug Info Version", i32 3}50  !4 = !{!"clang version 19.0.0"}51  !5 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 1, type: !6, scopeLine: 1, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, keyInstructions: true)52  !6 = !DISubroutineType(types: !7)53  !7 = !{}54  !8 = !DILocalVariable(name: "x", scope: !5, file: !1, line: 1, type: !7)55 56...57---58name:            _Z1fPiii59alignment:       1660body:             |61  bb.0.entry:62    $ebx = MOV32ri 0, debug-location !DILocation(line: 1, scope: !5) 63    ;; is_stmt floats up here from mov 3.64    $ebx = MOV32ri 1, debug-location !DILocation(line: 2, scope: !5, atomGroup: 1, atomRank: 1)65    $ebx = MOV32ri 2, debug-location !DILocation(line: 2, scope: !5, atomGroup: 1, atomRank: 2)66    $ebx = MOV32ri 3, debug-location !DILocation(line: 2, scope: !5, atomGroup: 1, atomRank: 1)67    $eax = MOV32ri 4, debug-location !DILocation(line: 2, scope: !5)68    $eax = MOV32ri 5, debug-location !DILocation(line: 2, scope: !5, atomGroup: 2, atomRank: 1)69    ;; is_stmt for this group can't float higher due to atom group above.70    $eax = MOV32ri 6, debug-location !DILocation(line: 2, scope: !5, atomGroup: 3, atomRank: 1)71    ;; Same again.72    $eax = MOV32ri 7, debug-location !DILocation(line: 2, scope: !5, atomGroup: 2, atomRank: 1)73    RET64 $eax74 75...76