diff options
| author | Nick Lewycky <nicholas@mxc.ca> | 2009-01-25 08:16:27 +0000 |
|---|---|---|
| committer | Nick Lewycky <nicholas@mxc.ca> | 2009-01-25 08:16:27 +0000 |
| commit | 21add8f9835a74d187e4d3f75b4d64dfb8fac264 (patch) | |
| tree | 0436a67db4503306b105c15492ac762119f90ab2 /llvm/lib | |
| parent | cb7a10ab63c92273161105d55b55d4073f55e7d9 (diff) | |
| download | bcm5719-llvm-21add8f9835a74d187e4d3f75b4d64dfb8fac264.tar.gz bcm5719-llvm-21add8f9835a74d187e4d3f75b4d64dfb8fac264.zip | |
Start generating arbitrary precision integer SCEVs. This removes the temporary
code that rounded up and capped the size.
llvm-svn: 62958
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Analysis/ScalarEvolution.cpp | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index ca16a755dca..c05ba8d0ef2 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/lib/Analysis/ScalarEvolution.cpp @@ -585,17 +585,7 @@ static SCEVHandle BinomialCoefficient(SCEVHandle It, unsigned K, } // We need at least W + T bits for the multiplication step - // FIXME: A temporary hack; we round up the bitwidths - // to the nearest power of 2 to be nice to the code generator. - unsigned CalculationBits = 1U << Log2_32_Ceil(W + T); - // FIXME: Temporary hack to avoid generating integers that are too wide. - // Although, it's not completely clear how to determine how much - // widening is safe; for example, on X86, we can't really widen - // beyond 64 because we need to be able to do multiplication - // that's CalculationBits wide, but on X86-64, we can safely widen up to - // 128 bits. - if (CalculationBits > 64) - return new SCEVCouldNotCompute(); + unsigned CalculationBits = W + T; // Calcuate 2^T, at width T+W. APInt DivFactor = APInt(CalculationBits, 1).shl(T); |

