diff options
author | Manuel Brito <manuel.brito@tecnico.ulisboa.pt> | 2022-09-10 14:22:38 +0100 |
---|---|---|
committer | Nuno Lopes <nuno.lopes@tecnico.ulisboa.pt> | 2022-09-10 14:28:01 +0100 |
commit | b51c6130efac2afd183ad71b81c16c713c10a1b5 (patch) | |
tree | 31bac9c96436b6884a3b6ba8e676e18a6f677460 /llvm/lib/CodeGen/WinEHPrepare.cpp | |
parent | bc0725a43763ff241f807e1de45d1a548aec89b8 (diff) | |
download | llvm-b51c6130efac2afd183ad71b81c16c713c10a1b5.zip llvm-b51c6130efac2afd183ad71b81c16c713c10a1b5.tar.gz llvm-b51c6130efac2afd183ad71b81c16c713c10a1b5.tar.bz2 |
Use PoisonValue instead of UndefValue when RAUWing unreachable code [NFC]
Replacing the following instances of UndefValue with PoisonValue, where the UndefValue is used as an arbitrary value:
- llvm/lib/CodeGen/WinEHPrepare.cpp
`demotePHIsOnFunclets`: RAUW arbitrary value for lingering uses of removed PHI nodes
- llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
`FoldSingleEntryPHINodes`: Removes a self-referential single entry phi node.
- llvm/lib/Transforms/Utils/CallGraphUpdater.cpp
`finalize`: Remove all references to removed functions.
- llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
`cleanup`: the result is not used then the inserted instructions are removed.
- llvm/tools/bugpoint/CrashDebugger.cpp
`TestInts`: the program is cloned and instructions are removed to narrow down source of crash.
Differential Revision: https://reviews.llvm.org/D133640
Diffstat (limited to 'llvm/lib/CodeGen/WinEHPrepare.cpp')
-rw-r--r-- | llvm/lib/CodeGen/WinEHPrepare.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/WinEHPrepare.cpp b/llvm/lib/CodeGen/WinEHPrepare.cpp index a71f657..baca410 100644 --- a/llvm/lib/CodeGen/WinEHPrepare.cpp +++ b/llvm/lib/CodeGen/WinEHPrepare.cpp @@ -733,7 +733,7 @@ void WinEHPrepare::demotePHIsOnFunclets(Function &F, for (auto *PN : PHINodes) { // There may be lingering uses on other EH PHIs being removed - PN->replaceAllUsesWith(UndefValue::get(PN->getType())); + PN->replaceAllUsesWith(PoisonValue::get(PN->getType())); PN->eraseFromParent(); } } |