diff options
author | Jeremy Morse <jeremy.morse.llvm@gmail.com> | 2019-10-15 10:46:24 +0000 |
---|---|---|
committer | Jeremy Morse <jeremy.morse.llvm@gmail.com> | 2019-10-15 10:46:24 +0000 |
commit | ed29dbaafa49bb8c9039a35f768244c394411fea (patch) | |
tree | 32dfe72ba734aa9f8e8f53c9ce9e58c232632884 /llvm/test/DebugInfo/X86/parameters.ll | |
parent | 4706f3be88d9cb530afb32b8d9d2bd5bfde2c881 (diff) | |
download | bcm5719-llvm-ed29dbaafa49bb8c9039a35f768244c394411fea.tar.gz bcm5719-llvm-ed29dbaafa49bb8c9039a35f768244c394411fea.zip |
[DebugInfo] Remove some users of DBG_VALUEs IsIndirect field
This patch kills off a significant user of the "IsIndirect" field of
DBG_VALUE machine insts. Brought up in in PR41675, IsIndirect is
techncally redundant as it can be expressed by the DIExpression of a
DBG_VALUE inst, and it isn't helpful to have two ways of expressing
things.
Rather than setting IsIndirect, have DBG_VALUE creators add an extra deref
to the insts DIExpression. There should now be no appearences of
IsIndirect=True from isel down to LiveDebugVariables / VirtRegRewriter,
which is ensured by an assertion in LDVImpl::handleDebugValue. This means
we also get to delete the IsIndirect handling in LiveDebugVariables. Tests
can be upgraded by for example swapping the following IsIndirect=True
DBG_VALUE:
DBG_VALUE $somereg, 0, !123, !DIExpression(DW_OP_foo)
With one where the indirection is in the DIExpression, by _appending_
a deref:
DBG_VALUE $somereg, $noreg, !123, !DIExpression(DW_OP_foo, DW_OP_deref)
Which both mean the same thing.
Most of the test changes in this patch are updates of that form; also some
changes in how the textual assembly printer handles these insts.
Differential Revision: https://reviews.llvm.org/D68945
llvm-svn: 374877
Diffstat (limited to 'llvm/test/DebugInfo/X86/parameters.ll')
-rw-r--r-- | llvm/test/DebugInfo/X86/parameters.ll | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/test/DebugInfo/X86/parameters.ll b/llvm/test/DebugInfo/X86/parameters.ll index ed0048cc15e..3330e968aa1 100644 --- a/llvm/test/DebugInfo/X86/parameters.ll +++ b/llvm/test/DebugInfo/X86/parameters.ll @@ -28,7 +28,7 @@ ; CHECK: DW_AT_name{{.*}} = "func" ; CHECK: DW_TAG_formal_parameter ; CHECK: DW_AT_location {{.*}} -; CHECK-NEXT: DW_OP_breg4 RSI+0, DW_OP_deref +; CHECK-NEXT: DW_OP_breg4 RSI+0) ; CHECK-NOT: DW_TAG ; CHECK: DW_AT_name{{.*}} = "f" @@ -38,8 +38,8 @@ ; CHECK: DW_AT_location{{.*}}(DW_OP_fbreg +23) ; CHECK: DW_TAG_formal_parameter ; CHECK: DW_AT_location{{.*}}( -; CHECK-NEXT: {{.*}}: DW_OP_breg4 RSI+0, DW_OP_deref -; CHECK-NEXT: {{.*}}: DW_OP_breg7 RSP+8, DW_OP_deref, DW_OP_deref) +; CHECK-NEXT: {{.*}}: DW_OP_breg4 RSI+0{{$}} +; CHECK-NEXT: {{.*}}: DW_OP_breg7 RSP+8, DW_OP_deref) ; CHECK-NOT: DW_TAG ; CHECK: DW_AT_name{{.*}} = "g" @@ -48,7 +48,7 @@ ; Function Attrs: uwtable define void @_ZN7pr147634funcENS_3fooE(%"struct.pr14763::foo"* noalias sret %agg.result, %"struct.pr14763::foo"* %f) #0 !dbg !4 { entry: - call void @llvm.dbg.declare(metadata %"struct.pr14763::foo"* %f, metadata !22, metadata !DIExpression(DW_OP_deref)), !dbg !24 + call void @llvm.dbg.declare(metadata %"struct.pr14763::foo"* %f, metadata !22, metadata !DIExpression()), !dbg !24 call void @_ZN7pr147633fooC1ERKS0_(%"struct.pr14763::foo"* %agg.result, %"struct.pr14763::foo"* %f), !dbg !25 ret void, !dbg !25 } @@ -65,7 +65,7 @@ entry: %frombool = zext i1 %b to i8 store i8 %frombool, i8* %b.addr, align 1 call void @llvm.dbg.declare(metadata i8* %b.addr, metadata !26, metadata !DIExpression()), !dbg !27 - call void @llvm.dbg.declare(metadata %"struct.pr14763::foo"* %g, metadata !28, metadata !DIExpression(DW_OP_deref)), !dbg !27 + call void @llvm.dbg.declare(metadata %"struct.pr14763::foo"* %g, metadata !28, metadata !DIExpression()), !dbg !27 %0 = load i8, i8* %b.addr, align 1, !dbg !29 %tobool = trunc i8 %0 to i1, !dbg !29 br i1 %tobool, label %if.then, label %if.end, !dbg !29 |