[llvm-commits] [llvm] r64625 - /llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp

Dan Gohman gohman at apple.com
Sun Feb 15 18:57:42 PST 2009


Author: djg
Date: Sun Feb 15 20:57:42 2009
New Revision: 64625

URL: http://llvm.org/viewvc/llvm-project?rev=64625&view=rev
Log:
Delete this long-commented-out code. The situation it seems to have
been written for is no longer relevant with the elimination of
signed and unsigned types.

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

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

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp Sun Feb 15 20:57:42 2009
@@ -754,32 +754,6 @@
     Changed = true;
   }
 
-#if 0
-  // Now replace all derived expressions in the loop body with simpler
-  // expressions.
-  for (LoopInfo::block_iterator I = L->block_begin(), E = L->block_end();
-       I != E; ++I) {
-    BasicBlock *BB = *I;
-    if (LI->getLoopFor(BB) == L) {  // Not in a subloop...
-      for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I)
-        if (I->getType()->isInteger() &&      // Is an integer instruction
-            !I->use_empty() &&
-            !Rewriter.isInsertedInstruction(I)) {
-          SCEVHandle SH = SE->getSCEV(I);
-          Value *V = Rewriter.expandCodeFor(SH, I, I->getType());
-          if (V != I) {
-            if (isa<Instruction>(V))
-              V->takeName(I);
-            I->replaceAllUsesWith(V);
-            DeadInsts.insert(I);
-            ++NumRemoved;
-            Changed = true;
-          }
-        }
-    }
-  }
-#endif
-
   DeleteTriviallyDeadInstructions(DeadInsts);
   assert(L->isLCSSAForm());
   return Changed;





More information about the llvm-commits mailing list