From: Nick Lewycky Date: Thu, 21 Feb 2008 08:34:02 +0000 (+0000) Subject: GlobalValues are Constants, remove redundant code. Also fix typo in a comment. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3b71165b32dd631e2a3e5d27fa10c5d6c08d19e2;p=oota-llvm.git GlobalValues are Constants, remove redundant code. Also fix typo in a comment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47433 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index 30cf950d571..827b1c02f02 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -1886,7 +1886,7 @@ SCEVHandle ScalarEvolutionsImpl::ComputeIterationCount(const Loop *L) { ICmpInst *ExitCond = dyn_cast(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(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(V)) return PHIVal; - if (GlobalValue *GV = dyn_cast(V)) - return GV; if (Constant *C = dyn_cast(V)) return C; Instruction *I = cast(V);