summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/LoopSimplify.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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
* s/llvm::DominatorTreeBase::DomTreeNode/llvm::DomTreeNode/gDevang Patel2007-06-041-3/+3
| | | | llvm-svn: 37407
* s/DominatorTreeBase::Node/DominatorTreeBase:DomTreeNode/gDevang Patel2007-06-031-3/+3
| | | | llvm-svn: 37403
* Fix typo in comment.Nick Lewycky2007-05-061-1/+1
| | | | llvm-svn: 36873
* Drop 'const'Devang Patel2007-05-031-2/+2
| | | | llvm-svn: 36662
* Use 'static const char' instead of 'static const int'.Devang Patel2007-05-021-2/+2
| | | | | | | Due to darwin gcc bug, one version of darwin linker coalesces static const int, which defauts PassID based pass identification. llvm-svn: 36652
* Do not use typeinfo to identify pass in pass manager.Devang Patel2007-05-011-0/+4
| | | | llvm-svn: 36632
* Avoid recursion.Devang Patel2007-04-201-6/+13
| | | | llvm-svn: 36272
* Remove ImmediateDominator analysis. The same information can be obtained ↵Owen Anderson2007-04-151-26/+0
| | | | | | | | | | from DomTree. A lot of code for constructing ImmediateDominator is now folded into DomTree construction. This is part of the ongoing work for PR217. llvm-svn: 36063
* Re-constify things that don't break the build. Last patch in thisOwen Anderson2007-04-091-2/+4
| | | | | | series, I promise. llvm-svn: 35848
* Unconst-ify stuff that broke the build.Owen Anderson2007-04-091-1/+1
| | | | llvm-svn: 35843
* Const-ify some parameters, and some cosmetic cleanups. No functionalityOwen Anderson2007-04-091-3/+4
| | | | | | change. llvm-svn: 35842
* Tabs -> SpacesOwen Anderson2007-04-091-36/+36
| | | | llvm-svn: 35841
* Improve some _slow_ behavior introduced in my patches the last few days.Owen Anderson2007-04-091-42/+42
| | | | llvm-svn: 35839
* Cleanup some from my DomSet-removal changes. Add a newOwen Anderson2007-04-091-4/+4
| | | | | | | isReachableFromEntry test to ETForest to factor a common test out of code. llvm-svn: 35786
* Remove DominatorSet usage from LoopSimplify. Patch from Owen Anderson.Nick Lewycky2007-04-081-89/+54
| | | | llvm-svn: 35757
OpenPOWER on IntegriCloud