summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
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
* Rename some GC classes so that their roll will hopefully be clearer.Gordon Henriksen2008-08-171-4/+4
| | | | | | | | | | | | | | | | | | In particular, Collector was confusing to implementors. Several thought that this compile-time class was the place to implement their runtime GC heap. Of course, it doesn't even exist at runtime. Specifically, the renames are: Collector -> GCStrategy CollectorMetadata -> GCFunctionInfo CollectorModuleMetadata -> GCModuleInfo CollectorRegistry -> GCRegistry Function::getCollector -> getGC (setGC, hasGC, clearGC) Several accessors and nested types have also been renamed to be consistent. These changes should be obvious. llvm-svn: 54899
* 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
* Rework the routines that convert AP[S]Int into a string. Now, instead ofChris Lattner2008-08-171-5/+3
| | | | | | | | | | | | | | | | | returning an std::string by value, it fills in a SmallString/SmallVector passed in. This significantly reduces string thrashing in some cases. More specifically, this: - Adds an operator<< and a print method for APInt that allows you to directly send them to an ostream. - Reimplements APInt::toString to be much simpler and more efficient algorithmically in addition to not thrashing strings quite as much. This speeds up llvm-dis on kc++ by 7%, and may also slightly speed up the asmprinter. This also fixes a bug I introduced into the asmwriter in a previous patch w.r.t. alias printing. llvm-svn: 54873
* 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-143-4/+4
| | | | llvm-svn: 54780
* Replace two for loops with while(!X->use_empty()) loops. This preventsMatthijs Kooijman2008-08-141-10/+8
| | | | | | | | | invalidating the iterator by deleting the current use. This fixes a segfault on 64 bit linux reported in PR2675. Also remove an unneeded if. llvm-svn: 54778
* 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
* Remove tabs.Bill Wendling2008-08-121-2/+2
| | | | llvm-svn: 54707
* 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
* Let SRETPromotion properly preserve the function name instead of (implicitly)Matthijs Kooijman2008-08-071-1/+2
| | | | | | postfixing it with a number. llvm-svn: 54468
* Fix SRETPromotion, it was generating functions without returns statements sinceMatthijs Kooijman2008-08-071-1/+1
| | | | | | | r53941 (but this was not noticed due to the lack of a basic test for SRETPromotion). llvm-svn: 54467
* Add some debug output to SRETPromotion.Matthijs Kooijman2008-08-071-0/+4
| | | | llvm-svn: 54464
* 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
* Trim #includes.Dan Gohman2008-08-051-1/+0
| | | | llvm-svn: 54350
* 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
* Restructure ArgumentPromotion a bit. Instead of just having a single booleanMatthijs Kooijman2008-07-291-99/+235
| | | | | | | | | | | | | that says "unconditional loads from this argument are safe", we now keep track of the safety per set of indices from which loads happen. This prevents ArgPromotion from promoting loads that aren't really valid. As an added effect, this will now disregard the the type of the indices passed to a GEP, so "load GEP %A, i32 1" and "load GEP %A, i64 1" will result in a single argument, not two. This fixes PR2598, for which a testcase has been added as well. llvm-svn: 54159
* 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-2310-261/+68
| | | | | | | | | | | | 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
OpenPOWER on IntegriCloud