[llvm] a4b4974 - [StackColoring] Use poison instead of undef as placeholder when deleting values [NFC]
Nuno Lopes via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 30 03:57:38 PDT 2024
Author: Nuno Lopes
Date: 2024-06-30T11:55:22+01:00
New Revision: a4b49745af92375968659411b02ac4866a076dd1
URL: https://github.com/llvm/llvm-project/commit/a4b49745af92375968659411b02ac4866a076dd1
DIFF: https://github.com/llvm/llvm-project/commit/a4b49745af92375968659411b02ac4866a076dd1.diff
LOG: [StackColoring] Use poison instead of undef as placeholder when deleting values [NFC]
Added:
Modified:
llvm/lib/CodeGen/StackColoring.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/StackColoring.cpp b/llvm/lib/CodeGen/StackColoring.cpp
index 36414e742c327..10c69cdc0d87f 100644
--- a/llvm/lib/CodeGen/StackColoring.cpp
+++ b/llvm/lib/CodeGen/StackColoring.cpp
@@ -964,14 +964,14 @@ void StackColoring::remapInstructions(DenseMap<int, int> &SlotRemap) {
MFI->setObjectSSPLayout(SI.second, FromKind);
// The new alloca might not be valid in a llvm.dbg.declare for this
- // variable, so undef out the use to make the verifier happy.
+ // variable, so poison out the use to make the verifier happy.
AllocaInst *FromAI = const_cast<AllocaInst *>(From);
if (FromAI->isUsedByMetadata())
- ValueAsMetadata::handleRAUW(FromAI, UndefValue::get(FromAI->getType()));
+ ValueAsMetadata::handleRAUW(FromAI, PoisonValue::get(FromAI->getType()));
for (auto &Use : FromAI->uses()) {
if (BitCastInst *BCI = dyn_cast<BitCastInst>(Use.get()))
if (BCI->isUsedByMetadata())
- ValueAsMetadata::handleRAUW(BCI, UndefValue::get(BCI->getType()));
+ ValueAsMetadata::handleRAUW(BCI, PoisonValue::get(BCI->getType()));
}
// Note that this will not replace uses in MMOs (which we'll update below),
More information about the llvm-commits
mailing list