Changes in directory llvm/lib/Transforms/Scalar:
IndVarSimplify.cpp updated: 1.103 -> 1.104 --- Log message: simplify some code --- Diffs of the changes: (+2 -8) IndVarSimplify.cpp | 10 ++-------- 1 files changed, 2 insertions(+), 8 deletions(-) Index: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp diff -u llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.103 llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.104 --- llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.103 Fri Jan 12 01:05:14 2007 +++ llvm/lib/Transforms/Scalar/IndVarSimplify.cpp Fri Jan 12 16:51:20 2007 @@ -533,14 +533,8 @@ InsertedSizes.push_back(LargestType->getPrimitiveSizeInBits()); for (unsigned i = 0, e = IndVars.size(); i != e; ++i) { unsigned ithSize = IndVars[i].first->getType()->getPrimitiveSizeInBits(); - bool alreadyInsertedSize = false; - for (SmallVector<unsigned,4>::iterator I = InsertedSizes.begin(), - E = InsertedSizes.end(); I != E; ++I) - if (*I == ithSize) { - alreadyInsertedSize = true; - break; - } - if (!alreadyInsertedSize) { + if (std::find(InsertedSizes.begin(), InsertedSizes.end(), ithSize) + == InsertedSizes.end()) { PHINode *PN = IndVars[i].first; InsertedSizes.push_back(ithSize); Instruction *New = new TruncInst(IndVar, PN->getType(), "indvar", _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits