[llvm] [Assignment Tracking] Change placeholder from `undef` to `poison` (PR #119760)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 12 13:12:43 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-ir
Author: Pedro Lobo (pedroclobo)
<details>
<summary>Changes</summary>
Empty metadata address components of `dbg.assign` can be represented as `poison` values instead of `undef` values.
---
Full diff: https://github.com/llvm/llvm-project/pull/119760.diff
1 Files Affected:
- (modified) llvm/lib/IR/IntrinsicInst.cpp (+2-2)
``````````diff
diff --git a/llvm/lib/IR/IntrinsicInst.cpp b/llvm/lib/IR/IntrinsicInst.cpp
index 002bab8e079e50..79795e5691f865 100644
--- a/llvm/lib/IR/IntrinsicInst.cpp
+++ b/llvm/lib/IR/IntrinsicInst.cpp
@@ -223,12 +223,12 @@ void DbgAssignIntrinsic::setAddress(Value *V) {
void DbgAssignIntrinsic::setKillAddress() {
if (isKillAddress())
return;
- setAddress(UndefValue::get(getAddress()->getType()));
+ setAddress(PoisonValue::get(getAddress()->getType()));
}
bool DbgAssignIntrinsic::isKillAddress() const {
Value *Addr = getAddress();
- return !Addr || isa<UndefValue>(Addr);
+ return !Addr || isa<PoisonValue>(Addr);
}
void DbgAssignIntrinsic::setValue(Value *V) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/119760
More information about the llvm-commits
mailing list