diff options
author | Nuno Lopes <nuno.lopes@tecnico.ulisboa.pt> | 2022-06-30 23:01:27 +0100 |
---|---|---|
committer | Nuno Lopes <nuno.lopes@tecnico.ulisboa.pt> | 2022-06-30 23:01:43 +0100 |
commit | 373571dbb4b598955e45fd1c3a5557ef70963fd8 (patch) | |
tree | fd826ea42417c215822d5c99b4de6f95174706df /llvm/lib/CodeGen/CodeGenPrepare.cpp | |
parent | da1609ad73540978f66111e96ea500b97ca9b39a (diff) | |
download | llvm-373571dbb4b598955e45fd1c3a5557ef70963fd8.zip llvm-373571dbb4b598955e45fd1c3a5557ef70963fd8.tar.gz llvm-373571dbb4b598955e45fd1c3a5557ef70963fd8.tar.bz2 |
[NFC] Switch a few uses of undef to poison as placeholders for unreachble code
Diffstat (limited to 'llvm/lib/CodeGen/CodeGenPrepare.cpp')
-rw-r--r-- | llvm/lib/CodeGen/CodeGenPrepare.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp index 9bdf6e0..6778af2 100644 --- a/llvm/lib/CodeGen/CodeGenPrepare.cpp +++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp @@ -3440,7 +3440,7 @@ public: void destroyNewNodes(Type *CommonType) { // For safe erasing, replace the uses with dummy value first. - auto *Dummy = UndefValue::get(CommonType); + auto *Dummy = PoisonValue::get(CommonType); for (auto *I : AllPhiNodes) { I->replaceAllUsesWith(Dummy); I->eraseFromParent(); @@ -3809,7 +3809,7 @@ private: SmallVector<Value *, 32> Worklist; assert((isa<PHINode>(Original) || isa<SelectInst>(Original)) && "Address must be a Phi or Select node"); - auto *Dummy = UndefValue::get(CommonType); + auto *Dummy = PoisonValue::get(CommonType); Worklist.push_back(Original); while (!Worklist.empty()) { Value *Current = Worklist.pop_back_val(); @@ -6138,7 +6138,7 @@ bool CodeGenPrepare::optimizePhiTypes(Function &F) { // Remove any old phi's that have been converted. for (auto *I : DeletedInstrs) { - I->replaceAllUsesWith(UndefValue::get(I->getType())); + I->replaceAllUsesWith(PoisonValue::get(I->getType())); I->eraseFromParent(); } |