aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/ScalarEvolution.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-02-26 23:36:45 +0000
committerChris Lattner <sabre@nondot.org>2005-02-26 23:36:45 +0000
commit7192e501eb85fae5d3502e919a76e51eef99ed70 (patch)
tree582b93056c95a6db9fe84129c519ff673c8c83ec /lib/Analysis/ScalarEvolution.cpp
parenteaa06bb9792f14628402da55caa554965f25e49c (diff)
DCE a dead function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20339 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ScalarEvolution.cpp')
-rw-r--r--lib/Analysis/ScalarEvolution.cpp19
1 files changed, 0 insertions, 19 deletions
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp
index d2331ba338..744d6581c5 100644
--- a/lib/Analysis/ScalarEvolution.cpp
+++ b/lib/Analysis/ScalarEvolution.cpp
@@ -495,25 +495,6 @@ static SCEVHandle getMinusSCEV(const SCEVHandle &LHS, const SCEVHandle &RHS) {
}
-/// 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