llvm-project/llvm/lib
Duncan Sands d7aeefebd6 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
..
Analysis Round 2 of dead private variable removal. 2012-06-06 19:47:08 +00:00
Archive Include cstdio in a few place that depended on getting it transitively through StringExtras.h 2012-03-23 11:35:30 +00:00
AsmParser switch AttrListPtr::get to take an ArrayRef, simplifying a lot of clients. 2012-05-28 01:47:44 +00:00
Bitcode PR1255: case ranges. 2012-06-02 09:42:43 +00:00
CodeGen misched: When querying RegisterPressureTracker, always save current and max pressure. 2012-06-11 23:42:23 +00:00
DebugInfo Fix a C++11 UDL conflict. 2012-04-04 20:33:56 +00:00
ExecutionEngine Round 2 of dead private variable removal. 2012-06-06 19:47:08 +00:00
Linker Supply a C interface to the "LinkModules" method. 2012-05-09 08:55:40 +00:00
MC Add accessors for all private members of DisasmContext. 2012-06-06 20:45:10 +00:00
Object Convert comments to proper Doxygen comments. 2012-06-09 00:01:45 +00:00
Support Reapply r158337, this time properly protect Darwin/PPC host CPU use with __ppc__. 2012-06-12 03:03:13 +00:00
TableGen Write llvm-tblgen backends as functions instead of sub-classes. 2012-06-11 15:37:55 +00:00
Target Reapply r158337, this time properly protect Darwin/PPC host CPU use with __ppc__. 2012-06-12 03:03:13 +00:00
Transforms Now that Reassociate's LinearizeExprTree can look through arbitrary expression 2012-06-12 14:33:56 +00:00
VMCore Now that Reassociate's LinearizeExprTree can look through arbitrary expression 2012-06-12 14:33:56 +00:00
CMakeLists.txt Move TableGen's parser and entry point into a library 2011-10-01 16:41:13 +00:00
LLVMBuild.txt LLVMBuild: Introduce a common section which currently has a list of the 2011-12-12 22:45:54 +00:00
Makefile Remove more of llvmc and dependencies. 2011-09-20 00:34:27 +00:00