[PATCH] D140991: [DebugInfo] Replace UndefValue with PoisonValue in DIArgList::handleChangedOperand
Orlando Cazalet-Hyams via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 4 07:17:04 PST 2023
Orlando created this revision.
Orlando added reviewers: nlopes, scott.linder, StephenTozer.
Orlando added a project: debug-info.
Herald added a subscriber: hiraditya.
Herald added a project: All.
Orlando requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
This helps towards the effort to remove UndefValue from LLVM.
Related to https://discourse.llvm.org/t/auto-undef-debug-uses-of-a-deleted-value
https://reviews.llvm.org/D140991
Files:
llvm/lib/IR/DebugInfoMetadata.cpp
llvm/test/Transforms/GlobalOpt/deadglobal-diarglist-use.ll
Index: llvm/test/Transforms/GlobalOpt/deadglobal-diarglist-use.ll
===================================================================
--- llvm/test/Transforms/GlobalOpt/deadglobal-diarglist-use.ll
+++ llvm/test/Transforms/GlobalOpt/deadglobal-diarglist-use.ll
@@ -9,7 +9,7 @@
; CHECK: %struct.S = type { i32 }
; CHECK-NOT: @s
-; CHECK: call void @llvm.dbg.value(metadata !DIArgList([1 x %struct.S]* undef
+; CHECK: call void @llvm.dbg.value(metadata !DIArgList([1 x %struct.S]* poison
%struct.S = type { i32 }
Index: llvm/lib/IR/DebugInfoMetadata.cpp
===================================================================
--- llvm/lib/IR/DebugInfoMetadata.cpp
+++ llvm/lib/IR/DebugInfoMetadata.cpp
@@ -1908,7 +1908,7 @@
if (NewVM)
VM = NewVM;
else
- VM = ValueAsMetadata::get(UndefValue::get(VM->getValue()->getType()));
+ VM = ValueAsMetadata::get(PoisonValue::get(VM->getValue()->getType()));
}
}
if (Uniq) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140991.486283.patch
Type: text/x-patch
Size: 965 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230104/ccc31542/attachment.bin>
More information about the llvm-commits
mailing list