[llvm-commits] [llvm] r91653 - /llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp

Dan Gohman gohman at apple.com
Thu Dec 17 17:20:44 PST 2009


Author: djg
Date: Thu Dec 17 19:20:44 2009
New Revision: 91653

URL: http://llvm.org/viewvc/llvm-project?rev=91653&view=rev
Log:
Minor code simplification.

Modified:
    llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp?rev=91653&r1=91652&r2=91653&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Thu Dec 17 19:20:44 2009
@@ -212,8 +212,6 @@
 /// specified set are trivially dead, delete them and see if this makes any of
 /// their operands subsequently dead.
 void LoopStrengthReduce::DeleteTriviallyDeadInstructions() {
-  if (DeadInsts.empty()) return;
-
   while (!DeadInsts.empty()) {
     Instruction *I = dyn_cast_or_null<Instruction>(DeadInsts.pop_back_val());
 
@@ -2720,8 +2718,7 @@
     IVsByStride.clear();
 
     // Clean up after ourselves
-    if (!DeadInsts.empty())
-      DeleteTriviallyDeadInstructions();
+    DeleteTriviallyDeadInstructions();
   }
 
   // At this point, it is worth checking to see if any recurrence PHIs are also





More information about the llvm-commits mailing list