summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2015-05-23 08:45:10 +0000
committerCraig Topper <craig.topper@gmail.com>2015-05-23 08:45:10 +0000
commit10949ae742537a2543361688907d5c41074a8397 (patch)
treee0e1e1bac25262240ed8d449563e99a1b2b8ad52 /llvm/lib/Transforms
parent37d0d866f4016be0fc96727ea65dfcaab106cd95 (diff)
downloadbcm5719-llvm-10949ae742537a2543361688907d5c41074a8397.tar.gz
bcm5719-llvm-10949ae742537a2543361688907d5c41074a8397.zip
Give more meaningful names than I and J to some for loop variables after converting to range-based loops.
llvm-svn: 238095
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
index 3efea34cc17..25650278bde 100644
--- a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
+++ b/llvm/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<SCEVConstant>(J))
+ for (const SCEV *NewReg : NewF.BaseRegs)
+ if (const SCEVConstant *C = dyn_cast<SCEVConstant>(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';
}
OpenPOWER on IntegriCloud