//===----------------------------------------------------------------------===//
/// BinomialCoefficient - Compute BC(It, K). The result has width W.
-// Assume, K > 0.
+/// Assume, K > 0.
static SCEVHandle BinomialCoefficient(SCEVHandle It, unsigned K,
ScalarEvolution &SE,
const Type* ResultTy) {
return Result;
}
-// get - Get a canonical add expression, or something simpler if possible.
+/// getAddExpr - Get a canonical add expression, or something simpler if
+/// possible.
SCEVHandle ScalarEvolution::getAddExpr(std::vector<SCEVHandle> &Ops) {
assert(!Ops.empty() && "Cannot get empty add!");
if (Ops.size() == 1) return Ops[0];
}
+/// getMulExpr - Get a canonical multiply expression, or something simpler if
+/// possible.
SCEVHandle ScalarEvolution::getMulExpr(std::vector<SCEVHandle> &Ops) {
assert(!Ops.empty() && "Cannot get empty mul!");
#ifndef NDEBUG
return Result;
}
+/// getUDivExpr - Get a canonical multiply expression, or something simpler if
+/// possible.
SCEVHandle ScalarEvolution::getUDivExpr(const SCEVHandle &LHS,
const SCEVHandle &RHS) {
assert(getEffectiveSCEVType(LHS->getType()) ==
}
-/// SCEVAddRecExpr::get - Get a add recurrence expression for the
-/// specified loop. Simplify the expression as much as possible.
+/// getAddRecExpr - Get an add recurrence expression for the specified loop.
+/// Simplify the expression as much as possible.
SCEVHandle ScalarEvolution::getAddRecExpr(const SCEVHandle &Start,
const SCEVHandle &Step, const Loop *L) {
std::vector<SCEVHandle> Operands;
return getAddRecExpr(Operands, L);
}
-/// SCEVAddRecExpr::get - Get a add recurrence expression for the
-/// specified loop. Simplify the expression as much as possible.
+/// getAddRecExpr - Get an add recurrence expression for the specified loop.
+/// Simplify the expression as much as possible.
SCEVHandle ScalarEvolution::getAddRecExpr(std::vector<SCEVHandle> &Operands,
const Loop *L) {
if (Operands.size() == 1) return Operands[0];
}
/// HowFarToZero - Return the number of times a backedge comparing the specified
-/// value to zero will execute. If not computable, return UnknownValue
+/// value to zero will execute. If not computable, return UnknownValue.
SCEVHandle ScalarEvolution::HowFarToZero(const SCEV *V, const Loop *L) {
// If the value is a constant
if (const SCEVConstant *C = dyn_cast<SCEVConstant>(V)) {
// If we know that the condition is true in order to enter the loop,
// then we know that it will run exactly (m-n)/s times. Otherwise, we
- // only know if will execute (max(m,n)-n)/s times. In both cases, the
- // division must round up.
+ // only know that it will execute (max(m,n)-n)/s times. In both cases,
+ // the division must round up.
SCEVHandle End = RHS;
if (!isLoopGuardedByCond(L,
isSigned ? ICmpInst::ICMP_SLT : ICmpInst::ICMP_ULT,