aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-07-20 16:34:50 +0000
committerDan Gohman <gohman@apple.com>2010-07-20 16:34:50 +0000
commitb7391fadfff3a3d2a0883fac3f7ba09def086b94 (patch)
tree79413a354de24fb15fa6d41f441ba4afdf4e52e9
parentee57dae3d8bcb2f3f41eb225bc615045d13d9dda (diff)
downloadexternal_llvm-b7391fadfff3a3d2a0883fac3f7ba09def086b94.zip
external_llvm-b7391fadfff3a3d2a0883fac3f7ba09def086b94.tar.gz
external_llvm-b7391fadfff3a3d2a0883fac3f7ba09def086b94.tar.bz2
Change an argument from an Instruction* to a Value*, which is all
that is needed here. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108850 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Analysis/ScalarEvolutionNormalization.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Analysis/ScalarEvolutionNormalization.cpp b/lib/Analysis/ScalarEvolutionNormalization.cpp
index d9e909c..e78d65e 100644
--- a/lib/Analysis/ScalarEvolutionNormalization.cpp
+++ b/lib/Analysis/ScalarEvolutionNormalization.cpp
@@ -26,7 +26,7 @@ using namespace llvm;
/// post-inc value when we cannot) or it can end up adding extra live-ranges to
/// the loop, resulting in reg-reg copies (if we use the pre-inc value when we
/// should use the post-inc value).
-static bool IVUseShouldUsePostIncValue(Instruction *User, Instruction *IV,
+static bool IVUseShouldUsePostIncValue(Instruction *User, Value *Operand,
const Loop *L, DominatorTree *DT) {
// If the user is in the loop, use the preinc value.
if (L->contains(User)) return false;
@@ -47,15 +47,15 @@ static bool IVUseShouldUsePostIncValue(Instruction *User, Instruction *IV,
PHINode *PN = dyn_cast<PHINode>(User);
if (!PN) return false; // not a phi, not dominated by latch block.
- // Look at all of the uses of IV by the PHI node. If any use corresponds to
- // a block that is not dominated by the latch block, give up and use the
+ // Look at all of the uses of Operand by the PHI node. If any use corresponds
+ // to a block that is not dominated by the latch block, give up and use the
// preincremented value.
for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e; ++i)
- if (PN->getIncomingValue(i) == IV &&
+ if (PN->getIncomingValue(i) == Operand &&
!DT->dominates(LatchBlock, PN->getIncomingBlock(i)))
return false;
- // Okay, all uses of IV by PN are in predecessor blocks that really are
+ // Okay, all uses of Operand by PN are in predecessor blocks that really are
// dominated by the latch block. Use the post-incremented value.
return true;
}