[llvm] r309946 - [NewGVN] fix typos; NFC

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 3 08:18:27 PDT 2017


Author: spatel
Date: Thu Aug  3 08:18:27 2017
New Revision: 309946

URL: http://llvm.org/viewvc/llvm-project?rev=309946&view=rev
Log:
[NewGVN] fix typos; NFC

Modified:
    llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp?rev=309946&r1=309945&r2=309946&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp Thu Aug  3 08:18:27 2017
@@ -986,7 +986,7 @@ const Expression *NewGVN::createExpressi
       E->swapOperands(0, 1);
   }
 
-  // Perform simplificaiton
+  // Perform simplification.
   // TODO: Right now we only check to see if we get a constant result.
   // We may get a less than constant, but still better, result for
   // some operations.
@@ -1276,7 +1276,7 @@ NewGVN::performSymbolicLoadCoercion(Type
   if (auto *DepSI = dyn_cast<StoreInst>(DepInst)) {
     // Can't forward from non-atomic to atomic without violating memory model.
     // Also don't need to coerce if they are the same type, we will just
-    // propogate..
+    // propagate.
     if (LI->isAtomic() > DepSI->isAtomic() ||
         LoadType == DepSI->getValueOperand()->getType())
       return nullptr;
@@ -1297,7 +1297,7 @@ NewGVN::performSymbolicLoadCoercion(Type
       return nullptr;
     int Offset = analyzeLoadFromClobberingLoad(LoadType, LoadPtr, DepLI, DL);
     if (Offset >= 0) {
-      // We can coerce a constant load into a load
+      // We can coerce a constant load into a load.
       if (auto *C = dyn_cast<Constant>(lookupOperandLeader(DepLI)))
         if (auto *PossibleConstant =
                 getConstantLoadValueForLoad(C, Offset, LoadType, DL)) {
@@ -1400,7 +1400,7 @@ NewGVN::performSymbolicPredicateInfoEval
   auto *Cond = PWC->Condition;
 
   // If this a copy of the condition, it must be either true or false depending
-  // on the predicate info type and edge
+  // on the predicate info type and edge.
   if (CopyOf == Cond) {
     // We should not need to add predicate users because the predicate info is
     // already a use of this operand.
@@ -1436,7 +1436,7 @@ NewGVN::performSymbolicPredicateInfoEval
   Value *FirstOp = lookupOperandLeader(Cmp->getOperand(0));
   Value *SecondOp = lookupOperandLeader(Cmp->getOperand(1));
   bool SwappedOps = false;
-  // Sort the ops
+  // Sort the ops.
   if (shouldSwapOperands(FirstOp, SecondOp)) {
     std::swap(FirstOp, SecondOp);
     SwappedOps = true;
@@ -1582,7 +1582,7 @@ bool NewGVN::isCycleFree(const Instructi
   return true;
 }
 
-// Evaluate PHI nodes symbolically, and create an expression result.
+// Evaluate PHI nodes symbolically and create an expression result.
 const Expression *NewGVN::performSymbolicPHIEvaluation(Instruction *I) const {
   // True if one of the incoming phi edges is a backedge.
   bool HasBackedge = false;
@@ -1717,7 +1717,7 @@ const Expression *NewGVN::performSymboli
     OurPredicate = CI->getSwappedPredicate();
   }
 
-  // Avoid processing the same info twice
+  // Avoid processing the same info twice.
   const PredicateBase *LastPredInfo = nullptr;
   // See if we know something about the comparison itself, like it is the target
   // of an assume.
@@ -1751,7 +1751,7 @@ const Expression *NewGVN::performSymboli
   // %operands are considered users of the icmp.
 
   // *Currently* we only check one level of comparisons back, and only mark one
-  // level back as touched when changes appen .  If you modify this code to look
+  // level back as touched when changes happen.  If you modify this code to look
   // back farther through comparisons, you *must* mark the appropriate
   // comparisons as users in PredicateInfo.cpp, or you will cause bugs.  See if
   // we know something just from the operands themselves




More information about the llvm-commits mailing list