[llvm] r243313 - [LAA] Upper-case variable names, NFC

Joerg Sonnenberger via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 9 14:31:31 PDT 2015


On Mon, Jul 27, 2015 at 07:38:50PM -0000, Adam Nemet wrote:
> Modified: llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp?rev=243313&r1=243312&r2=243313&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp (original)
> +++ llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp Mon Jul 27 14:38:50 2015
> @@ -153,10 +153,10 @@ RuntimePointerChecking::generateChecks(
>      const SmallVectorImpl<int> *PtrPartition) const {
>    SmallVector<PointerCheck, 4> Checks;
>  
> -  for (unsigned i = 0; i < CheckingGroups.size(); ++i) {
> -    for (unsigned j = i + 1; j < CheckingGroups.size(); ++j) {
> -      const RuntimePointerChecking::CheckingPtrGroup &CGI = CheckingGroups[i];
> -      const RuntimePointerChecking::CheckingPtrGroup &CGJ = CheckingGroups[j];
> +  for (unsigned I = 0; I < CheckingGroups.size(); ++I) {
> +    for (unsigned J = I + 1; J < CheckingGroups.size(); ++J) {
> +      const RuntimePointerChecking::CheckingPtrGroup &CGI = CheckingGroups[I];
> +      const RuntimePointerChecking::CheckingPtrGroup &CGJ = CheckingGroups[J];
>  
>        if (needsChecking(CGI, CGJ, PtrPartition))
>          Checks.push_back(std::make_pair(&CGI, &CGJ));

Can't you use a range for and remove the counters completely?

Joerg


More information about the llvm-commits mailing list