Fix spelling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9027 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/DataStructure/Parallelize.cpp b/lib/Analysis/DataStructure/Parallelize.cpp
index e533c4e..09b7dc2 100644
--- a/lib/Analysis/DataStructure/Parallelize.cpp
+++ b/lib/Analysis/DataStructure/Parallelize.cpp
@@ -81,7 +81,7 @@
// 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 @@
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 @@
#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(),
diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp
index 81d46ca..aa9a8fc 100644
--- a/lib/Linker/LinkModules.cpp
+++ b/lib/Linker/LinkModules.cpp
@@ -151,9 +151,9 @@
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;
diff --git a/lib/Target/SparcV9/MappingInfo.cpp b/lib/Target/SparcV9/MappingInfo.cpp
index 999b603..5f496bf 100644
--- a/lib/Target/SparcV9/MappingInfo.cpp
+++ b/lib/Target/SparcV9/MappingInfo.cpp
@@ -132,7 +132,7 @@
/// 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 70c41e1..819b862 100644
--- a/lib/Target/SparcV9/SparcV9CodeEmitter.cpp
+++ b/lib/Target/SparcV9/SparcV9CodeEmitter.cpp
@@ -366,10 +366,11 @@
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 @@
// 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 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 8f51264..6248a83 100644
--- a/lib/Target/SparcV9/SparcV9RegClassInfo.cpp
+++ b/lib/Target/SparcV9/SparcV9RegClassInfo.cpp
@@ -261,7 +261,7 @@
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 @@
}
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 a46af22..8dde4e9 100644
--- a/lib/Target/SparcV9/SparcV9RegInfo.cpp
+++ b/lib/Target/SparcV9/SparcV9RegInfo.cpp
@@ -466,7 +466,7 @@
}
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 @@
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 f8f483f..23d4e17 100644
--- a/lib/Target/X86/FloatingPoint.cpp
+++ b/lib/Target/X86/FloatingPoint.cpp
@@ -549,7 +549,7 @@
/// 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 cc57b0e..9e4e499 100644
--- a/lib/Target/X86/InstSelectSimple.cpp
+++ b/lib/Target/X86/InstSelectSimple.cpp
@@ -1214,7 +1214,7 @@
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 f8f483f..23d4e17 100644
--- a/lib/Target/X86/X86FloatingPoint.cpp
+++ b/lib/Target/X86/X86FloatingPoint.cpp
@@ -549,7 +549,7 @@
/// 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 cc57b0e..9e4e499 100644
--- a/lib/Target/X86/X86ISelSimple.cpp
+++ b/lib/Target/X86/X86ISelSimple.cpp
@@ -1214,7 +1214,7 @@
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 ac5af10..d076f9a 100644
--- a/lib/Transforms/ExprTypeConvert.cpp
+++ b/lib/Transforms/ExprTypeConvert.cpp
@@ -104,7 +104,7 @@
// 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 @@
// 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 @@
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 f8aaf35..ece26d5 100644
--- a/lib/Transforms/IPO/DeadArgumentElimination.cpp
+++ b/lib/Transforms/IPO/DeadArgumentElimination.cpp
@@ -232,7 +232,7 @@
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;
diff --git a/lib/Transforms/IPO/ExtractFunction.cpp b/lib/Transforms/IPO/ExtractFunction.cpp
index f16c3f3..51c4e00 100644
--- a/lib/Transforms/IPO/ExtractFunction.cpp
+++ b/lib/Transforms/IPO/ExtractFunction.cpp
@@ -15,7 +15,7 @@
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 5e72d8a..b2299c3 100644
--- a/lib/Transforms/IPO/InlineSimple.cpp
+++ b/lib/Transforms/IPO/InlineSimple.cpp
@@ -52,7 +52,7 @@
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 2ea6938..f10bcce 100644
--- a/lib/Transforms/IPO/MutateStructTypes.cpp
+++ b/lib/Transforms/IPO/MutateStructTypes.cpp
@@ -93,7 +93,7 @@
}
-// 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 e533c4e..09b7dc2 100644
--- a/lib/Transforms/IPO/Parallelize.cpp
+++ b/lib/Transforms/IPO/Parallelize.cpp
@@ -81,7 +81,7 @@
// 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 @@
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 @@
#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(),
diff --git a/lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp b/lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp
index 4f46e5b..8571dc8 100644
--- a/lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp
+++ b/lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp
@@ -174,7 +174,7 @@
//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 @@
//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;
diff --git a/lib/Transforms/Instrumentation/ProfilePaths/GraphAuxiliary.cpp b/lib/Transforms/Instrumentation/ProfilePaths/GraphAuxiliary.cpp
index 10b55ce..4e7c584 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 @@
}
//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 @@
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 9629962..9401afe 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 @@
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 @@
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 @@
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 8d71605..3e11241 100644
--- a/lib/Transforms/Scalar/ADCE.cpp
+++ b/lib/Transforms/Scalar/ADCE.cpp
@@ -259,7 +259,7 @@
// 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 @@
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 @@
// 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 6003c81..59b8b0f 100644
--- a/lib/Transforms/Scalar/CorrelatedExprs.cpp
+++ b/lib/Transforms/Scalar/CorrelatedExprs.cpp
@@ -121,7 +121,7 @@
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 @@
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 6883818..9e1c440 100644
--- a/lib/Transforms/Scalar/GCSE.cpp
+++ b/lib/Transforms/Scalar/GCSE.cpp
@@ -193,7 +193,7 @@
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 @@
// ... 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 33c8c70..51be904 100644
--- a/lib/Transforms/Scalar/IndVarSimplify.cpp
+++ b/lib/Transforms/Scalar/IndVarSimplify.cpp
@@ -50,7 +50,7 @@
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;
diff --git a/lib/Transforms/Scalar/LICM.cpp b/lib/Transforms/Scalar/LICM.cpp
index eb7a64d..a794761 100644
--- a/lib/Transforms/Scalar/LICM.cpp
+++ b/lib/Transforms/Scalar/LICM.cpp
@@ -77,7 +77,7 @@
/// 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 @@
/// 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 21eaf23..d555df7 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 3effa66..9134bf8 100644
--- a/lib/Transforms/Scalar/SCCP.cpp
+++ b/lib/Transforms/Scalar/SCCP.cpp
@@ -499,7 +499,7 @@
// 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 c8e5ecc..0e143cd 100644
--- a/lib/Transforms/TransformInternals.cpp
+++ b/lib/Transforms/TransformInternals.cpp
@@ -64,7 +64,7 @@
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 0f0f14a..d5f7f1f 100644
--- a/lib/Transforms/Utils/BasicBlockUtils.cpp
+++ b/lib/Transforms/Utils/BasicBlockUtils.cpp
@@ -64,7 +64,7 @@
// 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 a87dbce..e37b307 100644
--- a/lib/Transforms/Utils/BreakCriticalEdges.cpp
+++ b/lib/Transforms/Utils/BreakCriticalEdges.cpp
@@ -106,7 +106,7 @@
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.
diff --git a/lib/Transforms/Utils/CloneModule.cpp b/lib/Transforms/Utils/CloneModule.cpp
index 93bed75..2a7d1ed 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 81d46ca..aa9a8fc 100644
--- a/lib/Transforms/Utils/Linker.cpp
+++ b/lib/Transforms/Utils/Linker.cpp
@@ -151,9 +151,9 @@
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;
diff --git a/lib/Transforms/Utils/LoopSimplify.cpp b/lib/Transforms/Utils/LoopSimplify.cpp
index 56b63f3..3c77b01 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 @@
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 1d5e4ec..305fbd8 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 @@
// 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 81d46ca..aa9a8fc 100644
--- a/lib/VMCore/Linker.cpp
+++ b/lib/VMCore/Linker.cpp
@@ -151,9 +151,9 @@
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;
diff --git a/runtime/GCCLibraries/crtend/C++-Exception.cpp b/runtime/GCCLibraries/crtend/C++-Exception.cpp
index b6ebb22..b521f14 100644
--- a/runtime/GCCLibraries/crtend/C++-Exception.cpp
+++ b/runtime/GCCLibraries/crtend/C++-Exception.cpp
@@ -36,7 +36,7 @@
//
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 84d4d40..b34d880 100644
--- a/tools/bugpoint/CrashDebugger.cpp
+++ b/tools/bugpoint/CrashDebugger.cpp
@@ -91,7 +91,7 @@
};
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 @@
};
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...
diff --git a/tools/bugpoint/OptimizerDriver.cpp b/tools/bugpoint/OptimizerDriver.cpp
index fe9112e..6aa23e8 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 @@
}
/// 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 116cf0b..cd4cce0 100644
--- a/tools/gccld/gccld.cpp
+++ b/tools/gccld/gccld.cpp
@@ -215,7 +215,8 @@
// 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 7634a1a..c1ec7ec 100644
--- a/tools/llvm-ar/llvm-ar.cpp
+++ b/tools/llvm-ar/llvm-ar.cpp
@@ -90,7 +90,7 @@
// 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 @@
//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;