[llvm-commits] [llvm] r62958 - /llvm/trunk/lib/Analysis/ScalarEvolution.cpp
Nick Lewycky
nicholas at mxc.ca
Sun Jan 25 00:16:27 PST 2009
Author: nicholas
Date: Sun Jan 25 02:16:27 2009
New Revision: 62958
URL: http://llvm.org/viewvc/llvm-project?rev=62958&view=rev
Log:
Start generating arbitrary precision integer SCEVs. This removes the temporary
code that rounded up and capped the size.
Modified:
llvm/trunk/lib/Analysis/ScalarEvolution.cpp
Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=62958&r1=62957&r2=62958&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original)
+++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Sun Jan 25 02:16:27 2009
@@ -585,17 +585,7 @@
}
// 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);
More information about the llvm-commits
mailing list