[llvm-branch-commits] [llvm] [KeyInstr][DwarfDebug] Add is_stmt emission support (PR #133495)
Jeremy Morse via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Apr 23 09:13:27 PDT 2025
================
@@ -0,0 +1,78 @@
+# RUN: llc %s --start-after=livedebugvalues --dwarf-use-key-instructions --filetype=obj -o - \
+# RUN: | llvm-objdump -d - --no-show-raw-insn \
+# RUN: | FileCheck %s --check-prefix=OBJ
+
+# RUN: llc %s --start-after=livedebugvalues --dwarf-use-key-instructions --filetype=obj -o - \
+# RUN: | llvm-dwarfdump - --debug-line \
+# RUN: | FileCheck %s --check-prefix=DBG
+
+# OBJ: 0000000000000000 <_Z1fPiii>:
+# OBJ-NEXT: 0: movl $0x0, %ebx
+# OBJ-NEXT: 5: movl $0x1, %ebx
+# OBJ-NEXT: a: movl $0x2, %ebx
+# OBJ-NEXT: f: movl $0x3, %ebx
+# OBJ-NEXT: 14: movl $0x4, %eax
+# OBJ-NEXT: 19: movl $0x5, %eax
+# OBJ-NEXT: 1e: movl $0x6, %eax
+# OBJ-NEXT: 23: movl $0x7, %eax
+# OBJ-NEXT: 28: retq
+
+# DBG: Address Line Column File ISA Discriminator OpIndex Flags
+# DBG-NEXT: ------------------ ------ ------ ------ --- ------------- ------- -------------
+# DBG-NEXT: 0x0000000000000000 1 0 0 0 0 0 is_stmt prologue_end
+# DBG-NEXT: 0x0000000000000005 2 0 0 0 0 0 is_stmt
+# DBG-NEXT: 0x000000000000000a 2 0 0 0 0 0
+# DBG-NEXT: 0x000000000000000f 2 0 0 0 0 0
+# DBG-NEXT: 0x0000000000000014 2 0 0 0 0 0
+# DBG-NEXT: 0x0000000000000019 2 0 0 0 0 0
----------------
jmorse wrote:
Shouldn't these line-entries all fold together into one, or is there some data keeping them distinct? AFAUI there's no need for multiple records if we can just describe a single range.
https://github.com/llvm/llvm-project/pull/133495
More information about the llvm-branch-commits
mailing list