summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/LoopIndexSplit.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Use do+while instead of while for loops which obviously have aDan Gohman2010-01-051-2/+2
| | | | | | non-zero trip count. Use SmallVector's pop_back_val(). llvm-svn: 92734
* Add Loop contains utility methods for testing whether a loopDan Gohman2009-12-181-2/+2
| | | | | | | | contains another loop, or an instruction. The loop form is substantially more efficient on large loops than the typical code it replaces. llvm-svn: 91654
* Update various Loop optimization passes to cope with the possibility thatDan Gohman2009-11-051-0/+4
| | | | | | LoopSimplify form may not be available. llvm-svn: 86175
* Remove ICmpInst::isSignedPredicate which was a reimplementationNick Lewycky2009-10-251-4/+4
| | | | | | CmpInst::isSigned. llvm-svn: 85037
* eliminate VISIBILITY_HIDDEN from Transforms/Scalar. PR4861Chris Lattner2009-09-021-4/+1
| | | | llvm-svn: 80766
* Fix PR3913, patch by Jakub Staszak!Chris Lattner2009-08-281-1/+1
| | | | llvm-svn: 80327
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-131-1/+2
| | | | llvm-svn: 78948
* Revert the ConstantInt constructors back to their 2.5 forms where possible, ↵Owen Anderson2009-07-241-2/+2
| | | | | | thanks to contexts-on-types. More to come. llvm-svn: 77011
* Get rid of the Pass+Context magic.Owen Anderson2009-07-221-4/+8
| | | | llvm-svn: 76702
* This started as a small change, I swear. Unfortunately, lots of things call ↵Owen Anderson2009-07-091-7/+9
| | | | | | the [I|F]CmpInst constructors. Who knew!? llvm-svn: 75200
* "LLVMContext* " --> "LLVMContext *"Owen Anderson2009-07-061-2/+2
| | | | llvm-svn: 74878
* Second batch of passes using LLVMContext.Owen Anderson2009-07-031-11/+14
| | | | llvm-svn: 74753
* Don't try to split a loop when the controlling icmp instructionDan Gohman2009-06-271-0/+3
| | | | | | doesn't have an IV-based operand. This fixes PR4471. llvm-svn: 74399
* Support vector casts in more places, fixing a variety of assertionDan Gohman2009-06-151-2/+2
| | | | | | | | | | | | | | | failures. To support this, add some utility functions to Type to help support vector/scalar-independent code. Change ConstantInt::get and ConstantFP::get to support vector types, and add an overload to ConstantInt::get that uses a static IntegerType type, for convenience. Introduce a new getConstant method for ScalarEvolution, to simplify common use cases. llvm-svn: 73431
* Fix loop-index-split to correctly preserve dominance frontiers. Part of Eli Friedman2009-05-221-17/+12
| | | | | | PR4238. llvm-svn: 72244
* Allow readonly functions to unwind exceptions. TeachDuncan Sands2009-05-061-1/+1
| | | | | | | | the optimizers about this. For example, a readonly function with no uses cannot be removed unless it is also marked nounwind. llvm-svn: 71071
* Reword and tidy up some comments.Dan Gohman2009-04-291-10/+21
| | | | llvm-svn: 70416
* LoopIndexSplit needs to inform the loop pass manager of the instructions it isOwen Anderson2009-04-141-0/+1
| | | | | | deleting, not just the basic block. llvm-svn: 69011
* Loop Index Split can eliminate a loop if it can determin if loop body is ↵Devang Patel2009-03-301-8/+24
| | | | | | executed only once. There was a bug in determining IV based value of the iteration for which the loop body is executed. Fix it. llvm-svn: 68071
* Before deleting a basic block, give other loop passes a chance cleanup ↵Devang Patel2009-03-251-1/+1
| | | | | | analysis values, related to the instructions in the basic block. llvm-svn: 67719
* If branch conditions' one successor is dominating another non-latch ↵Devang Patel2009-03-021-0/+15
| | | | | | successor then this loop's iteration space can not be restricted. In this example block bb5 is always executed. llvm-svn: 65902
* LoopIndexSplit doesn't actually use ScalarEvolution.Dan Gohman2009-02-171-4/+1
| | | | llvm-svn: 64811
* Add a utility function to LoopInfo to return the exit blockDan Gohman2009-02-121-5/+4
| | | | | | | when the loop has exactly one exit, and make use of it in LoopIndexSplit. llvm-svn: 64388
* Ignore DbgInfoIntrinsics.Devang Patel2009-02-061-1/+3
| | | | llvm-svn: 63923
* Fix spelling. Devang Patel2008-12-081-10/+10
| | | | | | Thanks Duncan! llvm-svn: 60702
* Rewrite code that 1) filters loops and 2) calculates new loop bounds.Devang Patel2008-12-041-1269/+715
| | | | | | | | This fixes many bugs. I will add more test cases in a separate check-in. Some day, the code that manipulates CFG and updates dom. info could use refactoring help. llvm-svn: 60554
* If the sign of exit condition and split condition does not matchDevang Patel2008-11-101-1/+6
| | | | | | then do not split loop index. llvm-svn: 58995
* Change create*Pass factory functions to return Pass* instead ofDaniel Dunbar2008-10-221-1/+1
| | | | | | | | | | | LoopPass*. - Although less precise, this means they can be used in clients without RTTI (who would otherwise need to include LoopPass.h, which eventually includes things using dynamic_cast). This was the simplest solution that presented itself, but I am happy to use a better one if available. llvm-svn: 58010
* Check loop exit predicate properly while eliminating one iteration loop.Devang Patel2008-10-101-13/+15
| | | | | | This patch fixes PR 2869 llvm-svn: 57369
* Fix typo, fix PR 2865.Devang Patel2008-10-061-2/+2
| | | | llvm-svn: 57221
* splitLoop does not handle split condition EQ.Devang Patel2008-09-181-0/+6
| | | | | | Fixes PR 2805 llvm-svn: 56321
* Do not ignore iv uses outside the loop.Devang Patel2008-09-171-1/+21
| | | | | | This one slipped through cracks very well. llvm-svn: 56284
* Tidy up several unbeseeming casts from pointer to intptr_t.Dan Gohman2008-09-041-1/+1
| | | | llvm-svn: 55779
* Use empty() instead of begin() == end().Dan Gohman2008-08-141-2/+2
| | | | llvm-svn: 54780
* If loop induction variable's start value is less then its exit value then do ↵Devang Patel2008-07-091-0/+13
| | | | | | not split the loop. llvm-svn: 53265
* Fix a typo in a comment.Dan Gohman2008-06-241-1/+1
| | | | llvm-svn: 52687
* Do not erase induction variable increment if it is used outside the loop.Devang Patel2008-05-191-4/+20
| | | | llvm-svn: 51280
* API change for {BinaryOperator|CmpInst|CastInst}::create*() --> Create. ↵Gabor Greif2008-05-161-10/+10
| | | | | | Legacy interfaces will be in place for some time. (Merge from use-diet branch.) llvm-svn: 51200
* Clean up the use of static and anonymous namespaces. This turned upDan Gohman2008-05-131-3/+4
| | | | | | | several things that were neither in an anonymous namespace nor static but not intended to be global. llvm-svn: 51017
* Porting r50563 from Tak to mainline.Bill Wendling2008-05-021-0/+5
| | | | llvm-svn: 50564
* API changes for class Use size reduction, wave 1.Gabor Greif2008-04-061-13/+13
| | | | | | | | Specifically, introduction of XXX::Create methods for Users that have a potentially variable number of Uses. llvm-svn: 49277
* Iterators folloring a SmallVector erased element are invalidated soDavid Greene2008-04-021-6/+4
| | | | | | | | don't access cached iterators from after the erased element. Re-apply 49056 with SmallVector support. llvm-svn: 49106
* Reverting 49056 due to the build being broken.Tanya Lattner2008-04-011-4/+6
| | | | llvm-svn: 49060
* Iterators folloring a SmallVector erased element are invalidated soDavid Greene2008-04-011-6/+4
| | | | | | don't access cached iterators from after the erased element. llvm-svn: 49056
* PHI->removeIncomingValue may remove PHInode.Devang Patel2008-03-271-1/+2
| | | | | | Increment iterator in advance. llvm-svn: 48890
* Add incoming value from header only if phi node has any use inside the loop.Devang Patel2008-03-241-2/+3
| | | | llvm-svn: 48738
* If loop header is also loop exiting block then OrigPN is incoming value for ↵Devang Patel2008-02-141-1/+7
| | | | | | | | B loop header. Fixes PR 2030. llvm-svn: 47141
* A loop latch phi node may have uses inside loop, not just in loop header.Devang Patel2008-02-131-4/+5
| | | | llvm-svn: 47093
* While moving exit condition, do not drop loop latch on the floor.Devang Patel2008-02-131-4/+9
| | | | llvm-svn: 47089
* Keep track of exit value operand number when operands are swapped.Devang Patel2008-02-131-1/+6
| | | | llvm-svn: 47082
OpenPOWER on IntegriCloud