Generalize ScalarEvolution's PHI analysis to handle loops that don't
[oota-llvm.git] / lib / Analysis / IVUsers.cpp
index 78de8c69ae3cd6d5d7474228fe92417aff72f5cd..fbd3e7071275ec61948a494b324ad1ee5a2b6c05 100644 (file)
@@ -82,7 +82,6 @@ bool IVUsers::AddUsersIfInteresting(Instruction *I) {
 
   // Get the symbolic expression for this instruction.
   const SCEV *ISE = SE->getSCEV(I);
-  if (isa<SCEVCouldNotCompute>(ISE)) return false;
 
   // If we've come to an uninteresting expression, stop the traversal and
   // call this a user.
@@ -165,7 +164,7 @@ bool IVUsers::runOnLoop(Loop *l, LPPassManager &LPM) {
   // them by stride.  Start by finding all of the PHI nodes in the header for
   // this loop.  If they are induction variables, inspect their uses.
   for (BasicBlock::iterator I = L->getHeader()->begin(); isa<PHINode>(I); ++I)
-    AddUsersIfInteresting(I);
+    (void)AddUsersIfInteresting(I);
 
   return false;
 }