const Value *O1 = getUnderlyingObject(V1);
const Value *O2 = getUnderlyingObject(V2);
- // Pointing at a discernable object?
+ // Pointing at a discernible object?
if (O1 && O2) {
// If they are two different objects, we know that we have no alias...
if (O1 != O2) return NoAlias;
}
if (!(CloneFlags & DontCloneAuxCallNodes)) {
- // Copy the auxillary function calls list...
+ // Copy the auxiliary function calls list...
unsigned FC = AuxFunctionCalls.size(); // FirstCall
AuxFunctionCalls.reserve(FC+G.AuxFunctionCalls.size());
for (unsigned i = 0, ei = G.AuxFunctionCalls.size(); i != ei; ++i)
// Actually mark the node
N->setIncompleteMarker();
- // Recusively process children...
+ // Recursively process children...
for (unsigned i = 0, e = N->getSize(); i < e; i += DS::PointerSize)
if (DSNode *DSN = N->getLink(i).getNode())
markIncompleteNode(DSN);
// merging...
removeTriviallyDeadNodes();
- // FIXME: Merge nontrivially identical call nodes...
+ // FIXME: Merge non-trivially identical call nodes...
// Alive - a set that holds all nodes found to be reachable/alive.
hash_set<DSNode*> Alive;
DSNode *N1 = I->second.getNode(), *N2 = J->second.getNode();
unsigned O1 = I->second.getOffset(), O2 = J->second.getOffset();
- // We can only make a judgement of one of the nodes is complete...
+ // We can only make a judgment of one of the nodes is complete...
if (N1->isComplete() || N2->isComplete()) {
if (N1 != N2)
return NoAlias; // Completely different nodes.
// Compute Mod/Ref bit vectors for a single call site.
// These are copies of the Read/Write flags from the nodes of
-// the graph produced by clearing all flags in teh caller's TD graph
+// the graph produced by clearing all flags in the caller's TD graph
// and then inlining the callee's BU graph into the caller's TD graph.
//
void
unsigned RawOffset = Offset+Value.getOffset();
// Loop over all of the elements of the array, merging them into the
- // zero'th element.
+ // zeroth element.
for (unsigned i = 1, e = ATy->getNumElements(); i != e; ++i)
// Merge all of the byte components of this array element
for (unsigned j = 0; j != ElSize; ++j)
//===- DependenceGraph.cpp - Dependence graph for a function ----*- C++ -*-===//
//
-// This file implments an explicit representation for the dependence graph
+// This file implements an explicit representation for the dependence graph
// of a function, with one node per instruction and one edge per dependence.
// Dependences include both data and control dependences.
//
// Compute Mod/Ref bit vectors for a single call site.
// These are copies of the Read/Write flags from the nodes of
-// the graph produced by clearing all flags in teh caller's TD graph
+// the graph produced by clearing all flags in the caller's TD graph
// and then inlining the callee's BU graph into the caller's TD graph.
//
void
return 0;
}
- // Find final node: predecesor of the loop header that's also an exit
+ // Find final node: predecessor of the loop header that's also an exit
BasicBlock *terminator = 0;
for (pred_iterator PI = pred_begin(L->getHeader()),
PE = pred_end(L->getHeader()); PI != PE; ++PI)
// Following functions will give the LiveVar info for any machine instr in
// a function. It should be called after a call to analyze().
//
-// Thsese functions calucluates live var info for all the machine instrs in a
+// These functions calculate live var info for all the machine instrs in a
// BB when LVInfo for one inst is requested. Hence, this function is useful
// when live var info is required for many (or all) instructions in a basic
// block. Also, the arguments to this function does not require specific
// This function applies a machine instr to a live var set (accepts OutSet) and
// makes necessary changes to it (produces InSet). Note that two for loops are
// used to first kill all defs and then to add all uses. This is because there
-// can be instructions like Val = Val + 1 since we allow multipe defs to a
+// can be instructions like Val = Val + 1 since we allow multiple defs to a
// machine instruction operand.
//
static void applyTranferFuncForMInst(ValueSet &LVS, const MachineInstr *MInst) {
Function *F = LI->getParent()->getParent();
// Now that we know the set of equivalent source pointers for the load
- // instruction, look to see if there are any load or store candiates that
+ // instruction, look to see if there are any load or store candidates that
// are identical.
//
std::vector<LoadInst*> CandidateLoads;
AliasAnalysis &AA = getAnalysis<AliasAnalysis>();
DominatorSet &DomSetInfo = getAnalysis<DominatorSet>();
- // Loop over all of the candindate loads. If they are not invalidated by
+ // Loop over all of the candidate loads. If they are not invalidated by
// stores or calls between execution of them and LI, then add them to
// RetVals.
for (unsigned i = 0, e = CandidateLoads.size(); i != e; ++i)
if (BB)
for (pred_iterator SI = pred_begin(BB), SE = pred_end(BB);
SI != SE; ++SI)
- // Does Node immediately dominate this predeccessor?
+ // Does Node immediately dominate this predecessor?
if (DT[*SI]->getIDom() != Node)
S.insert(*SI);
// Check to see if this new cast is not I, but has the same operand...
if (Other != &I && Other->getOpcode() == I.getOpcode() &&
Other->getOperand(0) == Op && // Is the operand the same?
- // Is it embeded in the same function? (This could be false if LHS
+ // Is it embedded in the same function? (This could be false if LHS
// is a constant or global!)
Other->getParent()->getParent() == F &&
//
static inline bool isIdenticalBinaryInst(const Instruction &I1,
const Instruction *I2) {
- // Is it embeded in the same function? (This could be false if LHS
+ // Is it embedded in the same function? (This could be false if LHS
// is a constant or global!)
if (I1.getOpcode() != I2->getOpcode() ||
I1.getParent()->getParent() != I2->getParent()->getParent())
// Following functions will give the LiveVar info for any machine instr in
// a function. It should be called after a call to analyze().
//
-// Thsese functions calucluates live var info for all the machine instrs in a
+// These functions calculate live var info for all the machine instrs in a
// BB when LVInfo for one inst is requested. Hence, this function is useful
// when live var info is required for many (or all) instructions in a basic
// block. Also, the arguments to this function does not require specific
// This function applies a machine instr to a live var set (accepts OutSet) and
// makes necessary changes to it (produces InSet). Note that two for loops are
// used to first kill all defs and then to add all uses. This is because there
-// can be instructions like Val = Val + 1 since we allow multipe defs to a
+// can be instructions like Val = Val + 1 since we allow multiple defs to a
// machine instruction operand.
//
static void applyTranferFuncForMInst(ValueSet &LVS, const MachineInstr *MInst) {