summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar
Commit message (Collapse)AuthorAgeFilesLines
* consolidate DenseMapInfo implementations, and add one for std::pair.Chris Lattner2008-08-221-12/+0
| | | | | | Patch contributed by m-s. llvm-svn: 55167
* Revert r54876 r54877 r54906 and r54907. Evan found that these caused a 20%Nick Lewycky2008-08-211-68/+22
| | | | | | slowdown in bzip2. llvm-svn: 55113
* Silence a compiler warning.Evan Cheng2008-08-201-1/+2
| | | | llvm-svn: 55087
* Fixed shuffle optimizations to handle non power of 2 vectorsMon P Wang2008-08-201-4/+4
| | | | llvm-svn: 55035
* don't use the result of WriteAsOperandChris Lattner2008-08-191-4/+5
| | | | llvm-svn: 54979
* Make this comment clearer. Instead of using an ambiguous ~ (not) on an icmpNick Lewycky2008-08-171-1/+1
| | | | | | predicate, swap the order of the operands. llvm-svn: 54907
* Consider the case where xor by -1 and xor by 128 have been combined already toNick Lewycky2008-08-171-1/+23
| | | | | | produce an xor by 127. llvm-svn: 54906
* Revert 54821. It's miscompiling 252.eon and 447.dealIIEvan Cheng2008-08-171-118/+1
| | | | llvm-svn: 54878
* I found a better place for this optz'n.Nick Lewycky2008-08-171-14/+10
| | | | llvm-svn: 54877
* Xor'ing both sides of icmp by sign-bit is equivalent to swapping signedness ofNick Lewycky2008-08-171-22/+50
| | | | | | | | the predicate. Also, make this optz'n apply in more cases where it's safe to do so. llvm-svn: 54876
* Remove GCSE, ValueNumbering, and LoadValueNumbering. These have been ↵Owen Anderson2008-08-151-205/+0
| | | | | | deprecated for almost a year; it's finally time for them to go away. llvm-svn: 54822
* Reapply 54786. Add overflow and number of mantissa bits checks.Devang Patel2008-08-151-1/+118
| | | | llvm-svn: 54821
* Revert 54786. It's not checking for overflows, etc.Evan Cheng2008-08-151-101/+0
| | | | llvm-svn: 54813
* use smallvector instead of vector for a couple worklists. This speeds up ↵Chris Lattner2008-08-151-2/+2
| | | | | | | | instcombine by ~10% on some testcases. llvm-svn: 54811
* Temporarily revert r54792. It's causing an ICE during bootstrapping.Bill Wendling2008-08-141-5/+5
| | | | llvm-svn: 54804
* Use DenseMap. Patch by Pratik Solanki.Devang Patel2008-08-141-5/+5
| | | | llvm-svn: 54792
* If IV is used in a int-to-float cast inside the loop then try to eliminate ↵Devang Patel2008-08-141-0/+101
| | | | | | the cast opeation. llvm-svn: 54786
* Use empty() instead of begin() == end().Dan Gohman2008-08-141-2/+2
| | | | llvm-svn: 54780
* Fix a bogus srem rule - a negative value srem'd by a power-of-2Dan Gohman2008-08-131-3/+0
| | | | | | | can have a non-negative result; for example, -16%16 is 0. Also, clarify the related comments. This fixes PR2670. llvm-svn: 54767
* Fix SCCP's handling of struct value loads and stores. SCCP doesn'tDan Gohman2008-08-131-2/+0
| | | | | | | track individual leaf values in such cases, so it needs to treat struct values as normal values in this case. llvm-svn: 54760
* Rename. s/FindIVForUser/FindIVUserForCond/gDevang Patel2008-08-131-4/+4
| | | | llvm-svn: 54754
* Check sign to detect overflow before changing compare stride.Devang Patel2008-08-131-1/+8
| | | | llvm-svn: 54710
* Implement support for simplifying vector comparisons by 0.0 and 1.0 like weChris Lattner2008-08-111-4/+12
| | | | | | | | | do for scalars. Patch contributed by Nicolas Capens This also generalizes the previous xforms to work on long double, now that isExactlyValue works for long double. llvm-svn: 54653
* Have IRBuilder take a template argument on whether or not to preserveEric Christopher2008-08-081-45/+46
| | | | | | | names. This can save a lot of allocations if you aren't going to be looking at the output. llvm-svn: 54546
* Fix a shufflevector instcombine that was emitting invalid masks indicesDan Gohman2008-08-061-3/+5
| | | | | | when it meant to be emitting undef indices. llvm-svn: 54417
* Fix PR2355: bug in ChangeCompareStride. When the loop termination compare is ↵Evan Cheng2008-08-061-2/+2
| | | | | | the only use of its iv stride, the stride can be eliminated by moving it to another stride. If the scale is negative, swap the predicate instead of using a inverse predicate. llvm-svn: 54415
* optimize a common idiom generated by clang for bitfield access, PR2638.Chris Lattner2008-08-061-1/+31
| | | | llvm-svn: 54408
* Zap sitofp/fptoui pairs. In all cases when the sign difference Chris Lattner2008-08-061-16/+30
| | | | | | matters, the result is undefined anyway. llvm-svn: 54396
* Reinstate this optimization, but without the miscompile. Thanks to Bill forNick Lewycky2008-08-061-0/+15
| | | | | | tracking down that this was breaking llvm-gcc bootstrap on Linux. llvm-svn: 54394
* Pass the computed iteration count value to RewriteLoopExitValuesDan Gohman2008-08-051-4/+4
| | | | | | instead of having it call getIterationCount again. llvm-svn: 54380
* Revert r53282. This was causing a miscompile on Linux. Also, the transformationBill Wendling2008-08-051-16/+0
| | | | | | looks bogus. Please see PR2629 for details on why this is breaking things. llvm-svn: 54372
* Fix comment typos.Duncan Sands2008-08-011-1/+1
| | | | llvm-svn: 54266
* Add vector shifts to the IR, patch by Eli Friedman.Nate Begeman2008-07-291-1/+2
| | | | | | CodeGen & Clang work coming next. llvm-svn: 54161
* Add -unroll-allow-partial command line option that enabled the loop unroller toMatthijs Kooijman2008-07-291-4/+26
| | | | | | | | partially unroll a loop when fully unrolling would not fit under the threshold. Patch by Mikael Lepistö. llvm-svn: 54160
* Don't remove volatile loads. Thanks to Duncan for noticing this one.Owen Anderson2008-07-281-1/+1
| | | | llvm-svn: 54144
* Add support for eliminating stores that store the same value that was just ↵Owen Anderson2008-07-281-2/+35
| | | | | | | | loaded. This fixes PR2599. llvm-svn: 54133
* Rename SDOperand to SDValue.Dan Gohman2008-07-271-1/+1
| | | | llvm-svn: 54128
* Put the LICM of constant GlobalVariables, introduced in r53945, under aDan Gohman2008-07-241-1/+11
| | | | | | | command-line option, and disable it by default. It introduced performance regressions because CodeGen is currently not able to remat such loads. llvm-svn: 53997
* "Allow LICM to sink or lift loads from constant memory. Also add a testChris Lattner2008-07-231-0/+5
| | | | | | | | | | | case for this. This allows instructions like loads from global variables declared to be constant to be moved out of loops." Patch by Stefanus Du Toit! llvm-svn: 53945
* Enable first-class aggregates support.Dan Gohman2008-07-234-87/+7
| | | | | | | | | | | | Remove the GetResultInst instruction. It is still accepted in LLVM assembly and bitcode, where it is now auto-upgraded to ExtractValueInst. Also, remove support for return instructions with multiple values. These are auto-upgraded to use InsertValueInst instructions. The IRBuilder still accepts multiple-value returns, and auto-upgrades them to InsertValueInst instructions. llvm-svn: 53941
* Fix a bug in LSR's dead-PHI cleanup. If a PHI has a def-use chain thatDan Gohman2008-07-211-0/+5
| | | | | | | | | leads into a cycle involving a different PHI, LSR got stuck running around that cycle looking for the original PHI. To avoid this, keep track of visited PHIs and stop searching if we see one more than once. This fixes PR2570. llvm-svn: 53879
* Supress a gcc-4.3 warning.Duncan Sands2008-07-181-1/+1
| | | | llvm-svn: 53771
* Make PRE actually handle critical edges (by splitting them). Confirmed that ↵Owen Anderson2008-07-181-3/+6
| | | | | | bootstrap passes with this change. llvm-svn: 53762
* Enable PRE. My last batch of changes fixed the miscompile.Owen Anderson2008-07-171-1/+1
| | | | llvm-svn: 53730
* Fix PR2553Chris Lattner2008-07-171-1/+2
| | | | llvm-svn: 53715
* Factor MergeBlockIntoPredecessor out into BasicBlockUtils.Owen Anderson2008-07-171-51/+4
| | | | llvm-svn: 53705
* There's no need to iterate block merging and PRE. In fact, iterating the latterOwen Anderson2008-07-161-14/+12
| | | | | | could cause problems for memdep when it breaks critical edges. llvm-svn: 53691
* Redo InstCombiner::visitExtractValueInst. Instead of using the (complicate)Matthijs Kooijman2008-07-161-5/+80
| | | | | | | FindInsertedValue, it now performs a number of simple transformations that should result in the same effect when applied iteratively. llvm-svn: 53673
* Fix PR2296. Do not transform x86_sse2_storel_dq into a full-width store.Evan Cheng2008-07-161-1/+0
| | | | llvm-svn: 53666
* Revert this, as it seems to still be broken.Owen Anderson2008-07-151-1/+1
| | | | llvm-svn: 53627
OpenPOWER on IntegriCloud