summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/ScalarEvolution.cpp
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2008-02-21 08:34:02 +0000
committerNick Lewycky <nicholas@mxc.ca>2008-02-21 08:34:02 +0000
commit839adb877a8a14d8bec21b9862bcbbebc80b673a (patch)
treeec68f044298e9395206c01535ee9402a02354178 /llvm/lib/Analysis/ScalarEvolution.cpp
parent3cdf542f5acbfa161dd7449c4480907791c9846c (diff)
downloadbcm5719-llvm-839adb877a8a14d8bec21b9862bcbbebc80b673a.tar.gz
bcm5719-llvm-839adb877a8a14d8bec21b9862bcbbebc80b673a.zip
GlobalValues are Constants, remove redundant code. Also fix typo in a comment.
llvm-svn: 47433
Diffstat (limited to 'llvm/lib/Analysis/ScalarEvolution.cpp')
-rw-r--r--llvm/lib/Analysis/ScalarEvolution.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp
index 30cf950d571..827b1c02f02 100644
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/llvm/lib/Analysis/ScalarEvolution.cpp
@@ -1886,7 +1886,7 @@ SCEVHandle ScalarEvolutionsImpl::ComputeIterationCount(const Loop *L) {
ICmpInst *ExitCond = dyn_cast<ICmpInst>(ExitBr->getCondition());
- // If its not an integer comparison then compute it the hard way.
+ // If it's not an integer comparison then compute it the hard way.
// Note that ICmpInst deals with pointer comparisons too so we must check
// the type of the operand.
if (ExitCond == 0 || isa<PointerType>(ExitCond->getOperand(0)->getType()))
@@ -2182,8 +2182,6 @@ static PHINode *getConstantEvolvingPHI(Value *V, const Loop *L) {
/// reason, return null.
static Constant *EvaluateExpression(Value *V, Constant *PHIVal) {
if (isa<PHINode>(V)) return PHIVal;
- if (GlobalValue *GV = dyn_cast<GlobalValue>(V))
- return GV;
if (Constant *C = dyn_cast<Constant>(V)) return C;
Instruction *I = cast<Instruction>(V);
OpenPOWER on IntegriCloud