[llvm-commits] [llvm] r51154 - /llvm/trunk/lib/Transforms/Scalar/TailDuplication.cpp
Devang Patel
dpatel at apple.com
Thu May 15 11:04:29 PDT 2008
Author: dpatel
Date: Thu May 15 13:04:29 2008
New Revision: 51154
URL: http://llvm.org/viewvc/llvm-project?rev=51154&view=rev
Log:
Remove useless check.
Patch by Matthijs Kooijman.
Modified:
llvm/trunk/lib/Transforms/Scalar/TailDuplication.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/TailDuplication.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/TailDuplication.cpp?rev=51154&r1=51153&r2=51154&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/TailDuplication.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/TailDuplication.cpp Thu May 15 13:04:29 2008
@@ -109,13 +109,9 @@
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!
More information about the llvm-commits
mailing list