From: Craig Topper Date: Sat, 23 May 2015 08:45:10 +0000 (+0000) Subject: Give more meaningful names than I and J to some for loop variables after converting... X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=2077fc4acfa7a4efef2baa51e29aadcb939e26f7;p=oota-llvm.git Give more meaningful names than I and J to some for loop variables after converting to range-based loops. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238095 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp index 3efea34cc17..25650278bde 100644 --- a/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/lib/Transforms/Scalar/LoopStrengthReduce.cpp @@ -185,8 +185,8 @@ RegUseTracker::SwapAndDropUse(size_t LUIdx, size_t LastLUIdx) { // Update RegUses. The data structure is not optimized for this purpose; // we must iterate through it and update each of the bit vectors. - for (auto &I : RegUsesMap) { - SmallBitVector &UsedByIndices = I.second.UsedByIndices; + for (auto &Pair : RegUsesMap) { + SmallBitVector &UsedByIndices = Pair.second.UsedByIndices; if (LUIdx < UsedByIndices.size()) UsedByIndices[LUIdx] = LastLUIdx < UsedByIndices.size() ? UsedByIndices[LastLUIdx] : 0; @@ -3845,8 +3845,8 @@ void LSRInstance::GenerateCrossUseConstantOffsets() { // If the new formula has a constant in a register, and adding the // constant value to the immediate would produce a value closer to // zero than the immediate itself, then the formula isn't worthwhile. - for (const SCEV *J : NewF.BaseRegs) - if (const SCEVConstant *C = dyn_cast(J)) + for (const SCEV *NewReg : NewF.BaseRegs) + if (const SCEVConstant *C = dyn_cast(NewReg)) if ((C->getValue()->getValue() + NewF.BaseOffset).abs().slt( std::abs(NewF.BaseOffset)) && (C->getValue()->getValue() + @@ -4011,8 +4011,8 @@ static const size_t ComplexityLimit = UINT16_MAX; /// isn't always sufficient. size_t LSRInstance::EstimateSearchSpaceComplexity() const { size_t Power = 1; - for (const LSRUse &I : Uses) { - size_t FSize = I.Formulae.size(); + for (const LSRUse &LU : Uses) { + size_t FSize = LU.Formulae.size(); if (FSize >= ComplexityLimit) { Power = ComplexityLimit; break; @@ -4934,16 +4934,16 @@ void LSRInstance::print_factors_and_types(raw_ostream &OS) const { OS << "LSR has identified the following interesting factors and types: "; bool First = true; - for (int64_t I : Factors) { + for (int64_t Factor : Factors) { if (!First) OS << ", "; First = false; - OS << '*' << I; + OS << '*' << Factor; } - for (Type *I : Types) { + for (Type *Ty : Types) { if (!First) OS << ", "; First = false; - OS << '(' << *I << ')'; + OS << '(' << *Ty << ')'; } OS << '\n'; }