summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/LoopSimplify.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Correct rewriting of exit blocks after my last patchChris Lattner2004-04-181-3/+8
| | | | llvm-svn: 13048
* Change the ExitBlocks list from being explicitly contained in the LoopChris Lattner2004-04-181-79/+4
| | | | | | | structure to being dynamically computed on demand. This makes updating loop information MUCH easier. llvm-svn: 13045
* Fix LoopSimplify/2004-04-13-LoopSimplifyUpdateDomFrontier.llChris Lattner2004-04-131-26/+42
| | | | | | LoopSimplify was not updating dominator frontiers correctly in some cases. llvm-svn: 12890
* Refactor code a bit to make it simpler and eliminate the gotoChris Lattner2004-04-131-27/+31
| | | | llvm-svn: 12888
* This patch addresses PR35: Loop simplify should reconstruct nested loops.Chris Lattner2004-04-131-6/+196
| | | | | | | This is fairly straight-forward, but was a real nightmare to get just perfect. aarg. :) llvm-svn: 12884
* Remove some assertions that are now bogus with the last patch I put inChris Lattner2004-04-011-6/+1
| | | | llvm-svn: 12595
* Fix PR306: Loop simplify incorrectly updates dominator informationChris Lattner2004-04-011-9/+22
| | | | | | Testcase: LoopSimplify/2004-04-01-IncorrectDomUpdate.ll llvm-svn: 12592
* Fix a regression from this patch:Chris Lattner2004-03-161-16/+13
| | | | | | | | | | | | | http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20040308/013095.html Basically, this patch only updated the immediate dominatees of the header node to tell them that the preheader also dominated them. In practice, ALL dominatees of the header node are also dominated by the preheader. This fixes: LoopSimplify/2004-03-15-IncorrectDomUpdate. and PR293 llvm-svn: 12434
* If a block is dead, dominators will not be calculated for it. Because of thisChris Lattner2004-03-141-2/+33
| | | | | | | | loop information won't see it, and we could have unreachable blocks pointing to the non-header node of blocks in a natural loop. This isn't tidy, so have the loopsimplify pass clean it up. llvm-svn: 12380
* This little patch speeds up the loop used to update the dominator set analysis.Chris Lattner2004-03-131-17/+18
| | | | | | | | | | | | | On the testcase from GCC PR12440, which has a LOT of loops (1392 of which require preheaders to be inserted), this speeds up the loopsimplify pass from 1.931s to 0.1875s. The loop in question goes from 1.65s -> 0.0097s, which isn't bad. All of these times are a debug build. This adds a dependency on DominatorTree analysis that was not there before, but we always had dominatortree available anyway, because LICM requires both loop simplify and DT, so this doesn't add any extra analysis in practice. llvm-svn: 12362
* Fix another dominator update bug. These bugs keep getting exposed because GCSEChris Lattner2004-02-051-1/+1
| | | | | | keeps finding more code motion opportunities now that the dominators are correct! llvm-svn: 11142
* Fix bug updating dominatorsChris Lattner2004-02-051-2/+2
| | | | llvm-svn: 11140
* Fix PR223: Loopsimplify incorrectly updates dominator informationChris Lattner2004-02-051-33/+105
| | | | | | | | The problem is that the dominator update code didn't "realize" that it's possible for the newly inserted basic block to dominate anything. Because it IS possible, stuff was getting updated wrong. llvm-svn: 11137
* Adjust to the new BasicBlock ctor, which requires a function parameterChris Lattner2004-02-041-1/+1
| | | | llvm-svn: 11114
* Improve encapsulation in the Loop and LoopInfo classes by eliminating theChris Lattner2004-01-081-15/+16
| | | | | | | getSubLoops/getTopLevelLoops methods, replacing them with iterator-based accessors. llvm-svn: 10714
* Generalize a special case to fix PR187Chris Lattner2003-12-191-18/+28
| | | | llvm-svn: 10531
* Finegrainify namespacificationChris Lattner2003-12-101-22/+21
| | | | | | Fix bug: LoopSimplify/2003-12-10-ExitBlocksProblem.ll llvm-svn: 10373
* Do not insert one entry PHI nodes in split exit blocks!Chris Lattner2003-12-091-13/+23
| | | | llvm-svn: 10348
* Minor cleanups and simplificationsChris Lattner2003-11-211-2/+2
| | | | llvm-svn: 10127
* Start using the nicer terminator auto-insertion APIChris Lattner2003-11-201-4/+2
| | | | llvm-svn: 10111
* Put all LLVM code into the llvm namespace, as per bug 109.Brian Gaeke2003-11-111-1/+4
| | | | llvm-svn: 9903
* Added LLVM project notice to the top of every C++ source file.John Criswell2003-10-201-0/+7
| | | | | | Header files will be on the way. llvm-svn: 9298
* Add support to the loop canonicalization pass to make it transform loops toChris Lattner2003-10-131-21/+163
| | | | | | | | have a SINGLE backedge. This is useful to, for example, the -indvars pass. This implements testcase LoopSimplify/single-backedge.ll and closes PR#34 llvm-svn: 9065
* Rename loop preheaders pass to loop simplifyChris Lattner2003-10-121-2/+2
| | | | llvm-svn: 9061
* File is renamed to LoopSimplify.cppChris Lattner2003-10-121-1/+1
| | | | llvm-svn: 9059
* First step in renaming the preheaders pass to loopsimplifyChris Lattner2003-10-121-16/+21
| | | | llvm-svn: 9058
* The preheader insertion pass only depends on the CFG. Mark it as such, whichChris Lattner2003-10-121-1/+2
| | | | | | allows GCCAS to only run it once. llvm-svn: 9056
* Fix spelling.Misha Brukman2003-10-101-2/+2
| | | | llvm-svn: 9027
* Renamed DominatorTree::Node::getNode() -> getBlock()Chris Lattner2003-09-111-1/+1
| | | | llvm-svn: 8469
* Spell `occurrence' correctly.Misha Brukman2003-09-091-2/+2
| | | | llvm-svn: 8425
* Fix grammar, add commentChris Lattner2003-08-181-1/+4
| | | | llvm-svn: 7967
* Spell `necessary' correctly.Misha Brukman2003-08-181-1/+1
| | | | llvm-svn: 7944
* Fix bug: LoopPreheaders/2003-05-12-PreheaderExitOfChild.llChris Lattner2003-05-121-5/+19
| | | | llvm-svn: 6153
* Remove unnecesary &*'sChris Lattner2003-04-231-2/+2
| | | | llvm-svn: 5872
* Fix bug I introduced yesterday :(Chris Lattner2003-02-281-1/+2
| | | | llvm-svn: 5669
* Fix bug: LICM/2003-02-27-PreheaderExitNodeUpdate.llChris Lattner2003-02-281-1/+5
| | | | llvm-svn: 5667
* Fix bug: 2003-02-27-PreheaderExitNodeUpdate.ll by updating exit node infoChris Lattner2003-02-271-0/+16
| | | | llvm-svn: 5664
* Add a new assertion to check that stuff is happening rightChris Lattner2003-02-271-3/+8
| | | | | | | Ironically the exit block modification code wasn't updating the exit block information itself. Fix this. llvm-svn: 5659
* * Don't forget to update Loop information!Chris Lattner2003-02-271-3/+5
| | | | | | | | * Remove bogus assertion: there may be a single outside predecessor and still need a new loop-preheader if the predecessor has multiple successors. See bug: LICM/2003-02-27-PreheaderProblem.ll llvm-svn: 5655
* * Significant changes to the preheader insertion pass:Chris Lattner2003-02-271-42/+219
| | | | | | | | | - Now we perform loop exit-block splitting to ensure exit blocks are always dominated by the loop header. - We now preserve dominance frontier information - This fixes bug: LICM/2003-02-26-LoopExitNotDominated.ll llvm-svn: 5652
* Updates to work with recent Statistic's changes:Chris Lattner2002-10-011-2/+2
| | | | | | | | | | | | * Renamed StatisticReporter.h/cpp to Statistic.h/cpp * Broke constructor to take two const char * arguments instead of one, so that indendation can be taken care of automatically. * Sort the list by pass name when printing * Make sure to print all statistics as a group, instead of randomly when the statistics dtors are called. * Updated ProgrammersManual with new semantics. llvm-svn: 4002
* Fix major bugs in dominator set & tree information updatingChris Lattner2002-09-291-6/+9
| | | | llvm-svn: 3975
* Change pass name to something saneChris Lattner2002-09-261-2/+1
| | | | llvm-svn: 3946
* Checkin new loop-preheader insertion pass.Chris Lattner2002-09-261-0/+189
llvm-svn: 3942
OpenPOWER on IntegriCloud