diff --git a/lib/Analysis/DataStructure/Parallelize.cpp b/lib/Analysis/DataStructure/Parallelize.cpp index e533c4ea5ee..09b7dc21cdf 100644 --- a/lib/Analysis/DataStructure/Parallelize.cpp +++ b/lib/Analysis/DataStructure/Parallelize.cpp @@ -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(), "", 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(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::iterator extrasBegin = std::remove_if(parallelFunctions.begin(), parallelFunctions.end(), diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp index 81d46ca3f44..aa9a8fcafd4 100644 --- a/lib/Linker/LinkModules.cpp +++ b/lib/Linker/LinkModules.cpp @@ -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 DelayedTypesToResolve; const SymbolTable::VarMap &VM = PI->second; diff --git a/lib/Target/SparcV9/MappingInfo.cpp b/lib/Target/SparcV9/MappingInfo.cpp index 999b6030fbe..5f496bf2ee7 100644 --- a/lib/Target/SparcV9/MappingInfo.cpp +++ b/lib/Target/SparcV9/MappingInfo.cpp @@ -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. diff --git a/lib/Target/SparcV9/SparcV9CodeEmitter.cpp b/lib/Target/SparcV9/SparcV9CodeEmitter.cpp index 70c41e13e41..819b8627a41 100644 --- a/lib/Target/SparcV9/SparcV9CodeEmitter.cpp +++ b/lib/Target/SparcV9/SparcV9CodeEmitter.cpp @@ -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 diff --git a/lib/Target/SparcV9/SparcV9RegClassInfo.cpp b/lib/Target/SparcV9/SparcV9RegClassInfo.cpp index 8f512640063..6248a833237 100644 --- a/lib/Target/SparcV9/SparcV9RegClassInfo.cpp +++ b/lib/Target/SparcV9/SparcV9RegClassInfo.cpp @@ -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 diff --git a/lib/Target/SparcV9/SparcV9RegInfo.cpp b/lib/Target/SparcV9/SparcV9RegInfo.cpp index a46af221687..8dde4e96ca3 100644 --- a/lib/Target/SparcV9/SparcV9RegInfo.cpp +++ b/lib/Target/SparcV9/SparcV9RegInfo.cpp @@ -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) diff --git a/lib/Target/X86/FloatingPoint.cpp b/lib/Target/X86/FloatingPoint.cpp index f8f483fdafd..23d4e17f8e1 100644 --- a/lib/Target/X86/FloatingPoint.cpp +++ b/lib/Target/X86/FloatingPoint.cpp @@ -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) { diff --git a/lib/Target/X86/InstSelectSimple.cpp b/lib/Target/X86/InstSelectSimple.cpp index cc57b0ed4e5..9e4e499de9c 100644 --- a/lib/Target/X86/InstSelectSimple.cpp +++ b/lib/Target/X86/InstSelectSimple.cpp @@ -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!"); } diff --git a/lib/Target/X86/X86FloatingPoint.cpp b/lib/Target/X86/X86FloatingPoint.cpp index f8f483fdafd..23d4e17f8e1 100644 --- a/lib/Target/X86/X86FloatingPoint.cpp +++ b/lib/Target/X86/X86FloatingPoint.cpp @@ -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) { diff --git a/lib/Target/X86/X86ISelSimple.cpp b/lib/Target/X86/X86ISelSimple.cpp index cc57b0ed4e5..9e4e499de9c 100644 --- a/lib/Target/X86/X86ISelSimple.cpp +++ b/lib/Target/X86/X86ISelSimple.cpp @@ -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!"); } diff --git a/lib/Transforms/ExprTypeConvert.cpp b/lib/Transforms/ExprTypeConvert.cpp index ac5af10a3b5..d076f9a4f7d 100644 --- a/lib/Transforms/ExprTypeConvert.cpp +++ b/lib/Transforms/ExprTypeConvert.cpp @@ -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. diff --git a/lib/Transforms/IPO/DeadArgumentElimination.cpp b/lib/Transforms/IPO/DeadArgumentElimination.cpp index f8aaf35d82f..ece26d5faee 100644 --- a/lib/Transforms/IPO/DeadArgumentElimination.cpp +++ b/lib/Transforms/IPO/DeadArgumentElimination.cpp @@ -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 LiveArguments, MaybeLiveArguments, DeadArguments; std::multimap CallSites; diff --git a/lib/Transforms/IPO/ExtractFunction.cpp b/lib/Transforms/IPO/ExtractFunction.cpp index f16c3f32530..51c4e00987e 100644 --- a/lib/Transforms/IPO/ExtractFunction.cpp +++ b/lib/Transforms/IPO/ExtractFunction.cpp @@ -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 diff --git a/lib/Transforms/IPO/InlineSimple.cpp b/lib/Transforms/IPO/InlineSimple.cpp index 5e72d8a2e64..b2299c3ecfa 100644 --- a/lib/Transforms/IPO/InlineSimple.cpp +++ b/lib/Transforms/IPO/InlineSimple.cpp @@ -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. diff --git a/lib/Transforms/IPO/MutateStructTypes.cpp b/lib/Transforms/IPO/MutateStructTypes.cpp index 2ea6938be25..f10bccef9df 100644 --- a/lib/Transforms/IPO/MutateStructTypes.cpp +++ b/lib/Transforms/IPO/MutateStructTypes.cpp @@ -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, diff --git a/lib/Transforms/IPO/Parallelize.cpp b/lib/Transforms/IPO/Parallelize.cpp index e533c4ea5ee..09b7dc21cdf 100644 --- a/lib/Transforms/IPO/Parallelize.cpp +++ b/lib/Transforms/IPO/Parallelize.cpp @@ -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(), "", 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(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::iterator extrasBegin = std::remove_if(parallelFunctions.begin(), parallelFunctions.end(), diff --git a/lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp b/lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp index 4f46e5b45c0..8571dc819d7 100644 --- a/lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp +++ b/lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp @@ -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 allNodes=getAllNodes(); for(vector::iterator NI=allNodes.begin(), NE=allNodes.end(); NI!=NE; diff --git a/lib/Transforms/Instrumentation/ProfilePaths/GraphAuxiliary.cpp b/lib/Transforms/Instrumentation/ProfilePaths/GraphAuxiliary.cpp index 10b55ce63e3..4e7c5847a68 100644 --- a/lib/Transforms/Instrumentation/ProfilePaths/GraphAuxiliary.cpp +++ b/lib/Transforms/Instrumentation/ProfilePaths/GraphAuxiliary.cpp @@ -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 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()) || diff --git a/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp b/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp index 962996247ce..9401afec0d0 100644 --- a/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp +++ b/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp @@ -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!! diff --git a/lib/Transforms/Scalar/ADCE.cpp b/lib/Transforms/Scalar/ADCE.cpp index 8d716054060..3e11241f19f 100644 --- a/lib/Transforms/Scalar/ADCE.cpp +++ b/lib/Transforms/Scalar/ADCE.cpp @@ -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); } diff --git a/lib/Transforms/Scalar/CorrelatedExprs.cpp b/lib/Transforms/Scalar/CorrelatedExprs.cpp index 6003c81278d..59b8b0f28c8 100644 --- a/lib/Transforms/Scalar/CorrelatedExprs.cpp +++ b/lib/Transforms/Scalar/CorrelatedExprs.cpp @@ -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)) diff --git a/lib/Transforms/Scalar/GCSE.cpp b/lib/Transforms/Scalar/GCSE.cpp index 6883818dbc0..9e1c44080ad 100644 --- a/lib/Transforms/Scalar/GCSE.cpp +++ b/lib/Transforms/Scalar/GCSE.cpp @@ -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 diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp index 33c8c700e60..51be904931e 100644 --- a/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/lib/Transforms/Scalar/IndVarSimplify.cpp @@ -50,7 +50,7 @@ static bool TransformLoop(LoopInfo *Loops, Loop *Loop) { BasicBlock::iterator AfterPHIIt = Header->begin(); for (; PHINode *PN = dyn_cast(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; diff --git a/lib/Transforms/Scalar/LICM.cpp b/lib/Transforms/Scalar/LICM.cpp index eb7a64d765e..a794761a4ef 100644 --- a/lib/Transforms/Scalar/LICM.cpp +++ b/lib/Transforms/Scalar/LICM.cpp @@ -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) { diff --git a/lib/Transforms/Scalar/PiNodeInsertion.cpp b/lib/Transforms/Scalar/PiNodeInsertion.cpp index 21eaf23bd71..d555df788a1 100644 --- a/lib/Transforms/Scalar/PiNodeInsertion.cpp +++ b/lib/Transforms/Scalar/PiNodeInsertion.cpp @@ -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 diff --git a/lib/Transforms/Scalar/SCCP.cpp b/lib/Transforms/Scalar/SCCP.cpp index 3effa66eefe..9134bf81b1d 100644 --- a/lib/Transforms/Scalar/SCCP.cpp +++ b/lib/Transforms/Scalar/SCCP.cpp @@ -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) { diff --git a/lib/Transforms/TransformInternals.cpp b/lib/Transforms/TransformInternals.cpp index c8e5ecc5f2b..0e143cd8c2e 100644 --- a/lib/Transforms/TransformInternals.cpp +++ b/lib/Transforms/TransformInternals.cpp @@ -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 } diff --git a/lib/Transforms/Utils/BasicBlockUtils.cpp b/lib/Transforms/Utils/BasicBlockUtils.cpp index 0f0f14aebab..d5f7f1f03eb 100644 --- a/lib/Transforms/Utils/BasicBlockUtils.cpp +++ b/lib/Transforms/Utils/BasicBlockUtils.cpp @@ -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() && diff --git a/lib/Transforms/Utils/BreakCriticalEdges.cpp b/lib/Transforms/Utils/BreakCriticalEdges.cpp index a87dbce2a09..e37b307de8b 100644 --- a/lib/Transforms/Utils/BreakCriticalEdges.cpp +++ b/lib/Transforms/Utils/BreakCriticalEdges.cpp @@ -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()) { // TIBB is the new immediate dominator for NewBB. NewBB doesn't dominate // anything. diff --git a/lib/Transforms/Utils/CloneModule.cpp b/lib/Transforms/Utils/CloneModule.cpp index 93bed758397..2a7d1ed586e 100644 --- a/lib/Transforms/Utils/CloneModule.cpp +++ b/lib/Transforms/Utils/CloneModule.cpp @@ -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) { diff --git a/lib/Transforms/Utils/Linker.cpp b/lib/Transforms/Utils/Linker.cpp index 81d46ca3f44..aa9a8fcafd4 100644 --- a/lib/Transforms/Utils/Linker.cpp +++ b/lib/Transforms/Utils/Linker.cpp @@ -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 DelayedTypesToResolve; const SymbolTable::VarMap &VM = PI->second; diff --git a/lib/Transforms/Utils/LoopSimplify.cpp b/lib/Transforms/Utils/LoopSimplify.cpp index 56b63f35cc3..3c77b01a86a 100644 --- a/lib/Transforms/Utils/LoopSimplify.cpp +++ b/lib/Transforms/Utils/LoopSimplify.cpp @@ -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. diff --git a/lib/Transforms/Utils/SimplifyCFG.cpp b/lib/Transforms/Utils/SimplifyCFG.cpp index 1d5e4ec8afb..305fbd85a26 100644 --- a/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/lib/Transforms/Utils/SimplifyCFG.cpp @@ -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); diff --git a/lib/VMCore/Linker.cpp b/lib/VMCore/Linker.cpp index 81d46ca3f44..aa9a8fcafd4 100644 --- a/lib/VMCore/Linker.cpp +++ b/lib/VMCore/Linker.cpp @@ -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 DelayedTypesToResolve; const SymbolTable::VarMap &VM = PI->second; diff --git a/runtime/GCCLibraries/crtend/C++-Exception.cpp b/runtime/GCCLibraries/crtend/C++-Exception.cpp index b6ebb2292e8..b521f1464c6 100644 --- a/runtime/GCCLibraries/crtend/C++-Exception.cpp +++ b/runtime/GCCLibraries/crtend/C++-Exception.cpp @@ -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 } diff --git a/tools/bugpoint/CrashDebugger.cpp b/tools/bugpoint/CrashDebugger.cpp index 84d4d40014e..b34d8805657 100644 --- a/tools/bugpoint/CrashDebugger.cpp +++ b/tools/bugpoint/CrashDebugger.cpp @@ -91,7 +91,7 @@ public: }; bool ReduceCrashingFunctions::TestFuncs(std::vector &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 &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... diff --git a/tools/bugpoint/OptimizerDriver.cpp b/tools/bugpoint/OptimizerDriver.cpp index fe9112e34cb..6aa23e81d4a 100644 --- a/tools/bugpoint/OptimizerDriver.cpp +++ b/tools/bugpoint/OptimizerDriver.cpp @@ -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 &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 diff --git a/tools/gccld/gccld.cpp b/tools/gccld/gccld.cpp index 116cf0b11ad..cd4cce064ac 100644 --- a/tools/gccld/gccld.cpp +++ b/tools/gccld/gccld.cpp @@ -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); diff --git a/tools/llvm-ar/llvm-ar.cpp b/tools/llvm-ar/llvm-ar.cpp index 7634a1a9e0a..c1ec7ecafe2 100644 --- a/tools/llvm-ar/llvm-ar.cpp +++ b/tools/llvm-ar/llvm-ar.cpp @@ -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