[llvm-commits] CVS: llvm/lib/Analysis/ScalarEvolution.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sat Feb 26 15:37:00 PST 2005
Changes in directory llvm/lib/Analysis:
ScalarEvolution.cpp updated: 1.34 -> 1.35
---
Log message:
DCE a dead function
---
Diffs of the changes: (+0 -19)
ScalarEvolution.cpp | 19 -------------------
1 files changed, 19 deletions(-)
Index: llvm/lib/Analysis/ScalarEvolution.cpp
diff -u llvm/lib/Analysis/ScalarEvolution.cpp:1.34 llvm/lib/Analysis/ScalarEvolution.cpp:1.35
--- llvm/lib/Analysis/ScalarEvolution.cpp:1.34 Sat Feb 26 12:50:19 2005
+++ llvm/lib/Analysis/ScalarEvolution.cpp Sat Feb 26 17:36:45 2005
@@ -495,25 +495,6 @@
}
-/// Binomial - Evaluate N!/((N-M)!*M!) . Note that N is often large and M is
-/// often very small, so we try to reduce the number of N! terms we need to
-/// evaluate by evaluating this as (N!/(N-M)!)/M!
-static ConstantInt *Binomial(ConstantInt *N, unsigned M) {
- uint64_t NVal = N->getRawValue();
- uint64_t FirstTerm = 1;
- for (unsigned i = 0; i != M; ++i)
- FirstTerm *= NVal-i;
-
- unsigned MFactorial = 1;
- for (; M; --M)
- MFactorial *= M;
-
- Constant *Result = ConstantUInt::get(Type::ULongTy, FirstTerm/MFactorial);
- Result = ConstantExpr::getCast(Result, N->getType());
- assert(isa<ConstantInt>(Result) && "Cast of integer not folded??");
- return cast<ConstantInt>(Result);
-}
-
/// PartialFact - Compute V!/(V-NumSteps)!
static SCEVHandle PartialFact(SCEVHandle V, unsigned NumSteps) {
// Handle this case efficiently, it is common to have constant iteration
More information about the llvm-commits
mailing list