[NewGVN] fix typos; NFC

llvm-svn: 309946
This commit is contained in:
Sanjay Patel 2017-08-03 15:18:27 +00:00
parent c0fc1c0c8b
commit 7cf745cc94
1 changed files with 8 additions and 8 deletions

View File

@ -986,7 +986,7 @@ const Expression *NewGVN::createExpression(Instruction *I) const {
E->swapOperands(0, 1);
}
// Perform simplificaiton
// Perform simplification.
// TODO: Right now we only check to see if we get a constant result.
// We may get a less than constant, but still better, result for
// some operations.
@ -1276,7 +1276,7 @@ NewGVN::performSymbolicLoadCoercion(Type *LoadType, Value *LoadPtr,
if (auto *DepSI = dyn_cast<StoreInst>(DepInst)) {
// Can't forward from non-atomic to atomic without violating memory model.
// Also don't need to coerce if they are the same type, we will just
// propogate..
// propagate.
if (LI->isAtomic() > DepSI->isAtomic() ||
LoadType == DepSI->getValueOperand()->getType())
return nullptr;
@ -1297,7 +1297,7 @@ NewGVN::performSymbolicLoadCoercion(Type *LoadType, Value *LoadPtr,
return nullptr;
int Offset = analyzeLoadFromClobberingLoad(LoadType, LoadPtr, DepLI, DL);
if (Offset >= 0) {
// We can coerce a constant load into a load
// We can coerce a constant load into a load.
if (auto *C = dyn_cast<Constant>(lookupOperandLeader(DepLI)))
if (auto *PossibleConstant =
getConstantLoadValueForLoad(C, Offset, LoadType, DL)) {
@ -1400,7 +1400,7 @@ NewGVN::performSymbolicPredicateInfoEvaluation(Instruction *I) const {
auto *Cond = PWC->Condition;
// If this a copy of the condition, it must be either true or false depending
// on the predicate info type and edge
// on the predicate info type and edge.
if (CopyOf == Cond) {
// We should not need to add predicate users because the predicate info is
// already a use of this operand.
@ -1436,7 +1436,7 @@ NewGVN::performSymbolicPredicateInfoEvaluation(Instruction *I) const {
Value *FirstOp = lookupOperandLeader(Cmp->getOperand(0));
Value *SecondOp = lookupOperandLeader(Cmp->getOperand(1));
bool SwappedOps = false;
// Sort the ops
// Sort the ops.
if (shouldSwapOperands(FirstOp, SecondOp)) {
std::swap(FirstOp, SecondOp);
SwappedOps = true;
@ -1582,7 +1582,7 @@ bool NewGVN::isCycleFree(const Instruction *I) const {
return true;
}
// Evaluate PHI nodes symbolically, and create an expression result.
// Evaluate PHI nodes symbolically and create an expression result.
const Expression *NewGVN::performSymbolicPHIEvaluation(Instruction *I) const {
// True if one of the incoming phi edges is a backedge.
bool HasBackedge = false;
@ -1717,7 +1717,7 @@ const Expression *NewGVN::performSymbolicCmpEvaluation(Instruction *I) const {
OurPredicate = CI->getSwappedPredicate();
}
// Avoid processing the same info twice
// Avoid processing the same info twice.
const PredicateBase *LastPredInfo = nullptr;
// See if we know something about the comparison itself, like it is the target
// of an assume.
@ -1751,7 +1751,7 @@ const Expression *NewGVN::performSymbolicCmpEvaluation(Instruction *I) const {
// %operands are considered users of the icmp.
// *Currently* we only check one level of comparisons back, and only mark one
// level back as touched when changes appen . If you modify this code to look
// level back as touched when changes happen. If you modify this code to look
// back farther through comparisons, you *must* mark the appropriate
// comparisons as users in PredicateInfo.cpp, or you will cause bugs. See if
// we know something just from the operands themselves