#
0a2c4168 |
| 15-Dec-2010 |
Duncan Sands <baldrick@free.fr> |
Move Sub simplifications and additional Add simplifications out of instcombine and into InstructionSimplify.
llvm-svn: 121861
|
#
0488d564 |
| 23-Nov-2010 |
Duncan Sands <baldrick@free.fr> |
Rename SimplifyDistributed to the more meaningfull name SimplifyByFactorizing.
llvm-svn: 120051
|
#
adc7771f |
| 23-Nov-2010 |
Duncan Sands <baldrick@free.fr> |
Exploit distributive laws (eg: And distributes over Or, Mul over Add, etc) in a fairly systematic way in instcombine. Some of these cases were already dealt with, in which case I removed the existin
Exploit distributive laws (eg: And distributes over Or, Mul over Add, etc) in a fairly systematic way in instcombine. Some of these cases were already dealt with, in which case I removed the existing code. The case of Add has a bunch of funky logic which covers some of this plus a few variants (considers shifts to be a form of multiplication), which I didn't touch. The simplification performed is: A*B+A*C -> A*(B+C). The improvement is to do this in cases that were not already handled [such as A*B-A*C -> A*(B-C), which was reported on the mailing list], and also to do it more often by not checking for "only one use" if "B+C" simplifies.
llvm-svn: 120024
show more ...
|
#
f1ebb631 |
| 22-Nov-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
InstCombine: Implement X - A*-B -> X + A*B.
llvm-svn: 119984
|
#
641baf16 |
| 13-Nov-2010 |
Duncan Sands <baldrick@free.fr> |
Generalize the reassociation transform in SimplifyCommutative (now renamed to SimplifyAssociativeOrCommutative) "(A op C1) op C2" -> "A op (C1 op C2)", which previously was only done if C1 and C2 wer
Generalize the reassociation transform in SimplifyCommutative (now renamed to SimplifyAssociativeOrCommutative) "(A op C1) op C2" -> "A op (C1 op C2)", which previously was only done if C1 and C2 were constants, to occur whenever "C1 op C2" simplifies (a la InstructionSimplify). Since the simplifying operand combination can no longer be assumed to be the right-hand terms, consider all of the possible permutations. When compiling "gcc as one big file", transform 2 (i.e. using right-hand operands) fires about 4000 times but it has to be said that most of the time the simplifying operands are both constants. Transforms 3, 4 and 5 each fired once. Transform 6, which is an existing transform that I didn't change, never fired. With this change, the testcase is now optimized perfectly with one run of instcombine (previously it required instcombine + reassociate + instcombine, and it may just have been luck that this worked).
llvm-svn: 119002
show more ...
|
Revision tags: llvmorg-2.8.0, llvmorg-2.8.0-rc3, llvmorg-2.8.0-rc2, llvmorg-2.8.0-rc1, llvmorg-2.8.0-rc0, llvmorg-2.7.0 |
|
#
6f34abd0 |
| 02-Mar-2010 |
Dan Gohman <gohman@apple.com> |
Floating-point add, sub, and mul are now spelled fadd, fsub, and fmul, respectively.
llvm-svn: 97531
|
#
9dff9bec |
| 15-Feb-2010 |
Duncan Sands <baldrick@free.fr> |
Uniformize the names of type predicates: rather than having isFloatTy and isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris!
llvm-svn: 96223
|
#
a2cc2875 |
| 31-Jan-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Simplify/generalize the xor+add->sign-extend instcombine.
llvm-svn: 94943
|
#
37a8197b |
| 31-Jan-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Add a small transform: transform -(X<<Y) to (-X<<Y) when the shift has a single use and X is free to negate.
llvm-svn: 94941
|
#
ad7a5b07 |
| 13-Jan-2010 |
Bill Wendling <isanbard@gmail.com> |
When the visitSub method was split into visitSub and visitFSub, this xform was added to the FSub version. However, the original version of this xform guarded against doing this for floating point (!O
When the visitSub method was split into visitSub and visitFSub, this xform was added to the FSub version. However, the original version of this xform guarded against doing this for floating point (!Op0->getType()->isFPOrFPVector()).
This is causing LLVM to perform incorrect xforms for code like:
void func(double *rhi, double *rlo, double xh, double xl, double yh, double yl){ double mh, ml; double c = 134217729.0; double up, u1, u2, vp, v1, v2; up = xh*c; u1 = (xh - up) + up; u2 = xh - u1; vp = yh*c; v1 = (yh - vp) + vp; v2 = yh - v1; mh = xh*yh; ml = (((u1*v1 - mh) + (u1*v2)) + (u2*v1)) + (u2*v2); ml += xh*yl + xl*yh; *rhi = mh + ml; *rlo = (mh - (*rhi)) + ml; }
The last line was optimized away, but rl is intended to be the difference between the infinitely precise result of mh + ml and after it has been rounded to double precision.
llvm-svn: 93369
show more ...
|
#
dec6847b |
| 05-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
reduce indentation
llvm-svn: 92766
|
#
a81a6dff |
| 05-Jan-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Convert a ton of simple integer type equality tests to the new predicate.
llvm-svn: 92760
|
#
82aa888e |
| 05-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
split add/sub out to its own file. Eliminate use of dyn_castNotVal in the X+~X transform. dyn_castNotVal is dramatic overkill for what the xform needed.
llvm-svn: 92704
|