aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/CloneFunction.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2020-11-16 22:09:14 -0800
committerKazu Hirata <kazu@google.com>2020-11-16 22:09:14 -0800
commit1da60f1d44cc2157a8832993952bfea95e8cb6d6 (patch)
tree116d150ff1371d38cebb06afee36edb831104e74 /llvm/lib/Transforms/Utils/CloneFunction.cpp
parent4ce3d2715a41aca2e153f5fa36a428c8b75270a5 (diff)
downloadllvm-1da60f1d44cc2157a8832993952bfea95e8cb6d6.zip
llvm-1da60f1d44cc2157a8832993952bfea95e8cb6d6.tar.gz
llvm-1da60f1d44cc2157a8832993952bfea95e8cb6d6.tar.bz2
[Transforms] Use pred_empty (NFC)
Diffstat (limited to 'llvm/lib/Transforms/Utils/CloneFunction.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/CloneFunction.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/CloneFunction.cpp b/llvm/lib/Transforms/Utils/CloneFunction.cpp
index 3225495..786287b 100644
--- a/llvm/lib/Transforms/Utils/CloneFunction.cpp
+++ b/llvm/lib/Transforms/Utils/CloneFunction.cpp
@@ -675,8 +675,7 @@ void llvm::CloneAndPruneIntoFromInst(Function *NewFunc, const Function *OldFunc,
// Check if this block has become dead during inlining or other
// simplifications. Note that the first block will appear dead, as it has
// not yet been wired up properly.
- if (I != Begin && (pred_begin(&*I) == pred_end(&*I) ||
- I->getSinglePredecessor() == &*I)) {
+ if (I != Begin && (pred_empty(&*I) || I->getSinglePredecessor() == &*I)) {
BasicBlock *DeadBB = &*I++;
DeleteDeadBlock(DeadBB);
continue;