summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/LoopSimplify.cpp
Commit message (Collapse)AuthorAgeFilesLines
* remove dead code. The exit block list is computed on demand, thus does notChris Lattner2005-08-131-15/+0
| | | | | | need to be updated. This code is a relic from when it did. llvm-svn: 22775
* remove some trickiness that broke yacr2 and some other programs last nightChris Lattner2005-08-101-3/+1
| | | | llvm-svn: 22751
* Make loop-simplify produce better loops by turning PHI nodes like X = phi [X, Y]Chris Lattner2005-08-101-1/+16
| | | | | | | into just Y. This often occurs when it seperates loops that have collapsed loop headers. This implements LoopSimplify/phi-node-simplify.ll llvm-svn: 22746
* This code can handle non-dominating instructionsChris Lattner2005-08-051-1/+1
| | | | llvm-svn: 22667
* Fix a fixme in CondPropagate.cpp by moving a PhiNode optimization intoNate Begeman2005-08-041-3/+2
| | | | | | | | BasicBlock's removePredecessor routine. This requires shuffling around the definition and implementation of hasContantValue from Utils.h,cpp into Instructions.h,cpp llvm-svn: 22664
* Remove trailing whitespaceMisha Brukman2005-04-211-22/+22
| | | | llvm-svn: 21427
* Enhance loopsimplify to preserve alias analysis instead of clobbering it.Chris Lattner2005-03-251-2/+15
| | | | | | This prevents crashes on some programs when using -ds-aa -licm. llvm-svn: 20831
* trivial simplificationChris Lattner2005-03-061-1/+1
| | | | llvm-svn: 20494
* Adjust to changes in instruction interfaces.Chris Lattner2005-01-291-2/+4
| | | | llvm-svn: 19900
* hasConstantValue will soon return instructions that don't dominate the PHI node,Chris Lattner2004-10-171-16/+21
| | | | | | so prepare for this. llvm-svn: 17095
* Pull assignment out of for loop conditional in order for this toAlkis Evlogimenos2004-09-281-8/+9
| | | | | | compile under windows. Patch contributed by Paolo Invernizzi! llvm-svn: 16534
* Prototype these functions more accuratelyChris Lattner2004-09-201-1/+1
| | | | llvm-svn: 16432
* Changes For Bug 352Reid Spencer2004-09-011-4/+4
| | | | | | | | Move include/Config and include/Support into include/llvm/Config, include/llvm/ADT and include/llvm/Support. From here on out, all LLVM public header files must be under include/llvm/. llvm-svn: 16137
* Fix #includes of i*.h => Instructions.h as per PR403.Misha Brukman2004-07-291-2/+1
| | | | llvm-svn: 15334
* Fix PR404 try #2Chris Lattner2004-07-151-8/+8
| | | | | | | This version takes about 1s longer than the previous one (down to 2.35s), but on the positive side, it actually works :) llvm-svn: 14856
* Revert previous patch until I get a bug fixedChris Lattner2004-07-151-12/+12
| | | | llvm-svn: 14853
* Fix PR404: Loop simplify is really slow on 252.eonChris Lattner2004-07-151-12/+12
| | | | | | | | This eliminates an N*N*logN algorithm from the loop simplify pass, replacing it with a much simpler and faster alternative. In a debug build, this reduces gccas time on eon from 85s to 42s. llvm-svn: 14851
* 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
OpenPOWER on IntegriCloud