Spell `necessary' correctly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7944 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/ExprTypeConvert.cpp b/lib/Transforms/ExprTypeConvert.cpp
index 0703968..ac5af10 100644
--- a/lib/Transforms/ExprTypeConvert.cpp
+++ b/lib/Transforms/ExprTypeConvert.cpp
@@ -710,7 +710,7 @@
       if (CTMI != CTMap.end()) {   // Operand #1 is in the table already?
         // If so, check to see if it's Ty*, or, more importantly, if it is a
         // pointer to a structure where the first element is a Ty... this code
-        // is neccesary because we might be trying to change the source and
+        // is necessary because we might be trying to change the source and
         // destination type of the store (they might be related) and the dest
         // pointer type might be a pointer to structure.  Below we allow pointer
         // to structures where the 0th element is compatible with the value,
@@ -864,7 +864,7 @@
 
       // Okay, at this point, we know that all of the arguments can be
       // converted.  We succeed if we can change the return type if
-      // neccesary...
+      // necessary...
       //
       return ValueConvertibleToType(I, FTy->getReturnType(), CTMap, TD);
     }
diff --git a/lib/Transforms/IPO/RaiseAllocations.cpp b/lib/Transforms/IPO/RaiseAllocations.cpp
index dcfdb34..a1ad2c2 100644
--- a/lib/Transforms/IPO/RaiseAllocations.cpp
+++ b/lib/Transforms/IPO/RaiseAllocations.cpp
@@ -133,7 +133,7 @@
         ++NumRaised;
       } else if (CI->getCalledValue() == FreeFunc) { // Replace call to free?
         // If no prototype was provided for free, we may need to cast the
-        // source pointer.  This should be really uncommon, but it's neccesary
+        // source pointer.  This should be really uncommon, but it's necessary
         // just in case we are dealing with wierd code like this:
         //   free((long)ptr);
         //
diff --git a/lib/Transforms/Scalar/ADCE.cpp b/lib/Transforms/Scalar/ADCE.cpp
index 27623fb..a22cdce 100644
--- a/lib/Transforms/Scalar/ADCE.cpp
+++ b/lib/Transforms/Scalar/ADCE.cpp
@@ -208,7 +208,7 @@
   std::set<BasicBlock*> AliveBlocks;
 
   // Process the work list of instructions that just became live... if they
-  // became live, then that means that all of their operands are neccesary as
+  // became live, then that means that all of their operands are necessary as
   // well... make them live as well.
   //
   while (!WorkList.empty()) {
diff --git a/lib/Transforms/Scalar/Reassociate.cpp b/lib/Transforms/Scalar/Reassociate.cpp
index 716785b..94446d0 100644
--- a/lib/Transforms/Scalar/Reassociate.cpp
+++ b/lib/Transforms/Scalar/Reassociate.cpp
@@ -177,7 +177,7 @@
   //   X = -(A+12+C+D)   into    X = -A + -12 + -C + -D = -12 + -A + -C + -D
   // so that later, a: Y = 12+X could get reassociated with the -12 to eliminate
   // the constants.  We assume that instcombine will clean up the mess later if
-  // we introduce tons of unneccesary negation instructions...
+  // we introduce tons of unnecessary negation instructions...
   //
   if (Instruction *I = dyn_cast<Instruction>(V))
     if (I->getOpcode() == Instruction::Add && I->use_size() == 1) {
diff --git a/lib/Transforms/Scalar/SCCP.cpp b/lib/Transforms/Scalar/SCCP.cpp
index c0ff2fa..06227d8 100644
--- a/lib/Transforms/Scalar/SCCP.cpp
+++ b/lib/Transforms/Scalar/SCCP.cpp
@@ -132,7 +132,7 @@
   }
 
   // getValueState - Return the InstVal object that corresponds to the value.
-  // This function is neccesary because not all values should start out in the
+  // This function is necessary because not all values should start out in the
   // underdefined state... Argument's should be overdefined, and
   // constants should be marked as constants.  If a value is not known to be an
   // Instruction object, then use this accessor to get its value from the map.
diff --git a/lib/Transforms/Utils/BasicBlockUtils.cpp b/lib/Transforms/Utils/BasicBlockUtils.cpp
index 3383427..0f0f14a 100644
--- a/lib/Transforms/Utils/BasicBlockUtils.cpp
+++ b/lib/Transforms/Utils/BasicBlockUtils.cpp
@@ -23,7 +23,7 @@
 
   std::string OldName = I.getName();
   
-  // Delete the unneccesary instruction now...
+  // Delete the unnecessary instruction now...
   BI = BIL.erase(BI);
 
   // Make sure to propagate a name if there is one already...
diff --git a/lib/Transforms/Utils/LoopSimplify.cpp b/lib/Transforms/Utils/LoopSimplify.cpp
index 7576b01..9507941 100644
--- a/lib/Transforms/Utils/LoopSimplify.cpp
+++ b/lib/Transforms/Utils/LoopSimplify.cpp
@@ -13,7 +13,7 @@
 // as store-sinking that is built into LICM.
 //
 // Note that the simplifycfg pass will clean up blocks which are split out but
-// end up being unneccesary, so usage of this pass does not neccesarily
+// end up being unnecessary, so usage of this pass does not neccesarily
 // pessimize generated code.
 //
 //===----------------------------------------------------------------------===//
diff --git a/lib/Transforms/Utils/LowerAllocations.cpp b/lib/Transforms/Utils/LowerAllocations.cpp
index 53584d9..8d75ae8 100644
--- a/lib/Transforms/Utils/LowerAllocations.cpp
+++ b/lib/Transforms/Utils/LowerAllocations.cpp
@@ -97,7 +97,7 @@
       if (MI->getNumOperands() && Size == 1) {
         MallocArg = MI->getOperand(0);         // Operand * 1 = Operand
       } else if (MI->getNumOperands()) {
-        // Multiply it by the array size if neccesary...
+        // Multiply it by the array size if necessary...
         MallocArg = BinaryOperator::create(Instruction::Mul, MI->getOperand(0),
                                            MallocArg, "", I);
       }
diff --git a/lib/Transforms/Utils/PromoteMemoryToRegister.cpp b/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
index 85acce6..d22451c 100644
--- a/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
+++ b/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
@@ -202,7 +202,7 @@
   // correct number of entries for their predecessors.
   Value *NullVal = Constant::getNullValue(PN->getType());
 
-  // This is neccesary because adding incoming values to the PHI node adds uses
+  // This is necessary because adding incoming values to the PHI node adds uses
   // to the basic blocks being used, which can invalidate the predecessor
   // iterator!
   std::vector<BasicBlock*> Preds(pred_begin(BB), pred_end(BB));