summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/LoopSimplify.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Make Loop::getLoopLatch() work on loops which don't have preheaders, asDan Gohman2009-11-201-1/+6
| | | | | | | | | | | | it may be used in contexts where preheader insertion may have failed due to an indirectbr. Make LoopSimplify's LoopSimplify::SeparateNestedLoop properly fail in the case that it would require splitting an indirectbr edge. These fix PR5502. llvm-svn: 89484
* Eliminate duplicate phi nodes in loops. Loop rotation, for example, can ↵Jim Grosbach2009-11-191-0/+6
| | | | | | introduce these, and it's beneficial to later passes to clean them up. llvm-svn: 89298
* Avoid calling getUniqueExitBlocks from within LoopSimplify, as it dependsDan Gohman2009-11-051-1/+8
| | | | | | | on loops having dedicated exits, which LoopSimplify can no longer always guarantee. llvm-svn: 86181
* The introduction of indirectbr meant the introduction ofDan Gohman2009-11-051-21/+82
| | | | | | | | | unsplittable critical edges, which means the introduction of loops which cannot be transformed to LoopSimplify form. Fix LoopSimplify to avoid transforming such loops into invalid code. llvm-svn: 86176
* Remove includes of Support/Compiler.h that are no longer needed after theNick Lewycky2009-10-251-1/+0
| | | | | | VISIBILITY_HIDDEN removal. llvm-svn: 85043
* Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.Nick Lewycky2009-10-251-1/+1
| | | | | | | Chris claims we should never have visibility_hidden inside any .cpp file but that's still not true even after this commit. llvm-svn: 85042
* Fix this code so that it doesn't try to iterate through a std::vectorDan Gohman2009-09-301-3/+4
| | | | | | | while calling changeImmediateDominator, which removes elements from the vector. This fixes PR5097. llvm-svn: 83166
* Convert LoopSimplify and LoopExtractor from FunctionPass to LoopPass.Dan Gohman2009-09-281-83/+48
| | | | llvm-svn: 82990
* Re-apply r80926, with fixes: keep the domtree informed of new blocksDan Gohman2009-09-081-29/+11
| | | | | | | | | | | | | | | that get created during loop unswitching, and fix SplitBlockPredecessors' LCSSA updating code to create new PHIs instead of trying to just move existing ones. Also, optimize Loop::verifyLoop, since it gets called a lot. Use searches on a sorted list of blocks instead of calling the "contains" function, as is done in other places in the Loop class, since "contains" does a linear search. Also, don't call verifyLoop from LoopSimplify or LCSSA, as the PassManager is already calling verifyLoop as part of LoopInfo's verifyAnalysis. llvm-svn: 81221
* Revert r80926. It causes loop unswitch assertion and slow down some JIT ↵Evan Cheng2009-09-061-12/+28
| | | | | | tests significantly. llvm-svn: 81101
* Add a verifyAnalysis to LoopInfo, LoopSimplify, and LCSSA form that verifyDan Gohman2009-09-031-28/+12
| | | | | | | | | that these passes are properly preserved. Fix several transformation passes that claimed to preserve LoopSimplify form but weren't. llvm-svn: 80926
* Change PHINode::hasConstantValue to have a DominatorTree argumentDan Gohman2009-09-031-9/+8
| | | | | | | | instead of a bool argument, and to do the dominator check itself. This makes it eaiser to use when DominatorTree information is available. llvm-svn: 80920
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-131-2/+3
| | | | llvm-svn: 78948
* Move more code back to 2.5 APIs.Owen Anderson2009-07-301-1/+1
| | | | llvm-svn: 77635
* Get rid of the Pass+Context magic.Owen Anderson2009-07-221-1/+1
| | | | llvm-svn: 76702
* Make makeLoopInvariant report whether it made any changes or not,Dan Gohman2009-07-151-6/+4
| | | | | | and use this to simplify more code. llvm-svn: 75722
* Update LoopSimplify and LoopUnswitch to use the new makeLoopInvariantDan Gohman2009-07-141-14/+9
| | | | | | function. llvm-svn: 75584
* More LLVMContext-ification.Owen Anderson2009-07-051-1/+2
| | | | llvm-svn: 74807
* Minor code simplification.Dan Gohman2009-06-301-3/+2
| | | | llvm-svn: 74491
* Remove the block from the LoopInfo, rather than just the Loop.Dan Gohman2009-06-271-1/+1
| | | | | | | LoopInfo will handle removing it from the Loop, as well as updating its own tables. llvm-svn: 74398
* Teach LoopSimplify how to merge multiple loop exits into a single exit,Dan Gohman2009-06-271-0/+75
| | | | | | | | | | | | | | | | when one of them can be converted to a trivial icmp and conditional branch. This addresses what is essentially a phase ordering problem. SimplifyCFG knows how to do this transformation, but it doesn't do so if the primary block has any instructions in it other than an icmp and a branch. In the given testcase, the block contains other instructions, however they are loop-invariant and can be hoisted. SimplifyCFG doesn't have LoopInfo though, so it can't hoist them. And, it's important that the blocks be merged before LoopRotation, as it doesn't support multiple-exit loops. llvm-svn: 74396
* Rename getAnalysisToUpdate to getAnalysisIfAvailable.Duncan Sands2009-01-281-2/+2
| | | | llvm-svn: 63198
* Tidy up several unbeseeming casts from pointer to intptr_t.Dan Gohman2008-09-041-1/+1
| | | | llvm-svn: 55779
* Use Loop::block_iterator.Dan Gohman2008-06-221-2/+3
| | | | llvm-svn: 52616
* LoopSimplify preserves AA.Devang Patel2008-06-061-3/+5
| | | | llvm-svn: 52053
* Change class' public PassInfo variables to by initialized with theDan Gohman2008-05-131-1/+1
| | | | | | | | | | | address of the PassInfo directly instead of calling getPassInfo. This eliminates a bunch of dynamic initializations of static data. Also, fold RegisterPassBase into PassInfo, make a bunch of its data members const, and rearrange some code to initialize data members in constructors instead of using setter member functions. llvm-svn: 51022
* Clean up the use of static and anonymous namespaces. This turned upDan Gohman2008-05-131-4/+4
| | | | | | | several things that were neither in an anonymous namespace nor static but not intended to be global. llvm-svn: 51017
* Remove 'unwinds to' support from mainline. This patch undoes r47802 r47989Nick Lewycky2008-04-251-10/+7
| | | | | | r48047 r48084 r48085 r48086 r48088 r48096 r48099 r48109 and r48123. llvm-svn: 50265
* Move SplitBlockPredecessors out of loopsimplify into BasicBlockUtils.hChris Lattner2008-04-211-107/+14
| | | | | | | | | as a global helper function. At the same type, switch it from taking a vector of predecessors to an arbitrary sequential input. This allows us to switch LoopSimplify to use a SmallVector for various temporary vectors that it passed into SplitBlockPredecessors. llvm-svn: 50020
* Move domtree/frontier updating earlier, allowing us to use it to update phi Chris Lattner2008-04-211-31/+18
| | | | | | nodes, removing a hack. llvm-svn: 50019
* Factor dominator tree and frontier updating into SplitBlockPredecessorsChris Lattner2008-04-211-18/+14
| | | | | | instead of doing it after every call. llvm-svn: 50018
* simplify code, fit in 80 cols.Chris Lattner2008-04-211-65/+67
| | | | llvm-svn: 50015
* API changes for class Use size reduction, wave 1.Gabor Greif2008-04-061-7/+7
| | | | | | | | Specifically, introduction of XXX::Create methods for Users that have a potentially variable number of Uses. llvm-svn: 49277
* Update the block cloner which fixes bugpoint on code using unwind_to (phew!)Nick Lewycky2008-03-091-7/+13
| | | | | | and also update the cloning interface's major user, the loop optimizations. llvm-svn: 48088
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* Make LoopInfoBase more generic, in preparation for having MachineLoopInfo. ↵Owen Anderson2007-11-271-4/+4
| | | | | | This involves a small interface change. llvm-svn: 44348
* Fix PR1752 and LoopSimplify/2007-10-28-InvokeCrash.ll: terminators Chris Lattner2007-10-291-4/+6
| | | | | | can have uses too. Wouldn't it be nice if invoke didn't exist? :) llvm-svn: 43426
* Move Split<...>() into DomTreeBase. This should make the #include's of ↵Owen Anderson2007-10-181-1/+0
| | | | | | | | | | DominatorInternals.h in CodeExtractor and LoopSimplify unnecessary. Hartmut, could you confirm that this fixes the issues you were seeing? llvm-svn: 43115
* Fixed linker errors (unresolved externals: split<>(...)) when compiling with ↵Hartmut Kaiser2007-10-171-0/+1
| | | | | | VC++. Please review. llvm-svn: 43081
* Use SmallVector instead of std::vector.Devang Patel2007-08-211-1/+1
| | | | llvm-svn: 41207
* remove some dead linesChris Lattner2007-08-061-2/+0
| | | | llvm-svn: 40859
* Verify loop info.Devang Patel2007-07-191-0/+10
| | | | llvm-svn: 40062
* Fix reference to iterator invalidated by an erase operation. UncoveredDavid Greene2007-06-291-3/+4
| | | | | | by _GLIBCXX_DEBUG. llvm-svn: 37796
* Move code to update dominator information after basic block is splitDevang Patel2007-06-211-189/+20
| | | | | | from LoopSimplify.cpp to Dominator.cpp llvm-svn: 37689
* Add and use DominatorTreeBase::findNearestCommonDominator().Devang Patel2007-06-111-1/+1
| | | | llvm-svn: 37545
* Simplify.Devang Patel2007-06-111-4/+2
| | | | llvm-svn: 37542
* simplifyDevang Patel2007-06-111-4/+3
| | | | llvm-svn: 37541
* Simplify. Dominator Tree is required so always available.Devang Patel2007-06-111-31/+26
| | | | llvm-svn: 37540
* Update LoopSimplify to require and preserve DominatorTree only.Devang Patel2007-06-081-32/+26
| | | | | | Now LoopSimplify does not require nor preserve ETForest. llvm-svn: 37512
* s/DominatorTree::createNewNode/DominatorTree::addNewBlock/gDevang Patel2007-06-041-2/+1
| | | | llvm-svn: 37415
OpenPOWER on IntegriCloud