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

Andrew Trick atrick at apple.com
Wed Mar 9 09:23:39 PST 2011


Author: atrick
Date: Wed Mar  9 11:23:39 2011
New Revision: 127340

URL: http://llvm.org/viewvc/llvm-project?rev=127340&view=rev
Log:
whitespace

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=127340&r1=127339&r2=127340&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original)
+++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Wed Mar  9 11:23:39 2011
@@ -203,7 +203,7 @@
       OS << "alignof(" << *AllocTy << ")";
       return;
     }
-  
+
     const Type *CTy;
     Constant *FieldNo;
     if (U->isOffsetOf(CTy, FieldNo)) {
@@ -212,7 +212,7 @@
       OS << ")";
       return;
     }
-  
+
     // Otherwise just print it normally.
     WriteAsOperand(OS, U->getValue(), false);
     return;
@@ -2783,7 +2783,7 @@
                   HasNUW = true;
                 if (OBO->hasNoSignedWrap())
                   HasNSW = true;
-              } else if (const GEPOperator *GEP = 
+              } else if (const GEPOperator *GEP =
                             dyn_cast<GEPOperator>(BEValueV)) {
                 // If the increment is a GEP, then we know it won't perform a
                 // signed overflow, because the address space cannot be
@@ -2798,7 +2798,7 @@
                 //
                 // This is a highly theoretical concern though, and this is good
                 // enough for all cases we know of at this point. :)
-                //                
+                //
                 HasNSW |= GEP->isInBounds();
               }
 
@@ -3349,7 +3349,7 @@
     SmallVector<const SCEV *, 4> MulOps;
     MulOps.push_back(getSCEV(U->getOperand(1)));
     for (Value *Op = U->getOperand(0);
-         Op->getValueID() == Instruction::Mul + Value::InstructionVal; 
+         Op->getValueID() == Instruction::Mul + Value::InstructionVal;
          Op = U->getOperand(0)) {
       U = cast<Operator>(Op);
       MulOps.push_back(getSCEV(U->getOperand(1)));
@@ -4025,11 +4025,11 @@
 static const SCEVAddRecExpr *
 isSimpleUnwrappingAddRec(const SCEV *S, const Loop *L) {
   const SCEVAddRecExpr *SA = dyn_cast<SCEVAddRecExpr>(S);
-  
+
   // The SCEV must be an addrec of this loop.
   if (!SA || SA->getLoop() != L || !SA->isAffine())
     return 0;
-  
+
   // The SCEV must be known to not wrap in some way to be interesting.
   if (!SA->hasNoUnsignedWrap() && !SA->hasNoSignedWrap())
     return 0;
@@ -4064,24 +4064,24 @@
   // See if LHS and RHS are addrec's we can handle.
   const SCEVAddRecExpr *LHSA = isSimpleUnwrappingAddRec(LHS, L);
   const SCEVAddRecExpr *RHSA = isSimpleUnwrappingAddRec(RHS, L);
-  
+
   // If neither addrec is interesting, just return a minus.
   if (RHSA == 0 && LHSA == 0)
     return SE.getMinusSCEV(LHS, RHS);
-  
+
   // If only one of LHS and RHS are an AddRec of this loop, make sure it is LHS.
   if (RHSA && LHSA == 0) {
     // Safe because a-b === b-a for comparisons against zero.
     std::swap(LHS, RHS);
     std::swap(LHSA, RHSA);
   }
-  
+
   // Handle the case when only one is advancing in a non-overflowing way.
   if (RHSA == 0) {
     // If RHS is loop varying, then we can't predict when LHS will cross it.
     if (!SE.isLoopInvariant(RHS, L))
       return SE.getMinusSCEV(LHS, RHS);
-    
+
     // If LHS has a positive stride, then we compute RHS-LHS, because the loop
     // is counting up until it crosses RHS (which must be larger than LHS).  If
     // it is negative, we compute LHS-RHS because we're counting down to RHS.
@@ -4092,19 +4092,19 @@
 
     return SE.getMinusSCEV(RHS, LHS, true /*HasNUW*/);
   }
-  
+
   // If both LHS and RHS are interesting, we have something like:
   //  a+i*4 != b+i*8.
   const ConstantInt *LHSStride =
     cast<SCEVConstant>(LHSA->getOperand(1))->getValue();
   const ConstantInt *RHSStride =
     cast<SCEVConstant>(RHSA->getOperand(1))->getValue();
-  
+
   // If the strides are equal, then this is just a (complex) loop invariant
   // comparison of a and b.
   if (LHSStride == RHSStride)
     return SE.getMinusSCEV(LHSA->getStart(), RHSA->getStart());
-  
+
   // If the signs of the strides differ, then the negative stride is counting
   // down to the positive stride.
   if (LHSStride->getValue().isNegative() != RHSStride->getValue().isNegative()){
@@ -4117,7 +4117,7 @@
     if (RHSStride->getValue().slt(LHSStride->getValue()))
       std::swap(LHS, RHS);
   }
-    
+
   return SE.getMinusSCEV(LHS, RHS, true /*HasNUW*/);
 }
 
@@ -4903,7 +4903,7 @@
                                                       R2->getValue()))) {
         if (CB->getZExtValue() == false)
           std::swap(R1, R2);   // R1 is the minimum root now.
-        
+
         // We can only use this value if the chrec ends up with an exact zero
         // value at this index.  When solving for "X*X != 5", for example, we
         // should not accept a root of 2.
@@ -4942,7 +4942,7 @@
   if (AddRec->hasNoUnsignedWrap())
     // FIXME: We really want an "isexact" bit for udiv.
     return getUDivExpr(Start, getNegativeSCEV(Step));
-  
+
   // For now we handle only constant steps.
   const SCEVConstant *StepC = dyn_cast<SCEVConstant>(Step);
   if (StepC == 0)
@@ -4951,7 +4951,7 @@
   // First, handle unitary steps.
   if (StepC->getValue()->equalsInt(1))      // 1*N = -Start (mod 2^BW), so:
     return getNegativeSCEV(Start);          //   N = -Start (as unsigned)
-  
+
   if (StepC->getValue()->isAllOnesValue())  // -1*N = -Start (mod 2^BW), so:
     return Start;                           //    N = Start (as unsigned)
 





More information about the llvm-commits mailing list