diff options
author | Devang Patel <dpatel@apple.com> | 2008-05-15 18:04:29 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2008-05-15 18:04:29 +0000 |
commit | 61724355af8f9db9ea4cc720948a38f587e375f5 (patch) | |
tree | b053785703046aa1888c9c36a04e8ba960132492 /llvm/lib/Transforms/Scalar | |
parent | 1a599ea820cc52546462909734d6cada6095fa2a (diff) | |
download | bcm5719-llvm-61724355af8f9db9ea4cc720948a38f587e375f5.tar.gz bcm5719-llvm-61724355af8f9db9ea4cc720948a38f587e375f5.zip |
Remove useless check.
Patch by Matthijs Kooijman.
llvm-svn: 51154
Diffstat (limited to 'llvm/lib/Transforms/Scalar')
-rw-r--r-- | llvm/lib/Transforms/Scalar/TailDuplication.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/Scalar/TailDuplication.cpp b/llvm/lib/Transforms/Scalar/TailDuplication.cpp index c8493b6a5ff..8cb28a3b06c 100644 --- a/llvm/lib/Transforms/Scalar/TailDuplication.cpp +++ b/llvm/lib/Transforms/Scalar/TailDuplication.cpp @@ -109,13 +109,9 @@ bool TailDup::shouldEliminateUnconditionalBranch(TerminatorInst *TI) { if (!DTI->use_empty()) return false; - // Do not bother working on dead blocks... - pred_iterator PI = pred_begin(Dest), PE = pred_end(Dest); - if (PI == PE && Dest != Dest->getParent()->begin()) - return false; // It's just a dead block, ignore it... - - // Also, do not bother with blocks with only a single predecessor: simplify + // Do not bother with blocks with only a single predecessor: simplify // CFG will fold these two blocks together! + pred_iterator PI = pred_begin(Dest), PE = pred_end(Dest); ++PI; if (PI == PE) return false; // Exactly one predecessor! |