[llvm-commits] [llvm] r72376 - in /llvm/trunk: include/llvm/Analysis/ScalarEvolution.h lib/Analysis/ScalarEvolution.cpp

Dan Gohman gohman at apple.com
Sun May 24 16:45:29 PDT 2009


Author: djg
Date: Sun May 24 18:45:28 2009
New Revision: 72376

URL: http://llvm.org/viewvc/llvm-project?rev=72376&view=rev
Log:
Various comment fixes.

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

Modified: llvm/trunk/include/llvm/Analysis/ScalarEvolution.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/ScalarEvolution.h?rev=72376&r1=72375&r2=72376&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Analysis/ScalarEvolution.h (original)
+++ llvm/trunk/include/llvm/Analysis/ScalarEvolution.h Sun May 24 18:45:28 2009
@@ -35,8 +35,8 @@
   class ScalarEvolution;
   class TargetData;
 
-  /// SCEV - This class represent an analyzed expression in the program.  These
-  /// are reference counted opaque objects that the client is not allowed to
+  /// SCEV - This class represents an analyzed expression in the program.  These
+  /// are reference-counted opaque objects that the client is not allowed to
   /// do much with directly.
   ///
   class SCEV {

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

==============================================================================
--- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original)
+++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Sun May 24 18:45:28 2009
@@ -596,7 +596,7 @@
 //===----------------------------------------------------------------------===//
 
 /// BinomialCoefficient - Compute BC(It, K).  The result has width W.
-// Assume, K > 0.
+/// Assume, K > 0.
 static SCEVHandle BinomialCoefficient(SCEVHandle It, unsigned K,
                                       ScalarEvolution &SE,
                                       const Type* ResultTy) {
@@ -933,7 +933,8 @@
   return Result;
 }
 
-// get - Get a canonical add expression, or something simpler if possible.
+/// getAddExpr - Get a canonical add expression, or something simpler if
+/// possible.
 SCEVHandle ScalarEvolution::getAddExpr(std::vector<SCEVHandle> &Ops) {
   assert(!Ops.empty() && "Cannot get empty add!");
   if (Ops.size() == 1) return Ops[0];
@@ -1225,6 +1226,8 @@
 }
 
 
+/// getMulExpr - Get a canonical multiply expression, or something simpler if
+/// possible.
 SCEVHandle ScalarEvolution::getMulExpr(std::vector<SCEVHandle> &Ops) {
   assert(!Ops.empty() && "Cannot get empty mul!");
 #ifndef NDEBUG
@@ -1388,6 +1391,8 @@
   return Result;
 }
 
+/// getUDivExpr - Get a canonical multiply expression, or something simpler if
+/// possible.
 SCEVHandle ScalarEvolution::getUDivExpr(const SCEVHandle &LHS,
                                         const SCEVHandle &RHS) {
   assert(getEffectiveSCEVType(LHS->getType()) ==
@@ -1476,8 +1481,8 @@
 }
 
 
-/// SCEVAddRecExpr::get - Get a add recurrence expression for the
-/// specified loop.  Simplify the expression as much as possible.
+/// getAddRecExpr - Get an add recurrence expression for the specified loop.
+/// Simplify the expression as much as possible.
 SCEVHandle ScalarEvolution::getAddRecExpr(const SCEVHandle &Start,
                                const SCEVHandle &Step, const Loop *L) {
   std::vector<SCEVHandle> Operands;
@@ -1493,8 +1498,8 @@
   return getAddRecExpr(Operands, L);
 }
 
-/// SCEVAddRecExpr::get - Get a add recurrence expression for the
-/// specified loop.  Simplify the expression as much as possible.
+/// getAddRecExpr - Get an add recurrence expression for the specified loop.
+/// Simplify the expression as much as possible.
 SCEVHandle ScalarEvolution::getAddRecExpr(std::vector<SCEVHandle> &Operands,
                                           const Loop *L) {
   if (Operands.size() == 1) return Operands[0];
@@ -3201,7 +3206,7 @@
 }
 
 /// HowFarToZero - Return the number of times a backedge comparing the specified
-/// value to zero will execute.  If not computable, return UnknownValue
+/// value to zero will execute.  If not computable, return UnknownValue.
 SCEVHandle ScalarEvolution::HowFarToZero(const SCEV *V, const Loop *L) {
   // If the value is a constant
   if (const SCEVConstant *C = dyn_cast<SCEVConstant>(V)) {
@@ -3506,8 +3511,8 @@
 
     // If we know that the condition is true in order to enter the loop,
     // then we know that it will run exactly (m-n)/s times. Otherwise, we
-    // only know if will execute (max(m,n)-n)/s times. In both cases, the
-    // division must round up.
+    // only know that it will execute (max(m,n)-n)/s times. In both cases,
+    // the division must round up.
     SCEVHandle End = RHS;
     if (!isLoopGuardedByCond(L,
                              isSigned ? ICmpInst::ICMP_SLT : ICmpInst::ICMP_ULT,





More information about the llvm-commits mailing list