diff options
| author | Chris Lattner <sabre@nondot.org> | 2005-02-26 23:36:45 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2005-02-26 23:36:45 +0000 |
| commit | 0b0f3520cb1a138f1df0e28cbd2a58a868e27b35 (patch) | |
| tree | 913bad7abba1048cd3498be84c4dd2c255449efa /llvm/lib/Analysis/ScalarEvolution.cpp | |
| parent | 709e10ed92a0ca028cfa794c2a5093272df03708 (diff) | |
| download | bcm5719-llvm-0b0f3520cb1a138f1df0e28cbd2a58a868e27b35.tar.gz bcm5719-llvm-0b0f3520cb1a138f1df0e28cbd2a58a868e27b35.zip | |
DCE a dead function
llvm-svn: 20339
Diffstat (limited to 'llvm/lib/Analysis/ScalarEvolution.cpp')
| -rw-r--r-- | llvm/lib/Analysis/ScalarEvolution.cpp | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index d2331ba3386..744d6581c52 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/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 |

