summaryrefslogtreecommitdiff
path: root/lib/Analysis
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2009-01-25 08:16:27 +0000
committerNick Lewycky <nicholas@mxc.ca>2009-01-25 08:16:27 +0000
commit237d873439ed170e0d9608920d45d11d05bb5e5f (patch)
tree66bb2cff386c26fba0fbf4fe50945206be69700e /lib/Analysis
parent67e1f49a5049eee41154fbb94d1217f80fc80a99 (diff)
downloadllvm-237d873439ed170e0d9608920d45d11d05bb5e5f.tar.gz
llvm-237d873439ed170e0d9608920d45d11d05bb5e5f.tar.bz2
llvm-237d873439ed170e0d9608920d45d11d05bb5e5f.tar.xz
Start generating arbitrary precision integer SCEVs. This removes the temporary
code that rounded up and capped the size. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62958 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/ScalarEvolution.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp
index ca16a755dc..c05ba8d0ef 100644
--- a/lib/Analysis/ScalarEvolution.cpp
+++ b/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);