[llvm] r280853 - Don't reuse a variable name in a nested scope. NFC.
Michael Kuperstein via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 7 13:29:50 PDT 2016
Author: mkuper
Date: Wed Sep 7 15:29:49 2016
New Revision: 280853
URL: http://llvm.org/viewvc/llvm-project?rev=280853&view=rev
Log:
Don't reuse a variable name in a nested scope. NFC.
Modified:
llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp
Modified: llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp?rev=280853&r1=280852&r2=280853&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp (original)
+++ llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp Wed Sep 7 15:29:49 2016
@@ -1963,13 +1963,13 @@ bool CodeGenPrepare::dupRetToEnableTailC
if (!TLI)
return false;
- ReturnInst *RI = dyn_cast<ReturnInst>(BB->getTerminator());
- if (!RI)
+ ReturnInst *RetI = dyn_cast<ReturnInst>(BB->getTerminator());
+ if (!RetI)
return false;
PHINode *PN = nullptr;
BitCastInst *BCI = nullptr;
- Value *V = RI->getReturnValue();
+ Value *V = RetI->getReturnValue();
if (V) {
BCI = dyn_cast<BitCastInst>(V);
if (BCI)
@@ -1999,12 +1999,12 @@ bool CodeGenPrepare::dupRetToEnableTailC
if (&*BI == BCI)
// Also skip over the bitcast.
++BI;
- if (&*BI != RI)
+ if (&*BI != RetI)
return false;
} else {
BasicBlock::iterator BI = BB->begin();
while (isa<DbgInfoIntrinsic>(BI)) ++BI;
- if (&*BI != RI)
+ if (&*BI != RetI)
return false;
}
@@ -2060,7 +2060,7 @@ bool CodeGenPrepare::dupRetToEnableTailC
continue;
// Duplicate the return into CallBB.
- (void)FoldReturnIntoUncondBranch(RI, BB, CallBB);
+ (void)FoldReturnIntoUncondBranch(RetI, BB, CallBB);
ModifiedDT = Changed = true;
++NumRetsDup;
}
More information about the llvm-commits
mailing list