Fix spelling.
authorMisha Brukman <brukman+llvm@gmail.com>
Fri, 10 Oct 2003 17:57:28 +0000 (17:57 +0000)
committerMisha Brukman <brukman+llvm@gmail.com>
Fri, 10 Oct 2003 17:57:28 +0000 (17:57 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9027 91177308-0d34-0410-b5e6-96231b3b80d8

39 files changed:
lib/Analysis/DataStructure/Parallelize.cpp
lib/Linker/LinkModules.cpp
lib/Target/SparcV9/MappingInfo.cpp
lib/Target/SparcV9/SparcV9CodeEmitter.cpp
lib/Target/SparcV9/SparcV9RegClassInfo.cpp
lib/Target/SparcV9/SparcV9RegInfo.cpp
lib/Target/X86/FloatingPoint.cpp
lib/Target/X86/InstSelectSimple.cpp
lib/Target/X86/X86FloatingPoint.cpp
lib/Target/X86/X86ISelSimple.cpp
lib/Transforms/ExprTypeConvert.cpp
lib/Transforms/IPO/DeadArgumentElimination.cpp
lib/Transforms/IPO/ExtractFunction.cpp
lib/Transforms/IPO/InlineSimple.cpp
lib/Transforms/IPO/MutateStructTypes.cpp
lib/Transforms/IPO/Parallelize.cpp
lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp
lib/Transforms/Instrumentation/ProfilePaths/GraphAuxiliary.cpp
lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp
lib/Transforms/Scalar/ADCE.cpp
lib/Transforms/Scalar/CorrelatedExprs.cpp
lib/Transforms/Scalar/GCSE.cpp
lib/Transforms/Scalar/IndVarSimplify.cpp
lib/Transforms/Scalar/LICM.cpp
lib/Transforms/Scalar/PiNodeInsertion.cpp
lib/Transforms/Scalar/SCCP.cpp
lib/Transforms/TransformInternals.cpp
lib/Transforms/Utils/BasicBlockUtils.cpp
lib/Transforms/Utils/BreakCriticalEdges.cpp
lib/Transforms/Utils/CloneModule.cpp
lib/Transforms/Utils/Linker.cpp
lib/Transforms/Utils/LoopSimplify.cpp
lib/Transforms/Utils/SimplifyCFG.cpp
lib/VMCore/Linker.cpp
runtime/GCCLibraries/crtend/C++-Exception.cpp
tools/bugpoint/CrashDebugger.cpp
tools/bugpoint/OptimizerDriver.cpp
tools/gccld/gccld.cpp
tools/llvm-ar/llvm-ar.cpp

index e533c4ea5ee514e3a50561ddb88991c4af57d33f..09b7dc21cdff43783bf4fe1930343c76bd4d93a2 100644 (file)
@@ -81,7 +81,7 @@ static bool isSync(const CallInst& CI) {
 // class Cilkifier
 //
 // Code generation pass that transforms code to identify where Cilk keywords
-// should be inserted.  This relies on dis -c to print out the keywords.
+// should be inserted.  This relies on `llvm-dis -c' to print out the keywords.
 //---------------------------------------------------------------------------- 
 
 
@@ -167,7 +167,7 @@ void Cilkifier::DFSVisitInstr(Instruction* I,
       else
         syncI = new CallInst(DummySyncFunc, std::vector<Value*>(), "", I);
 
-      // Remember the sync for each spawn to eliminate rendundant ones later
+      // Remember the sync for each spawn to eliminate redundant ones later
       spawnToSyncsMap[cast<CallInst>(root)].insert(syncI);
 
       return;
@@ -494,7 +494,7 @@ bool Parallelize::run(Module& M)
 
 #undef CAN_USE_BIND1ST_ON_REFERENCE_TYPE_ARGS
 #ifdef CAN_USE_BIND1ST_ON_REFERENCE_TYPE_ARGS
-  // Use this undecipherable STLese because erase invalidates iterators.
+  // Use this indecipherable STLese because erase invalidates iterators.
   // Otherwise we have to copy sets as above.
   hash_set<Function*>::iterator extrasBegin = 
     std::remove_if(parallelFunctions.begin(), parallelFunctions.end(),
index 81d46ca3f44f28f8f1695a5a3d89fba66a4a71da..aa9a8fcafd478b97c39c470753e9b7c557258d76 100644 (file)
@@ -151,9 +151,9 @@ static bool LinkTypes(Module *Dest, const Module *Src, std::string *Err) {
   SymbolTable::const_iterator PI = SrcST->find(Type::TypeTy);
   if (PI == SrcST->end()) return false;  // No named types, do nothing.
 
-  // Some types cannot be resolved immediately becuse they depend on other types
-  // being resolved to each other first.  This contains a list of types we are
-  // waiting to recheck.
+  // Some types cannot be resolved immediately because they depend on other
+  // types being resolved to each other first.  This contains a list of types we
+  // are waiting to recheck.
   std::vector<std::string> DelayedTypesToResolve;
 
   const SymbolTable::VarMap &VM = PI->second;
index 999b6030fbead8b3837445f3e05949a19dc1b6d2..5f496bf2ee73453c5683bd7f2f547d2d00bf22b3 100644 (file)
@@ -132,7 +132,7 @@ bool MappingInfoAsmPrinter::doInitialization(Module &M) {
 /// Function. MachineBasicBlocks are numbered from begin() to end()
 /// in the Function's corresponding MachineFunction. Each successive
 /// MachineBasicBlock increments the numbering by the number of instructions
-/// it contains. The side-effect of this method is to fill in the paramete
+/// it contains. The side-effect of this method is to fill in the parameter
 /// KEY with the mapping of MachineBasicBlocks to numbers. KEY
 /// is keyed on MachineInstrs, so each MachineBasicBlock is represented
 /// therein by its first MachineInstr.
index 70c41e13e411933f2c30e9dba8973b208d784111..819b8627a412ccd95b782e8e26774510802b5f6a 100644 (file)
@@ -366,10 +366,11 @@ void JITResolver::CompilationCallback() {
 
   RestoreRegisters(DoubleFP, FSR, FPRS, CCR);
 
-  // Change the return address to reexecute the restore, then the jump. However,
-  // we can't just modify %i7 here, because we return to the function that will
-  // restore the floating-point registers for us. Thus, we just return the value
-  // we want it to be, and the parent will take care of setting %i7 correctly.
+  // Change the return address to re-execute the restore, then the jump.
+  // However, we can't just modify %i7 here, because we return to the function
+  // that will restore the floating-point registers for us. Thus, we just return
+  // the value we want it to be, and the parent will take care of setting %i7
+  // correctly.
   DEBUG(std::cerr << "Callback returning to: 0x"
                   << std::hex << (CameFrom-Offset-12) << "\n");
 #if defined(sparc) || defined(__sparc__) || defined(__sparcv9)
@@ -482,7 +483,7 @@ SparcV9CodeEmitter::getRealRegNum(unsigned fakeReg,
       // only numbered 0-31, hence can already fit into 5 bits (and 6)
       DEBUG(std::cerr << "FP single reg, returning: " << fakeReg << "\n");
     } else if (regType == UltraSparcRegInfo::FPDoubleRegType) {
-      // FIXME: This assumes that we only have 5-bit register fiels!
+      // FIXME: This assumes that we only have 5-bit register fields!
       // From Sparc Manual, page 40.
       // The bit layout becomes: b[4], b[3], b[2], b[1], b[5]
       fakeReg |= (fakeReg >> 5) & 1;
@@ -624,7 +625,7 @@ int64_t SparcV9CodeEmitter::getMachineOpValue(MachineInstr &MI,
         int64_t CallInstTarget = (rv - CurrPC) >> 2;
         if (CallInstTarget >= (1<<29) || CallInstTarget <= -(1<<29)) {
           DEBUG(std::cerr << "Making far call!\n");
-          // addresss is out of bounds for the 30-bit call,
+          // address is out of bounds for the 30-bit call,
           // make an indirect jump-and-link
           emitFarCall(rv);
           // this invalidates the instruction so that the call with an incorrect
index 8f512640063ac2ba4c72332fbbdaed927ff6882e..6248a833237fd0603ff16aea6af90874a332d489 100644 (file)
@@ -261,7 +261,7 @@ void SparcFloatRegClass::colorIGNode(IGNode * Node,
     return;
   } else { 
 
-    // if we didn't find a color becuase the LR was single precision or
+    // if we didn't find a color because the LR was single precision or
     // all f32-f63 range is filled, we try to allocate a register from
     // the f0 - f31 region 
 
@@ -292,7 +292,7 @@ void SparcFloatRegClass::colorIGNode(IGNode * Node,
   }
 
   if (ColorFound >= 0) {
-    LR->setColor(ColorFound);         // first color found in prefered order
+    LR->setColor(ColorFound);         // first color found in preferred order
     LR->markForSaveAcrossCalls();  
   } else {
     // we are here because no color could be found
index a46af221687a95bc880c48d7fc3f6f70faec1f0b..8dde4e96ca399412f4d095137698528a228f68e5 100644 (file)
@@ -466,7 +466,7 @@ void UltraSparcRegInfo::colorMethodArgs(const Function *Meth,
       }
       else {
 
-       // Now the arg is coming on stack. Since the LR recieved a register,
+       // Now the arg is coming on stack. Since the LR received a register,
        // we just have to load the arg on stack into that register
        //
         const TargetFrameInfo& frameInfo = target.getFrameInfo();
@@ -522,7 +522,7 @@ void UltraSparcRegInfo::colorMethodArgs(const Function *Meth,
       else {
 
        // Now the arg is coming on stack. Since the LR did NOT 
-       // recieved a register as well, it is allocated a stack position. We
+       // received a register as well, it is allocated a stack position. We
        // can simply change the stack position of the LR. We can do this,
        // since this method is called before any other method that makes
        // uses of the stack pos of the LR (e.g., updateMachineInstr)
index f8f483fdafda368d1502ee1f9af424843a915a6c..23d4e17f8e11659831300616d2099c0d0208fb66 100644 (file)
@@ -549,7 +549,7 @@ void FPS::handleTwoArgFP(MachineBasicBlock::iterator &I) {
 
 
 /// handleSpecialFP - Handle special instructions which behave unlike other
-/// floating point instructions.  This is primarily inteaded for use by pseudo
+/// floating point instructions.  This is primarily intended for use by pseudo
 /// instructions.
 ///
 void FPS::handleSpecialFP(MachineBasicBlock::iterator &I) {
index cc57b0ed4e505fc13e18ba582fdfc3bfd1c489c7..9e4e499de9cbc4fd2e3a3db513ba321a4c31e8f8 100644 (file)
@@ -1214,7 +1214,7 @@ void ISel::visitDivRem(BinaryOperator &I) {
     return;
   }
   case cByte: case cShort: case cInt:
-    break;          // Small integerals, handled below...
+    break;          // Small integrals, handled below...
   default: assert(0 && "Unknown class!");
   }
 
index f8f483fdafda368d1502ee1f9af424843a915a6c..23d4e17f8e11659831300616d2099c0d0208fb66 100644 (file)
@@ -549,7 +549,7 @@ void FPS::handleTwoArgFP(MachineBasicBlock::iterator &I) {
 
 
 /// handleSpecialFP - Handle special instructions which behave unlike other
-/// floating point instructions.  This is primarily inteaded for use by pseudo
+/// floating point instructions.  This is primarily intended for use by pseudo
 /// instructions.
 ///
 void FPS::handleSpecialFP(MachineBasicBlock::iterator &I) {
index cc57b0ed4e505fc13e18ba582fdfc3bfd1c489c7..9e4e499de9cbc4fd2e3a3db513ba321a4c31e8f8 100644 (file)
@@ -1214,7 +1214,7 @@ void ISel::visitDivRem(BinaryOperator &I) {
     return;
   }
   case cByte: case cShort: case cInt:
-    break;          // Small integerals, handled below...
+    break;          // Small integrals, handled below...
   default: assert(0 && "Unknown class!");
   }
 
index ac5af10a3b595237034c57c4578908e5b0f41ca3..d076f9a4f7d8834787d3ad4abfd79631c2e7373b 100644 (file)
@@ -104,7 +104,7 @@ static Instruction *ConvertMallocToType(MallocInst *MI, const Type *Ty,
 
   // If we have a scale, apply it first...
   if (Expr.Var) {
-    // Expr.Var is not neccesarily unsigned right now, insert a cast now.
+    // Expr.Var is not necessarily unsigned right now, insert a cast now.
     if (Expr.Var->getType() != Type::UIntTy)
       Expr.Var = new CastInst(Expr.Var, Type::UIntTy,
                               Expr.Var->getName()+"-uint", It);
@@ -255,7 +255,7 @@ bool ExpressionConvertibleToType(Value *V, const Type *Ty,
       // Do not Check to see if our incoming pointer can be converted
       // to be a ptr to an array of the right type... because in more cases than
       // not, it is simply not analyzable because of pointer/array
-      // discrepencies.  To fix this, we will insert a cast before the GEP.
+      // discrepancies.  To fix this, we will insert a cast before the GEP.
       //
 
       // Check to see if 'N' is an expression that can be converted to
@@ -1169,7 +1169,7 @@ static void ConvertOperandToType(User *U, Value *OldVal, Value *NewVal,
         Name = "";  // Make sure not to name a void call!
 
       // Get an iterator to the call instruction so that we can insert casts for
-      // operands if needbe.  Note that we do not require operands to be
+      // operands if need be.  Note that we do not require operands to be
       // convertible, we can insert casts if they are convertible but not
       // compatible.  The reason for this is that we prefer to have resolved
       // functions but casted arguments if possible.
index f8aaf35d82f6d103d0500d0096b6355383567b09..ece26d5faee4650f30cb038ee8c49b5d3eb106c4 100644 (file)
@@ -232,7 +232,7 @@ void DAE::RemoveDeadArgumentsFromFunction(Function *F,
 bool DAE::run(Module &M) {
   // First phase: loop through the module, determining which arguments are live.
   // We assume all arguments are dead unless proven otherwise (allowing us to
-  // determing that dead arguments passed into recursive functions are dead).
+  // determine that dead arguments passed into recursive functions are dead).
   //
   std::set<Argument*> LiveArguments, MaybeLiveArguments, DeadArguments;
   std::multimap<Function*, CallSite> CallSites;
index f16c3f325304e020373ced5f2496e3cef8882163..51c4e00987e1ab6277812ce2f94f701f2f4ec9e8 100644 (file)
@@ -15,7 +15,7 @@ namespace {
         if (Named == 0) return false;  // No function to extract
       }
 
-      // Make sure our result is globally accessable...
+      // Make sure our result is globally accessible...
       Named->setLinkage(GlobalValue::ExternalLinkage);
 
       // Mark all global variables internal
index 5e72d8a2e64d1cc9745b80db084c459e9a4be68e..b2299c3ecfa64a93588b60fb79b7e59bd51158b6 100644 (file)
@@ -52,7 +52,7 @@ int SimpleInliner::getInlineCost(CallSite CS) {
   if (Callee->use_size() == 1 && Callee->hasInternalLinkage())
     InlineCost -= 30000;
 
-  // Add to the inline quality for properties that make the call valueable to
+  // Add to the inline quality for properties that make the call valuable to
   // inline.  This includes factors that indicate that the result of inlining
   // the function will be optimizable.  Currently this just looks at arguments
   // passed into the function.
index 2ea6938be25647638f8b8ae30955b4fe3dfaadf2..f10bccef9dffd40914163ab0f0270f12b9adba7e 100644 (file)
@@ -93,7 +93,7 @@ const Type *MutateStructTypes::ConvertType(const Type *Ty) {
 }
 
 
-// AdjustIndices - Convert the indexes specifed by Idx to the new changed form
+// AdjustIndices - Convert the indices specified by Idx to the new changed form
 // using the specified OldTy as the base type being indexed into.
 //
 void MutateStructTypes::AdjustIndices(const CompositeType *OldTy,
index e533c4ea5ee514e3a50561ddb88991c4af57d33f..09b7dc21cdff43783bf4fe1930343c76bd4d93a2 100644 (file)
@@ -81,7 +81,7 @@ static bool isSync(const CallInst& CI) {
 // class Cilkifier
 //
 // Code generation pass that transforms code to identify where Cilk keywords
-// should be inserted.  This relies on dis -c to print out the keywords.
+// should be inserted.  This relies on `llvm-dis -c' to print out the keywords.
 //---------------------------------------------------------------------------- 
 
 
@@ -167,7 +167,7 @@ void Cilkifier::DFSVisitInstr(Instruction* I,
       else
         syncI = new CallInst(DummySyncFunc, std::vector<Value*>(), "", I);
 
-      // Remember the sync for each spawn to eliminate rendundant ones later
+      // Remember the sync for each spawn to eliminate redundant ones later
       spawnToSyncsMap[cast<CallInst>(root)].insert(syncI);
 
       return;
@@ -494,7 +494,7 @@ bool Parallelize::run(Module& M)
 
 #undef CAN_USE_BIND1ST_ON_REFERENCE_TYPE_ARGS
 #ifdef CAN_USE_BIND1ST_ON_REFERENCE_TYPE_ARGS
-  // Use this undecipherable STLese because erase invalidates iterators.
+  // Use this indecipherable STLese because erase invalidates iterators.
   // Otherwise we have to copy sets as above.
   hash_set<Function*>::iterator extrasBegin = 
     std::remove_if(parallelFunctions.begin(), parallelFunctions.end(),
index 4f46e5b45c072cf5bb80e1e693c3bfc62bfd0708..8571dc819d7b64241ecf8e020d6ac5f5c0da3b75 100644 (file)
@@ -174,7 +174,7 @@ void Graph::addNode(Node *nd){
 
 //add an edge
 //this adds an edge ONLY when 
-//the edge to be added doesn not already exist
+//the edge to be added does not already exist
 //we "equate" two edges here only with their 
 //end points
 void Graph::addEdge(Edge ed, int w){
@@ -497,7 +497,7 @@ void Graph::makeUnDirectional(){
 
 //reverse the sign of weights on edges
 //this way, max-spanning tree could be obtained
-//usin min-spanning tree, and vice versa
+//using min-spanning tree, and vice versa
 void Graph::reverseWts(){
   vector<Node *> allNodes=getAllNodes();
   for(vector<Node *>::iterator NI=allNodes.begin(), NE=allNodes.end(); NI!=NE; 
index 10b55ce63e3ba3a5f410bf24147c6b47832b46b6..4e7c5847a68eec3b3e4357f21243657b17caf265 100644 (file)
@@ -1,6 +1,6 @@
-//===-- GrapAuxillary.cpp- Auxillary functions on graph ----------*- C++ -*--=//
+//===-- GrapAuxiliary.cpp- Auxiliary functions on graph ----------*- C++ -*--=//
 //
-//auxillary function associated with graph: they
+//auxiliary function associated with graph: they
 //all operate on graph, and help in inserting
 //instrumentation for trace generation
 //
@@ -132,7 +132,7 @@ int valueAssignmentToEdges(Graph& g,  map<Node *, int> nodePriority,
 }
 
 //This is a helper function to get the edge increments
-//This is used in conjuntion with inc_DFS
+//This is used in conjunction with inc_DFS
 //to get the edge increments
 //Edge increment implies assigning a value to all the edges in the graph
 //such that if we traverse along any path from root to exit, and
@@ -144,7 +144,7 @@ static int inc_Dir(Edge e, Edge f){
  if(e.isNull()) 
     return 1;
  
- //check that the edges must have atleast one common endpoint
+ //check that the edges must have at least one common endpoint
   assert(*(e.getFirst())==*(f.getFirst()) ||
         *(e.getFirst())==*(f.getSecond()) || 
         *(e.getSecond())==*(f.getFirst()) ||
index 962996247ceea7ea227e276afc82a156af54d223..9401afec0d0dc0560e0cb82446cd61a1a67fa4e4 100644 (file)
@@ -1,6 +1,6 @@
 //===-- ProfilePaths.cpp - interface to insert instrumentation ---*- C++ -*--=//
 //
-// This inserts intrumentation for counting
+// This inserts instrumentation for counting
 // execution of paths though a given function
 // Its implemented as a "Function" Pass, and called using opt
 //
@@ -13,7 +13,7 @@
 //
 // The algorithms work on a Graph constructed over the nodes
 // made from Basic Blocks: The transformations then take place on
-// the constucted graph (implementation in Graph.cpp and GraphAuxillary.cpp)
+// the constructed graph (implementation in Graph.cpp and GraphAuxiliary.cpp)
 // and finally, appropriate instrumentation is placed over suitable edges.
 // (code inserted through EdgeCode.cpp).
 // 
@@ -81,7 +81,7 @@ bool ProfilePaths::runOnFunction(Function &F){
   Node *tmp;
   Node *exitNode = 0, *startNode = 0;
 
-  // The nodes must be uniquesly identified:
+  // The nodes must be uniquely identified:
   // That is, no two nodes must hav same BB*
   
   for (Function::iterator BB = F.begin(), BE = F.end(); BB != BE; ++BB) {
@@ -93,7 +93,7 @@ bool ProfilePaths::runOnFunction(Function &F){
       startNode=nd;
   }
 
-  // now do it againto insert edges
+  // now do it again to insert edges
   for (Function::iterator BB = F.begin(), BE = F.end(); BB != BE; ++BB){
     Node *nd=findBB(nodes, BB);
     assert(nd && "No node for this edge!");
@@ -174,7 +174,7 @@ bool ProfilePaths::runOnFunction(Function &F){
 
 
   if(fr->getParent()->getName() == "main"){
-    //intialize threshold
+    //initialize threshold
 
     // FIXME: THIS IS HORRIBLY BROKEN.  FUNCTION PASSES CANNOT DO THIS, EXCEPT
     // IN THEIR INITIALIZE METHOD!!
index 8d71605406095aecbb8223afafd87c19c6bc0c20..3e11241f19f3ae453e22e98326e5fd596330df2d 100644 (file)
@@ -259,7 +259,7 @@ bool ADCE::doADCE() {
       // Loop over all of the instructions in the function, telling dead
       // instructions to drop their references.  This is so that the next sweep
       // over the program can safely delete dead instructions without other dead
-      // instructions still refering to them.
+      // instructions still referring to them.
       //
       dropReferencesOfDeadInstructionsInLiveBlock(I);
 
@@ -328,9 +328,9 @@ bool ADCE::doADCE() {
             if (LastNode == 0) {        // No postdominator!
               // Call RemoveSuccessor to transmogrify the terminator instruction
               // to not contain the outgoing branch, or to create a new
-              // terminator if the form fundementally changes (ie unconditional
-              // branch to return).  Note that this will change a branch into an
-              // infinite loop into a return instruction!
+              // terminator if the form fundamentally changes (i.e.,
+              // unconditional branch to return).  Note that this will change a
+              // branch into an infinite loop into a return instruction!
               //
               RemoveSuccessor(TI, i);
 
@@ -378,7 +378,7 @@ bool ADCE::doADCE() {
         // Now loop over all of the instructions in the basic block, telling
         // dead instructions to drop their references.  This is so that the next
         // sweep over the program can safely delete dead instructions without
-        // other dead instructions still refering to them.
+        // other dead instructions still referring to them.
         //
         dropReferencesOfDeadInstructionsInLiveBlock(BB);
       }
index 6003c81278d873e53fee8b962f137664f4cab29e..59b8b0f28c8237bec8054762756aa61393568453 100644 (file)
@@ -121,7 +121,7 @@ namespace {
     void setReplacement(Value *Repl) { Replacement = Repl; }
 
     // getRelation - return the relationship entry for the specified value.
-    // This can invalidate references to other Relation's, so use it carefully.
+    // This can invalidate references to other Relations, so use it carefully.
     //
     Relation &getRelation(Value *V) {
       // Binary search for V's entry...
@@ -896,7 +896,7 @@ void CEE::PropagateRelation(Instruction::BinaryOps Opcode, Value *Op0,
     return;
   }
 
-  // If the information propogted is new, then we want process the uses of this
+  // If the information propagated is new, then we want process the uses of this
   // instruction to propagate the information down to them.
   //
   if (Op1R.incorporate(Opcode, VI))
index 6883818dbc0996507c9d3fb3d24e2fb33cb83fff..9e1c44080adea470ea233697aad37f8f723a4874 100644 (file)
@@ -193,7 +193,7 @@ Instruction *GCSE::EliminateCSE(Instruction *I, Instruction *Other) {
   Instruction *Ret = 0;
 
   if (BB1 == BB2) {
-    // Eliminate the second occuring instruction.  Add all uses of the second
+    // Eliminate the second occurring instruction.  Add all uses of the second
     // instruction to the worklist.
     //
     // Scan the basic block looking for the "first" instruction
@@ -242,7 +242,7 @@ Instruction *GCSE::EliminateCSE(Instruction *I, Instruction *Other) {
     //    ... X+Y ...
     //  }
     // 
-    // In thiscase, the expression would be hoisted to outside the 'if' stmt,
+    // In this case, the expression would be hoisted to outside the 'if' stmt,
     // causing the expression to be evaluated, even for the if (d) path, which
     // could cause problems, if, for example, it caused a divide by zero.  In
     // general the problem this case is trying to solve is better addressed with
index 33c8c700e609457956ebe68454552606d90726d4..51be904931e7530857727302a998396beec092c1 100644 (file)
@@ -50,7 +50,7 @@ static bool TransformLoop(LoopInfo *Loops, Loop *Loop) {
   BasicBlock::iterator AfterPHIIt = Header->begin();
   for (; PHINode *PN = dyn_cast<PHINode>(AfterPHIIt); ++AfterPHIIt)
     IndVars.push_back(InductionVariable(PN, Loops));
-  // AfterPHIIt now points to first nonphi instruction...
+  // AfterPHIIt now points to first non-phi instruction...
 
   // If there are no phi nodes in this basic block, there can't be indvars...
   if (IndVars.empty()) return Changed;
index eb7a64d765e39464255341d418192e5a03474763..a794761a4efefd80c5f84b0702eaa47888f200d7 100644 (file)
@@ -77,7 +77,7 @@ namespace {
     /// HoistRegion - Walk the specified region of the CFG (defined by all
     /// blocks dominated by the specified block, and that are in the current
     /// loop) in depth first order w.r.t the DominatorTree.  This allows us to
-    /// visit defintions before uses, allowing us to hoist a loop body in one
+    /// visit definitions before uses, allowing us to hoist a loop body in one
     /// pass without iteration.
     ///
     void HoistRegion(DominatorTree::Node *N);
@@ -240,7 +240,7 @@ void LICM::visitLoop(Loop *L, AliasSetTracker &AST) {
 
 /// HoistRegion - Walk the specified region of the CFG (defined by all blocks
 /// dominated by the specified block, and that are in the current loop) in depth
-/// first order w.r.t the DominatorTree.  This allows us to visit defintions
+/// first order w.r.t the DominatorTree.  This allows us to visit definitions
 /// before uses, allowing us to hoist a loop body in one pass without iteration.
 ///
 void LICM::HoistRegion(DominatorTree::Node *N) {
index 21eaf23bd71b19cbd035f87c5da0daee6dbc3984..d555df788a115d313723677e6c4a615bda60bda4 100644 (file)
@@ -1,7 +1,7 @@
 //===- PiNodeInsertion.cpp - Insert Pi nodes into a program ---------------===//
 //
 // PiNodeInsertion - This pass inserts single entry Phi nodes into basic blocks
-// that are preceeded by a conditional branch, where the branch gives
+// that are preceded by a conditional branch, where the branch gives
 // information about the operands of the condition.  For example, this C code:
 //   if (x == 0) { ... = x + 4;
 // becomes:
@@ -15,7 +15,7 @@
 // saying that X has a value of 0 in this scope.  The power of this analysis
 // information is that "in the scope" translates to "for all uses of x2".
 //
-// This special form of Phi node is refered to as a Pi node, following the
+// This special form of Phi node is referred to as a Pi node, following the
 // terminology defined in the "Array Bounds Checks on Demand" paper.
 //
 // As a really trivial example of what the Pi nodes are good for, this pass
index 3effa66eefef774ccbe2e0cde04db8b6298f360d..9134bf81b1d5947d398d5934d72d6b63fc1e0516 100644 (file)
@@ -499,7 +499,7 @@ void SCCP::visitPHINode(PHINode &PN) {
   // this is the case, the PHI remains undefined.
   //
   if (OperandVal)
-    markConstant(PNIV, &PN, OperandVal);      // Aquire operand value
+    markConstant(PNIV, &PN, OperandVal);      // Acquire operand value
 }
 
 void SCCP::visitTerminatorInst(TerminatorInst &TI) {
index c8e5ecc5f2b76ffaa39c2c4267d2122763988393..0e143cd8c2e7131f55871077b56654e21c9e5da6 100644 (file)
@@ -64,7 +64,7 @@ const Type *getStructOffsetType(const Type *Ty, unsigned &Offset,
     Indices.push_back(ConstantSInt::get(Type::LongTy, Offset/ChildSize));
     ThisOffset = (Offset/ChildSize)*ChildSize;
   } else {
-    Offset = 0;   // Return the offset that we were able to acheive
+    Offset = 0;   // Return the offset that we were able to achieve
     return Ty;    // Return the leaf type
   }
 
index 0f0f14aebab3e8b181120dd01e794e30dbff7d7e..d5f7f1f03eb69c86921f40246ab6b8d968bff482 100644 (file)
@@ -64,7 +64,7 @@ void ReplaceInstWithInst(Instruction *From, Instruction *To) {
 // degree of the current basic block, the actual terminator instruction itself
 // may have to be changed.  In the case where the last successor of the block is
 // deleted, a return instruction is inserted in its place which can cause a
-// suprising change in program behavior if it is not expected.
+// surprising change in program behavior if it is not expected.
 //
 void RemoveSuccessor(TerminatorInst *TI, unsigned SuccNum) {
   assert(SuccNum < TI->getNumSuccessors() &&
index a87dbce2a0919ba2ea47bafec20f002d0cbb309c..e37b307de8b0c6a815270481adf5ff5c1b99541d 100644 (file)
@@ -106,7 +106,7 @@ void SplitCriticalEdge(TerminatorInst *TI, unsigned SuccNum, Pass *P) {
     DS->addBasicBlock(NewBB, DomSet);
   }
 
-  // Should we update ImmdediateDominator information?
+  // Should we update ImmediateDominator information?
   if (ImmediateDominators *ID = P->getAnalysisToUpdate<ImmediateDominators>()) {
     // TIBB is the new immediate dominator for NewBB.  NewBB doesn't dominate
     // anything.
index 93bed7583977c9af4f030a95bf4368fcd630bf7c..2a7d1ed586e21e1d5abf0edb611a942356abf3e7 100644 (file)
@@ -14,7 +14,7 @@
 
 /// CloneModule - Return an exact copy of the specified module.  This is not as
 /// easy as it might seem because we have to worry about making copies of global
-/// variables and functions, and making their (intializers and references,
+/// variables and functions, and making their (initializers and references,
 /// respectively) refer to the right globals.
 ///
 Module *CloneModule(const Module *M) {
index 81d46ca3f44f28f8f1695a5a3d89fba66a4a71da..aa9a8fcafd478b97c39c470753e9b7c557258d76 100644 (file)
@@ -151,9 +151,9 @@ static bool LinkTypes(Module *Dest, const Module *Src, std::string *Err) {
   SymbolTable::const_iterator PI = SrcST->find(Type::TypeTy);
   if (PI == SrcST->end()) return false;  // No named types, do nothing.
 
-  // Some types cannot be resolved immediately becuse they depend on other types
-  // being resolved to each other first.  This contains a list of types we are
-  // waiting to recheck.
+  // Some types cannot be resolved immediately because they depend on other
+  // types being resolved to each other first.  This contains a list of types we
+  // are waiting to recheck.
   std::vector<std::string> DelayedTypesToResolve;
 
   const SymbolTable::VarMap &VM = PI->second;
index 56b63f35cc37d2bf28c526bf61564869fd4a1c0e..3c77b01a86a197e7b278f7541f5278b4b4372e0d 100644 (file)
@@ -13,7 +13,7 @@
 // as store-sinking that are built into LICM.
 //
 // Note that the simplifycfg pass will clean up blocks which are split out but
-// end up being unnecessary, so usage of this pass does not neccesarily
+// end up being unnecessary, so usage of this pass does not necessarily
 // pessimize generated code.
 //
 //===----------------------------------------------------------------------===//
@@ -203,7 +203,7 @@ void Preheaders::InsertPreheaderForLoop(Loop *L) {
     SplitBlockPredecessors(Header, ".preheader", OutsideBlocks);
   
   //===--------------------------------------------------------------------===//
-  //  Update analysis results now that we have preformed the transformation
+  //  Update analysis results now that we have performed the transformation
   //
   
   // We know that we have loop information to update... update it now.
index 1d5e4ec8afb683ce4f1c20dc65a52c2873fd6b86..305fbd85a26abca7efda9a33b5398d93a9df252f 100644 (file)
@@ -19,7 +19,7 @@
 // have extra slots added to them to hold the merge edges from BB's
 // predecessors, and BB itself might have had PHI nodes in it.  This function
 // returns true (failure) if the Succ BB already has a predecessor that is a
-// predecessor of BB and incoming PHI arguments would not be discernable.
+// predecessor of BB and incoming PHI arguments would not be discernible.
 //
 // Assumption: Succ is the single successor for BB.
 //
@@ -269,10 +269,10 @@ bool SimplifyCFG(BasicBlock *BB) {
       // Delete the unconditional branch from the predecessor...
       OnlyPred->getInstList().pop_back();
       
-      // Move all definitions in the succecessor to the predecessor...
+      // Move all definitions in the successor to the predecessor...
       OnlyPred->getInstList().splice(OnlyPred->end(), BB->getInstList());
                                      
-      // Make all PHI nodes that refered to BB now refer to Pred as their
+      // Make all PHI nodes that referred to BB now refer to Pred as their
       // source...
       BB->replaceAllUsesWith(OnlyPred);
 
index 81d46ca3f44f28f8f1695a5a3d89fba66a4a71da..aa9a8fcafd478b97c39c470753e9b7c557258d76 100644 (file)
@@ -151,9 +151,9 @@ static bool LinkTypes(Module *Dest, const Module *Src, std::string *Err) {
   SymbolTable::const_iterator PI = SrcST->find(Type::TypeTy);
   if (PI == SrcST->end()) return false;  // No named types, do nothing.
 
-  // Some types cannot be resolved immediately becuse they depend on other types
-  // being resolved to each other first.  This contains a list of types we are
-  // waiting to recheck.
+  // Some types cannot be resolved immediately because they depend on other
+  // types being resolved to each other first.  This contains a list of types we
+  // are waiting to recheck.
   std::vector<std::string> DelayedTypesToResolve;
 
   const SymbolTable::VarMap &VM = PI->second;
index b6ebb2292e87f56a2c911d69e7bd31d33ea0e8ac..b521f1464c6015a0648abc492e35aa1d5f2a6ded 100644 (file)
@@ -36,7 +36,7 @@ void *__llvm_cxxeh_allocate_exception(unsigned NumBytes) throw() {
   //
   llvm_cxx_exception *E =
     (llvm_cxx_exception *)malloc(NumBytes+sizeof(llvm_cxx_exception));
-  E->BaseException.ExceptionType = 0; // intialize to invalid
+  E->BaseException.ExceptionType = 0; // initialize to invalid
 
   return E+1;   // return the pointer after the header
 }
index 84d4d40014ed35b74f052c09deaeef67a70b1673..b34d8805657880947302ca7139c9e15837334b15 100644 (file)
@@ -91,7 +91,7 @@ public:
 };
 
 bool ReduceCrashingFunctions::TestFuncs(std::vector<Function*> &Funcs) {
-  // Clone the program to try hacking it appart...
+  // Clone the program to try hacking it apart...
   Module *M = CloneModule(BD.Program);
   
   // Convert list to set for fast lookup...
@@ -153,7 +153,7 @@ public:
 };
 
 bool ReduceCrashingBlocks::TestBlocks(std::vector<BasicBlock*> &BBs) {
-  // Clone the program to try hacking it appart...
+  // Clone the program to try hacking it apart...
   Module *M = CloneModule(BD.Program);
   
   // Convert list to set for fast lookup...
index fe9112e34cb27b76e4f901e9cb2b293a4548bbc8..6aa23e81d4a10033ff50b34f90014a164878f624 100644 (file)
@@ -1,8 +1,8 @@
 //===- OptimizerDriver.cpp - Allow BugPoint to run passes safely ----------===//
 //
 // This file defines an interface that allows bugpoint to run various passes
-// without the threat of a buggy pass corrupting bugpoint (of course bugpoint
-// may have it's own bugs, but that's another story...).  It acheives this by
+// without the threat of a buggy pass corrupting bugpoint (of course, bugpoint
+// may have its own bugs, but that's another story...).  It achieves this by
 // forking a copy of itself and having the child process do the optimizations.
 // If this client dies, we can always fork a new one.  :)
 //
@@ -95,7 +95,7 @@ static void RunChild(Module *Program,const std::vector<const PassInfo*> &Passes,
 }
 
 /// runPasses - Run the specified passes on Program, outputting a bytecode file
-/// and writting the filename into OutputFile if successful.  If the
+/// and writing the filename into OutputFile if successful.  If the
 /// optimizations fail for some reason (optimizer crashes), return true,
 /// otherwise return false.  If DeleteOutput is set to true, the bytecode is
 /// deleted on success, and the filename string is undefined.  This prints to
index 116cf0b11ad949d722b5f5b26b2c42acfd556432..cd4cce064ac62a653a45f5a4e58b13d0235b3b0b 100644 (file)
@@ -215,7 +215,8 @@ int main(int argc, char **argv, char **envp) {
   // We always look first in the current directory when searching for libraries.
   LibPaths.insert(LibPaths.begin(), ".");
 
-  // If the user specied an extra search path in their environment, respect it.
+  // If the user specified an extra search path in their environment, respect
+  // it.
   if (char *SearchPath = getenv("LLVM_LIB_SEARCH_PATH"))
     LibPaths.push_back(SearchPath);
 
index 7634a1a9e0ab3e12e32e03a695d7dc054c90e93c..c1ec7ecafe20529005bf18c50bf6319c6bf0693b 100644 (file)
@@ -90,7 +90,7 @@ static inline bool Error(std::string *ErrorStr, const char *Message) {
 // 1) Generate the header for the symbol table. This is a normal
 //    archive member header, but it has a zero length name.
 // 2) For each archive member file, stat the file and parse the bytecode
-//    Store cummulative offset (file size + header size).
+//    Store cumulative offset (file size + header size).
 // 3) Loop over all the symbols for the current member file, 
 //    add offset entry to offset vector, and add symbol name to its vector.
 //    Note: The symbol name vector is a vector of chars to speed up calculating
@@ -206,7 +206,7 @@ bool WriteSymbolTable(std::ofstream &ArchiveFile) {
   //Adjustment to offset to start files on even byte boundaries
   unsigned adjust = 0;
   
-  //Update offsets write symbol tabel to archive.
+  //Update offsets write symbol table to archive.
   for(unsigned i=0; i<offsets.size(); ++i) {
     char output[4];
     offsets[i] = offsets[i] + symbolTableSize + SARMAG;