Skip to content

Commit

Permalink
[SCEV] Use auto for consistency with an upcoming change; NFC
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285528 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
sanjoy committed Oct 30, 2016
1 parent abf46ba commit 641d727
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/Analysis/ScalarEvolution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -471,16 +471,16 @@ static int CompareValueComplexity(const LoopInfo *const LI, Value *LV,
return (int)LID - (int)RID;

// Sort arguments by their position.
if (const Argument *LA = dyn_cast<Argument>(LV)) {
const Argument *RA = cast<Argument>(RV);
if (const auto *LA = dyn_cast<Argument>(LV)) {
const auto *RA = cast<Argument>(RV);
unsigned LArgNo = LA->getArgNo(), RArgNo = RA->getArgNo();
return (int)LArgNo - (int)RArgNo;
}

// For instructions, compare their loop depth, and their operand count. This
// is pretty loose.
if (const Instruction *LInst = dyn_cast<Instruction>(LV)) {
const Instruction *RInst = cast<Instruction>(RV);
if (const auto *LInst = dyn_cast<Instruction>(LV)) {
const auto *RInst = cast<Instruction>(RV);

// Compare loop depths.
const BasicBlock *LParent = LInst->getParent(),
Expand Down

0 comments on commit 641d727

Please sign in to comment.