[PATCH] D62650: [DebugInfo] DBG_VALUE instruction generated for loop counter is placed incorrectly.

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 31 09:16:49 PDT 2019


aprantl added inline comments.


================
Comment at: llvm/test/CodeGen/AArch64/wrong_debug_loc_after_regalloc.ll:45
+; CHECK-NOT: MOV
+; CHECK: DBG_VALUE $[[REG:[xw][0-9]+]], $noreg, !"i"
+; CHECK: MOV
----------------
what is the debug location attached to the MOV, the DBG_VALUE, and the instructions in between?
If I understand the original code correctly, the intention was to not move a DBG_VALUE before the lexical scope of its variable starts.


================
Comment at: llvm/test/DebugInfo/X86/dbg-addr-dse.ll:35
   store i32 %x, i32* %x.addr, align 4
-  call void @llvm.dbg.addr(metadata i32* %x.addr, metadata !13, metadata !DIExpression()), !dbg !18
-  call void @escape(i32* %x.addr), !dbg !19
-  call void @llvm.dbg.value(metadata i32 1, metadata !13, metadata !DIExpression()), !dbg !20
-  store i32 1, i32* @global, align 4, !dbg !22
-  call void @llvm.dbg.addr(metadata i32* %x.addr, metadata !13, metadata !DIExpression()), !dbg !23
-  store i32 2, i32* %x.addr, align 4, !dbg !23
-  call void @escape(i32* %x.addr), !dbg !24
-  ret void, !dbg !25
+  call void @llvm.dbg.value(metadata i32* %x.addr, metadata !13, metadata !DIExpression(DW_OP_deref)), !dbg !14
+  call void @escape(i32* nonnull %x.addr) #3, !dbg !19
----------------
I don't think it's appropriate to change all dbg.addr instructions to dbg.values in a test that has dbg.addr in the name.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62650/new/

https://reviews.llvm.org/D62650





More information about the llvm-commits mailing list