OSDN Git Service

Delete this long-commented-out code. The situation it seems to have
authorDan Gohman <gohman@apple.com>
Mon, 16 Feb 2009 02:57:42 +0000 (02:57 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 16 Feb 2009 02:57:42 +0000 (02:57 +0000)
been written for is no longer relevant with the elimination of
signed and unsigned types.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64625 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/IndVarSimplify.cpp

index 92a501f..4e7d5c7 100644 (file)
@@ -754,32 +754,6 @@ bool IndVarSimplify::runOnLoop(Loop *L, LPPassManager &LPM) {
     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;