From ebcd4af3878449009e18fbcf77d449985e018877 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Mon, 16 Feb 2009 02:57:42 +0000 Subject: [PATCH] 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64625 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/IndVarSimplify.cpp | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp index 92a501fda8e..4e7d5c76a0a 100644 --- a/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/lib/Transforms/Scalar/IndVarSimplify.cpp @@ -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(V)) - V->takeName(I); - I->replaceAllUsesWith(V); - DeadInsts.insert(I); - ++NumRemoved; - Changed = true; - } - } - } - } -#endif - DeleteTriviallyDeadInstructions(DeadInsts); assert(L->isLCSSAForm()); return Changed; -- 2.11.0