[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
Mon Jun 3 08:33:16 PDT 2019
aprantl added inline comments.
================
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
----------------
avl wrote:
> aprantl wrote:
> > 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.
> I noticed that current clang generates IR without @llvm.dbg.addr.
> That is why I regenerated the test. But I agree that this test should still
> check for @llvm.dbg.addr as it was created originally. So I would return it back ...
IIRC, there's a flag to change this behavior. It's the default on windows only.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62650/new/
https://reviews.llvm.org/D62650
More information about the llvm-commits
mailing list