[llvm-commits] [llvm] r47433 - /llvm/trunk/lib/Analysis/ScalarEvolution.cpp

Nick Lewycky nicholas at mxc.ca
Thu Feb 21 00:34:05 PST 2008


Author: nicholas
Date: Thu Feb 21 02:34:02 2008
New Revision: 47433

URL: http://llvm.org/viewvc/llvm-project?rev=47433&view=rev
Log:
GlobalValues are Constants, remove redundant code. Also fix typo in a comment.

Modified:
    llvm/trunk/lib/Analysis/ScalarEvolution.cpp

Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=47433&r1=47432&r2=47433&view=diff

==============================================================================
--- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original)
+++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Thu Feb 21 02:34:02 2008
@@ -1886,7 +1886,7 @@
   
   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 @@
 /// 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);
 





More information about the llvm-commits mailing list