diff options
author | Nuno Lopes <nuno.lopes@tecnico.ulisboa.pt> | 2022-07-23 21:50:11 +0100 |
---|---|---|
committer | Nuno Lopes <nuno.lopes@tecnico.ulisboa.pt> | 2022-07-23 21:50:11 +0100 |
commit | 9df0b254d24eca0987d9f88e998b4432f8608ff2 (patch) | |
tree | 259a82abacdecc595ac435c46d1391803b532053 /llvm/lib/Transforms/Utils/LoopUtils.cpp | |
parent | 2d2e2e7ea960c678416862f4b70215f0de16f39a (diff) | |
download | llvm-9df0b254d24eca0987d9f88e998b4432f8608ff2.zip llvm-9df0b254d24eca0987d9f88e998b4432f8608ff2.tar.gz llvm-9df0b254d24eca0987d9f88e998b4432f8608ff2.tar.bz2 |
[NFC] Switch a few uses of undef to poison as placeholders for unreachable code
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUtils.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/LoopUtils.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopUtils.cpp b/llvm/lib/Transforms/Utils/LoopUtils.cpp index 4119d8c..349063d 100644 --- a/llvm/lib/Transforms/Utils/LoopUtils.cpp +++ b/llvm/lib/Transforms/Utils/LoopUtils.cpp @@ -602,10 +602,10 @@ void llvm::deleteDeadLoop(Loop *L, DominatorTree *DT, ScalarEvolution *SE, // loop will be already eliminated and we have less work to do but according // to API doc of User::dropAllReferences only valid operation after dropping // references, is deletion. So let's substitute all usages of - // instruction from the loop with undef value of corresponding type first. + // instruction from the loop with poison value of corresponding type first. for (auto *Block : L->blocks()) for (Instruction &I : *Block) { - auto *Undef = UndefValue::get(I.getType()); + auto *Poison = PoisonValue::get(I.getType()); for (Use &U : llvm::make_early_inc_range(I.uses())) { if (auto *Usr = dyn_cast<Instruction>(U.getUser())) if (L->contains(Usr->getParent())) @@ -615,7 +615,7 @@ void llvm::deleteDeadLoop(Loop *L, DominatorTree *DT, ScalarEvolution *SE, if (DT) assert(!DT->isReachableFromEntry(U) && "Unexpected user in reachable block"); - U.set(Undef); + U.set(Poison); } auto *DVI = dyn_cast<DbgVariableIntrinsic>(&I); if (!DVI) |