1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
llvm-mirror/lib/Transforms
Duncan Sands 5948d230e5 Now that Reassociate's LinearizeExprTree can look through arbitrary expression
topologies, it is quite possible for a leaf node to have huge multiplicity, for
example: x0 = x*x, x1 = x0*x0, x2 = x1*x1, ... rapidly gives a value which is x
raised to a vast power (the multiplicity, or weight, of x).  This patch fixes
the computation of weights by correctly computing them no matter how big they
are, rather than just overflowing and getting a wrong value.  It turns out that
the weight for a value never needs more bits to represent than the value itself,
so it is enough to represent weights as APInts of the same bitwidth and do the
right overflow-avoiding dance steps when computing weights.  As a side-effect it
reduces the number of multiplies needed in some cases of large powers.  While
there, in view of external uses (eg by the vectorizer) I made LinearizeExprTree
static, pushing the rank computation out into users.  This is progress towards
fixing PR13021.

llvm-svn: 158358
2012-06-12 14:33:56 +00:00
..
Hello
InstCombine InstCombine: factor code better. 2012-06-11 08:01:25 +00:00
Instrumentation Register the gcov "writeout" at init time. Don't list this as a d'tor. Instead, 2012-06-01 23:14:32 +00:00
IPO Fix typos found by http://github.com/lyda/misspell-check 2012-06-02 10:20:22 +00:00
Scalar Now that Reassociate's LinearizeExprTree can look through arbitrary expression 2012-06-12 14:33:56 +00:00
Utils Convert comments to proper Doxygen comments. 2012-06-09 00:01:45 +00:00
Vectorize Don't vectorize target-specific types (ppc_fp128, x86_fp80, etc.). 2012-04-27 19:34:00 +00:00
CMakeLists.txt Add a basic-block autovectorization pass. 2012-02-01 03:51:43 +00:00
LLVMBuild.txt Add a basic-block autovectorization pass. 2012-02-01 03:51:43 +00:00
Makefile Add a basic-block autovectorization pass. 2012-02-01 03:51:43 +00:00