[llvm] [KeyInstr][DwarfDebug] Add is_stmt emission support (PR #133495)
Jeremy Morse via llvm-commits
llvm-commits at lists.llvm.org
Tue May 13 07:15:07 PDT 2025
================
@@ -0,0 +1,75 @@
+# 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: 0x0000000000000019 2 0 0 0 0 0 is_stmt
+# DBG-NEXT: 0x000000000000001e 2 0 0 0 0 0 is_stmt
+# DBG-NEXT: 0x0000000000000023 2 0 0 0 0 0 is_stmt
+# DBG-NEXT: 0x0000000000000029 2 0 0 0 0 0 is_stmt end_sequence
----------------
jmorse wrote:
Is this setting is_stmt on something that isn't an instruction (after `retq`)? It's end_sequence here, but could this leak out into different functions under different circumstances? Or it's just an off-by-one.
https://github.com/llvm/llvm-project/pull/133495
More information about the llvm-commits
mailing list