[llvm] r222248 - [Reassociate] Rename local variable to not use same name as a member

Robinson, Paul Paul_Robinson at playstation.sony.com
Tue Nov 18 14:59:47 PST 2014



> -----Original Message-----
> From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-
> bounces at cs.uiuc.edu] On Behalf Of Chad Rosier
> Sent: Tuesday, November 18, 2014 12:22 PM
> To: llvm-commits at cs.uiuc.edu
> Subject: [llvm] r222248 - [Reassociate] Rename local variable to not use
> same name as a member
> 
> Author: mcrosier
> Date: Tue Nov 18 14:21:54 2014
> New Revision: 222248
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=222248&view=rev
> Log:
> [Reassociate] Rename local variable to not use same name as a member
> variable. NFC.

If our coding standard didn't use the same convention for local names and
class members, we wouldn't have this problem.  :-)
--paulr

> 
> Modified:
>     llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp
> 
> Modified: llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp
> URL: http://llvm.org/viewvc/llvm-
> project/llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp?rev=222248&r1=222
> 247&r2=222248&view=diff
> ==========================================================================
> ====
> --- llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp (original)
> +++ llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp Tue Nov 18 14:21:54
> 2014
> @@ -586,7 +586,7 @@ static bool LinearizeExprTree(BinaryOper
>    // ways to get to it.
>    SmallVector<std::pair<BinaryOperator*, APInt>, 8> Worklist; // (Op,
> Weight)
>    Worklist.push_back(std::make_pair(I, APInt(Bitwidth, 1)));
> -  bool MadeChange = false;
> +  bool Changed = false;
> 
>    // Leaves of the expression are values that either aren't the right
> kind of
>    // operation (eg: a constant, or a multiply in an add tree), or are,
> but have
> @@ -655,7 +655,7 @@ static bool LinearizeExprTree(BinaryOper
>          // exactly one such use, drop this new use of the leaf.
>          assert(!Op->hasOneUse() && "Only one use, but we got here
> twice!");
>          I->setOperand(OpIdx, UndefValue::get(I->getType()));
> -        MadeChange = true;
> +        Changed = true;
> 
>          // If the leaf is a binary operation of the right kind and we now
> see
>          // that its multiple original uses were in fact all by nodes
> belonging
> @@ -699,7 +699,7 @@ static bool LinearizeExprTree(BinaryOper
>            BO = LowerNegateToMultiply(BO);
>            DEBUG(dbgs() << *BO << '\n');
>            Worklist.push_back(std::make_pair(BO, Weight));
> -          MadeChange = true;
> +          Changed = true;
>            continue;
>          }
> 
> @@ -739,7 +739,7 @@ static bool LinearizeExprTree(BinaryOper
>      Ops.push_back(std::make_pair(Identity, APInt(Bitwidth, 1)));
>    }
> 
> -  return MadeChange;
> +  return Changed;
>  }
> 
>  // RewriteExprTree - Now that the operands for this expression tree are
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list